Changeset 8dcbf62 in opengl-game for vulkan-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
  • vulkan-game.hpp

    r8aa4888 r8dcbf62  
    446446                                                   GraphicsPipeline_Vulkan<VertexType>& pipeline,
    447447                                                   const vector<VertexType>& vertices, vector<uint16_t> indices,
    448                                                    SSBOType ssbo);
     448                                                   VulkanBuffer<SSBOType>& objectBuffer, SSBOType ssbo);
    449449
    450450      template<class VertexType>
     
    554554                                                         GraphicsPipeline_Vulkan<VertexType>& pipeline,
    555555                                                         const vector<VertexType>& vertices, vector<uint16_t> indices,
    556                                                          SSBOType ssbo) {
     556                                                         VulkanBuffer<SSBOType>& objectBuffer, SSBOType ssbo) {
    557557   // TODO: Use the model field of ssbo to set the object's model_base
    558558   // currently, the passed in model is useless since it gets overridden in updateObject() anyway
     
    564564
    565565   objects.push_back({ vertices, indices, ssbo, mat4(1.0f), mat4(1.0f), false });
     566   objectBuffer.add(ssbo);
    566567
    567568   SceneObject<VertexType, SSBOType>& obj = objects.back();
     
    570571   // with a boolean being passed in here, so that I don't have to rely on checking the specific object
    571572   // type
     573   // TODO: Actually, I've already defined a no-op centerObject method for explosions
     574   // Maybe I should do the same for lasers and remove this conditional altogether
    572575   if (!is_same_v<VertexType, LaserVertex> && !is_same_v<VertexType, ExplosionVertex>) {
    573576      centerObject(obj);
Note: See TracChangeset for help on using the changeset viewer.