Changeset 15104a8 in opengl-game for vulkan-game.hpp
- Timestamp:
- Nov 19, 2019, 5:33:49 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 1908591
- Parents:
- 5ab1b20
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.hpp
r5ab1b20 r15104a8 3 3 4 4 #include <glm/glm.hpp> 5 #include <glm/gtc/matrix_transform.hpp> 5 6 6 7 #include "game-gui-sdl.hpp" … … 8 9 9 10 #include "vulkan-utils.hpp" 11 12 using namespace glm; 10 13 11 14 #ifdef NDEBUG … … 16 19 17 20 struct ModelVertex { 18 glm::vec3 pos;19 glm::vec3 color;20 glm::vec2 texCoord;21 vec3 pos; 22 vec3 color; 23 vec2 texCoord; 21 24 }; 22 25 23 26 struct OverlayVertex { 24 glm::vec3 pos; 25 glm::vec2 texCoord; 27 vec3 pos; 28 vec2 texCoord; 29 }; 30 31 struct UniformBufferObject { 32 alignas(16) mat4 model; 33 alignas(16) mat4 view; 34 alignas(16) mat4 proj; 26 35 }; 27 36 … … 39 48 const float FAR_CLIP = 100.0f; 40 49 const float FOV_ANGLE = 67.0f; 50 51 vec3 cam_pos; 52 53 UniformBufferObject ubo; 41 54 42 55 GameGui* gui; … … 106 119 bool initWindow(int width, int height, unsigned char guiFlags); 107 120 void initVulkan(); 121 void initMatrices(); 108 122 void mainLoop(); 109 123 void renderUI();
Note:
See TracChangeset
for help on using the changeset viewer.