Changeset 8dcbf62 in opengl-game for sdl-game.hpp


Ignore:
Timestamp:
Jun 8, 2021, 11:19:16 PM (3 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl
Children:
6bac215
Parents:
8aa4888
git-author:
Dmitry Portnoy <dportnoy@…> (06/08/21 20:38:16)
git-committer:
Dmitry Portnoy <dportnoy@…> (06/08/21 23:19:16)
Message:

Add some functionality to VulkanBuffer, and modify VulkanGame::addObject() to call VulkanBuffer::add()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sdl-game.hpp

    r8aa4888 r8dcbf62  
    311311                                                   GraphicsPipeline_Vulkan<VertexType>& pipeline,
    312312                                                   const vector<VertexType>& vertices, vector<uint16_t> indices,
    313                                                    SSBOType ssbo);
     313                                                   VulkanBuffer<SSBOType>& objectBuffer, SSBOType ssbo);
    314314
    315315      template<class VertexType>
     
    399399                                                         GraphicsPipeline_Vulkan<VertexType>& pipeline,
    400400                                                         const vector<VertexType>& vertices, vector<uint16_t> indices,
    401                                                          SSBOType ssbo) {
     401                                                         VulkanBuffer<SSBOType>& objectBuffer, SSBOType ssbo) {
    402402   // TODO: Use the model field of ssbo to set the object's model_base
    403403   // currently, the passed in model is useless since it gets overridden in updateObject() anyway
     
    409409
    410410   objects.push_back({ vertices, indices, ssbo, mat4(1.0f), mat4(1.0f), false });
     411   objectBuffer.add(ssbo);
    411412
    412413   SceneObject<VertexType, SSBOType>& obj = objects.back();
     
    415416   // with a boolean being passed in here, so that I don't have to rely on checking the specific object
    416417   // type
     418   // TODO: Actually, I've already defined a no-op centerObject method for explosions
     419   // Maybe I should do the same for lasers and remove this conditional altogether
    417420   if (!is_same_v<VertexType, LaserVertex> && !is_same_v<VertexType, ExplosionVertex>) {
    418421      centerObject(obj);
Note: See TracChangeset for help on using the changeset viewer.