Changeset cc4a8b5 in opengl-game
- Timestamp:
- Nov 7, 2019, 3:32:34 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 1f25a71
- Parents:
- f985231
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.cpp
rf985231 rcc4a8b5 1 1 #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> 2 7 3 8 #include <array> … … 12 17 13 18 using namespace std; 19 using namespace glm; 14 20 15 21 struct UniformBufferObject { … … 897 903 898 904 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)); 901 907 ubo.proj = perspective(radians(45.0f), swapChainExtent.width / (float)swapChainExtent.height, 0.1f, 10.0f); 902 908 ubo.proj[1][1] *= -1; // flip the y-axis so that +y is up
Note:
See TracChangeset
for help on using the changeset viewer.