Changeset cc4a8b5 in opengl-game


Ignore:
Timestamp:
Nov 7, 2019, 3:32:34 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
1f25a71
Parents:
f985231
Message:

Make vulkangame compile under Linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.cpp

    rf985231 rcc4a8b5  
    11#include "vulkan-game.hpp"
     2
     3#define GLM_FORCE_RADIANS
     4#define GLM_FORCE_DEPTH_ZERO_TO_ONE
     5
     6#include <glm/gtc/matrix_transform.hpp>
    27
    38#include <array>
     
    1217
    1318using namespace std;
     19using namespace glm;
    1420
    1521struct UniformBufferObject {
     
    897903
    898904   UniformBufferObject ubo = {};
    899    ubo.model = rotate(glm::mat4(1.0f), time * glm::radians(90.0f), glm::vec3(0.0f, 0.0f, 1.0f));
    900    ubo.view = lookAt(glm::vec3(0.0f, 2.0f, 2.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 1.0f, 0.0f));
     905   ubo.model = rotate(mat4(1.0f), time * radians(90.0f), vec3(0.0f, 0.0f, 1.0f));
     906   ubo.view = lookAt(vec3(0.0f, 2.0f, 2.0f), vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 1.0f, 0.0f));
    901907   ubo.proj = perspective(radians(45.0f), swapChainExtent.width / (float)swapChainExtent.height, 0.1f, 10.0f);
    902908   ubo.proj[1][1] *= -1; // flip the y-axis so that +y is up
Note: See TracChangeset for help on using the changeset viewer.