Changeset c1ec4f6 in opengl-game for sdl-game.cpp
- Timestamp:
- Jun 11, 2021, 2:35:32 PM (3 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- 6486ba8
- Parents:
- b7fc3c2
- git-author:
- Dmitry Portnoy <dportnoy@…> (06/10/21 21:37:02)
- git-committer:
- Dmitry Portnoy <dportnoy@…> (06/11/21 14:35:32)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sdl-game.cpp
rb7fc3c2 rc1ec4f6 123 123 SceneObject<ModelVertex, SSBO_ModelObject>* texturedSquare = nullptr; 124 124 125 // TODO: Ideally, avoid having to make the squares as modified upon creation126 127 125 texturedSquare = &addObject(modelObjects, modelPipeline, 128 126 addObjectIndex<ModelVertex>(modelObjects.size(), … … 143 141 texturedSquare->model_base = 144 142 translate(mat4(1.0f), vec3(0.0f, 0.0f, -2.0f)); 145 texturedSquare->modified = true;146 143 147 144 texturedSquare = &addObject(modelObjects, modelPipeline, … … 162 159 texturedSquare->model_base = 163 160 translate(mat4(1.0f), vec3(0.0f, 0.0f, -1.5f)); 164 texturedSquare->modified = true;165 161 166 162 modelPipeline.createDescriptorSetLayout(); … … 385 381 texturedSquare.model_base = 386 382 translate(mat4(1.0f), vec3(0.0f, 0.0f, zOffset)); 387 texturedSquare.modified = true;388 383 // START UNREVIEWED SECTION 389 384 // END UNREVIEWED SECTION … … 467 462 translate(mat4(1.0f), vec3(0.0f, -2.0f, -0.0f)) * 468 463 rotate(mat4(1.0f), curTime * radians(90.0f), vec3(0.0f, 0.0f, 1.0f)); 469 obj.modified = true; 470 471 if (obj.modified) { 472 objData.model = obj.model_transform * obj.model_base; 473 obj.center = vec3(objData.model * vec4(0.0f, 0.0f, 0.0f, 1.0f)); 474 475 obj.modified = false; 476 477 updateBufferSet(storageBuffers_modelPipeline, i, objData); 478 } 464 465 objData.model = obj.model_transform * obj.model_base; 466 obj.center = vec3(objData.model * vec4(0.0f, 0.0f, 0.0f, 1.0f)); 467 468 updateBufferSet(storageBuffers_modelPipeline, i, objData); 479 469 } 480 470
Note:
See TracChangeset
for help on using the changeset viewer.