Changeset 5ba732a in opengl-game for vulkan-game.hpp


Ignore:
Timestamp:
Apr 19, 2020, 1:55:16 AM (4 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
6104594
Parents:
4994692
Message:

Add a modified flag to SceneObject and, instead of copying an object's data to the graphics card immediately after it is updated, instead set the flag to true and update all modified objects at once right before rendering

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.hpp

    r4994692 r5ba732a  
    7777   mat4 model_base;
    7878   mat4 model_transform;
     79
     80   bool modified;
    7981
    8082   // TODO: Figure out if I should make child classes that have these fields instead of putting them in the
     
    295297   }
    296298
    297    objects.push_back({ vertices, indices, ssbo, mat4(1.0f), mat4(1.0f) });
     299   objects.push_back({ vertices, indices, ssbo, mat4(1.0f), mat4(1.0f), false });
    298300
    299301   SceneObject<VertexType, SSBOType>& obj = objects.back();
     
    333335
    334336   pipeline.updateObject(index, obj.ssbo);
     337
     338   obj.modified = false;
    335339}
    336340
Note: See TracChangeset for help on using the changeset viewer.