Changeset 1add0ed in opengl-game
- Timestamp:
- Mar 22, 2020, 10:22:54 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 2ff4d3e
- Parents:
- 22217d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.cpp
r22217d4 r1add0ed 233 233 addObject(modelObjects, modelPipeline, 234 234 addObjectIndex<ModelVertex>(modelObjects.size(), { 235 {{-0.5f, -0.5f, -2.0f}, {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f}},236 {{ 0.5f, -0.5f, -2.0f}, {0.0f, 1.0f, 0.0f}, {1.0f, 1.0f}},237 {{ 0.5f, 0.5f, -2.0f}, {0.0f, 0.0f, 1.0f}, {1.0f, 0.0f}},238 {{-0.5f, 0.5f, -2.0f}, {1.0f, 1.0f, 1.0f}, {0.0f, 0.0f}}235 {{-0.5f, -0.5f, 0.0f}, {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f}}, 236 {{ 0.5f, -0.5f, 0.0f}, {0.0f, 1.0f, 0.0f}, {1.0f, 1.0f}}, 237 {{ 0.5f, 0.5f, 0.0f}, {0.0f, 0.0f, 1.0f}, {1.0f, 0.0f}}, 238 {{-0.5f, 0.5f, 0.0f}, {1.0f, 1.0f, 1.0f}, {0.0f, 0.0f}} 239 239 }), { 240 240 0, 1, 2, 2, 3, 0 … … 243 243 }, false); 244 244 245 modelObjects.back().model_base = 246 translate(mat4(1.0f), vec3(0.0f, 0.0f, -2.0f)); 247 248 updateObject(modelObjects, modelPipeline, modelObjects.size() - 1); 249 245 250 addObject(modelObjects, modelPipeline, 246 251 addObjectIndex<ModelVertex>(modelObjects.size(), { 247 {{-0.5f, -0.5f, -1.5f}, {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f}},248 {{ 0.5f, -0.5f, -1.5f}, {0.0f, 1.0f, 0.0f}, {1.0f, 1.0f}},249 {{ 0.5f, 0.5f, -1.5f}, {0.0f, 0.0f, 1.0f}, {1.0f, 0.0f}},250 {{-0.5f, 0.5f, -1.5f}, {1.0f, 1.0f, 1.0f}, {0.0f, 0.0f}}252 {{-0.5f, -0.5f, 0.0f}, {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f}}, 253 {{ 0.5f, -0.5f, 0.0f}, {0.0f, 1.0f, 0.0f}, {1.0f, 1.0f}}, 254 {{ 0.5f, 0.5f, 0.0f}, {0.0f, 0.0f, 1.0f}, {1.0f, 0.0f}}, 255 {{-0.5f, 0.5f, 0.0f}, {1.0f, 1.0f, 1.0f}, {0.0f, 0.0f}} 251 256 }), { 252 257 0, 1, 2, 2, 3, 0 … … 254 259 mat4(1.0f) 255 260 }, false); 261 262 modelObjects.back().model_base = 263 translate(mat4(1.0f), vec3(0.0f, 0.0f, -1.5f)); 264 265 updateObject(modelObjects, modelPipeline, modelObjects.size() - 1); 256 266 257 267 modelPipeline.createDescriptorSetLayout(); … … 623 633 addObject(modelObjects, modelPipeline, 624 634 addObjectIndex<ModelVertex>(modelObjects.size(), { 625 {{-0.5f, -0.5f, zOffset}, {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f}},626 {{ 0.5f, -0.5f, zOffset}, {0.0f, 1.0f, 0.0f}, {1.0f, 1.0f}},627 {{ 0.5f, 0.5f, zOffset}, {0.0f, 0.0f, 1.0f}, {1.0f, 0.0f}},628 {{-0.5f, 0.5f, zOffset}, {1.0f, 1.0f, 1.0f}, {0.0f, 0.0f}}635 {{-0.5f, -0.5f, 0.0f}, {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f}}, 636 {{ 0.5f, -0.5f, 0.0f}, {0.0f, 1.0f, 0.0f}, {1.0f, 1.0f}}, 637 {{ 0.5f, 0.5f, 0.0f}, {0.0f, 0.0f, 1.0f}, {1.0f, 0.0f}}, 638 {{-0.5f, 0.5f, 0.0f}, {1.0f, 1.0f, 1.0f}, {0.0f, 0.0f}} 629 639 }), { 630 640 0, 1, 2, 2, 3, 0 … … 632 642 mat4(1.0f) 633 643 }, true); 644 645 modelObjects.back().model_base = 646 translate(mat4(1.0f), vec3(0.0f, 0.0f, zOffset)); 647 648 updateObject(modelObjects, modelPipeline, modelObjects.size() - 1); 634 649 } else { 635 650 cout << "Key event detected" << endl;
Note:
See TracChangeset
for help on using the changeset viewer.