Changeset b7fc3c2 in opengl-game for vulkan-game.hpp
- Timestamp:
- Jun 10, 2021, 2:58:54 PM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- c1ec4f6
- Parents:
- bb76950
- git-author:
- Dmitry Portnoy <dportnoy@…> (06/10/21 14:53:52)
- git-committer:
- Dmitry Portnoy <dportnoy@…> (06/10/21 14:58:54)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.hpp
rbb76950 rb7fc3c2 459 459 460 460 template<class VertexType, class SSBOType> 461 void updateObject(SceneObject<VertexType, SSBOType>& obj);462 463 template<class VertexType, class SSBOType>464 461 void updateObjectVertices(GraphicsPipeline_Vulkan<VertexType>& pipeline, 465 462 SceneObject<VertexType, SSBOType>& obj, size_t index); … … 508 505 } 509 506 510 // TODO: Right now, it's basically necessary to pass the identity matrix in for ssbo.model 511 // and to change the model matrix later by setting model_transform and then calling updateObject()507 // TODO: Right now, it's basically necessary to pass the identity matrix in for ssbo.model and to change 508 // the model matrix later by setting model_transform and then calculating the new ssbo.model. 512 509 // Figure out a better way to allow the model matrix to be set during object creation 513 510 template<class VertexType, class SSBOType> … … 517 514 VulkanBuffer<SSBOType>& objectBuffer, SSBOType ssbo) { 518 515 // TODO: Use the model field of ssbo to set the object's model_base 519 // currently, the passed in model is useless since it gets overridden in updateObject() anyway516 // currently, the passed-in model is useless since it gets overridden when ssbo.model is recalculated 520 517 size_t numVertices = pipeline.getNumVertices(); 521 518 … … 624 621 } 625 622 626 // TODO: Just pass in the single object instead of a list of all of them627 template<class VertexType, class SSBOType>628 void VulkanGame::updateObject(SceneObject<VertexType, SSBOType>& obj) {629 obj.ssbo.model = obj.model_transform * obj.model_base;630 obj.center = vec3(obj.ssbo.model * vec4(0.0f, 0.0f, 0.0f, 1.0f));631 632 obj.modified = false;633 }634 635 623 template<class VertexType, class SSBOType> 636 624 void VulkanGame::updateObjectVertices(GraphicsPipeline_Vulkan<VertexType>& pipeline,
Note:
See TracChangeset
for help on using the changeset viewer.