Changeset 60578ce in opengl-game for vulkan-game.cpp
- Timestamp:
- Dec 18, 2019, 2:48:28 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- a79be34
- Parents:
- 7c929fc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.cpp
r7c929fc r60578ce 1 1 #include "vulkan-game.hpp" 2 3 #define GLM_FORCE_RADIANS4 #define GLM_FORCE_DEPTH_ZERO_TO_ONE5 2 6 3 #include <array> … … 62 59 63 60 initVulkan(); 64 initMatrices();65 61 mainLoop(); 66 62 cleanup(); … … 186 182 createImageResources(); 187 183 createFramebuffers(); 184 185 initMatrices(); 188 186 189 187 // TODO: Figure out how much of ubo creation and associated variables should be in the pipeline class … … 505 503 addObjectIndex<ShipVertex>(shipPipeline.getObjects().size(), 506 504 addVertexNormals<ShipVertex>({ 507 {{ 0.5f, -0.5f, 0.5f}, {0.0f, 0.6f, 0.0f}},508 {{ - 0.5f, -0.5f, 0.5f}, {0.0f, 0.6f, 0.0f}},509 {{ - 0.5f, 0.5f, 0.5f}, {0.0f, 0.6f, 0.0f}},510 {{ 0.5f, -0.5f, 0.5f}, {0.0f, 0.6f, 0.0f}},511 {{ - 0.5f, 0.5f, 0.5f}, {0.0f, 0.6f, 0.0f}},512 {{ 0.5f, 0.5f, 0.5f}, {0.0f, 0.6f, 0.0f}},513 514 {{ 0.3f, -0.3f, 0.3f}, {0.0f, 0.0f, 0.7f}},515 {{ -0.3f, -0.3f, 0.3f}, {0.0f, 0.0f, 0.7f}},516 {{ -0.3f, 0.3f, 0.3f}, {0.0f, 0.0f, 0.7f}},517 {{ 0.3f, -0.3f, 0.3f}, {0.0f, 0.0f, 0.7f}},518 {{ -0.3f, 0.3f, 0.3f}, {0.0f, 0.0f, 0.7f}},519 {{ 0.3f, 0.3f, 0.3f}, {0.0f, 0.0f, 0.7f}},505 {{ 40.0f, 40.0f, 72.0f}, {0.0f, 0.6f, 0.0f}}, 506 {{ -40.0f, 40.0f, 80.0f}, {0.0f, 0.6f, 0.0f}}, 507 {{ -40.0f, -40.0f, 80.0f}, {0.0f, 0.6f, 0.0f}}, 508 {{ 40.0f, 40.0f, 72.0f}, {0.0f, 0.6f, 0.0f}}, 509 {{ -40.0f, -40.0f, 80.0f}, {0.0f, 0.6f, 0.0f}}, 510 {{ 40.0f, -40.0f, 72.0f}, {0.0f, 0.6f, 0.0f}}, 511 512 {{ 8.0f, 8.0f, 34.0f}, {0.0f, 0.0f, 0.7f}}, 513 {{ -8.0f, 8.0f, 30.0f}, {0.0f, 0.0f, 0.7f}}, 514 {{ -8.0f, -8.0f, 30.0f}, {0.0f, 0.0f, 0.7f}}, 515 {{ 8.0f, 8.0f, 34.0f}, {0.0f, 0.0f, 0.7f}}, 516 {{ -8.0f, -8.0f, 30.0f}, {0.0f, 0.0f, 0.7f}}, 517 {{ 8.0f, -8.0f, 34.0f}, {0.0f, 0.0f, 0.7f}}, 520 518 })), { 521 519 0, 1, 2, 3, 4, 5, … … 551 549 552 550 float cam_yaw = 0.0f; 553 float cam_pitch = -50.0f;551 float cam_pitch = 0.0f; // -50.0f; 554 552 555 553 mat4 yaw_mat = rotate(mat4(1.0f), radians(-cam_yaw), vec3(0.0f, 1.0f, 0.0f));
Note:
See TracChangeset
for help on using the changeset viewer.