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


Ignore:
Timestamp:
Jun 11, 2021, 10:05:25 PM (3 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl
Children:
90880fb
Parents:
6486ba8
Message:

Add a function to VulkanBuffer to return a pointer to the buffer memory, and replace the use of updateBufferSet with copyDataToMemory to update all the data for a single pipeline in one call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.hpp

    r6486ba8 r5ea0a37  
    432432                           bool copyData);
    433433
    434       template<class SSBOType>
    435       void updateBufferSet(BufferSet& set, size_t objIndex, SSBOType& ssbo);
    436 
    437434      // TODO: Since addObject() returns a reference to the new object now,
    438435      // stop using objects.back() to access the object that was just created
     
    490487
    491488// End of specialized no-op functions
    492 
    493 // TODO: See if it makes sense to pass in the current swapchain index instead of updating all of them
    494 template<class SSBOType>
    495 void VulkanGame::updateBufferSet(BufferSet& set, size_t objIndex, SSBOType& ssbo) {
    496    for (size_t i = 0; i < set.memory.size(); i++) {
    497       VulkanUtils::copyDataToMemory(device, &ssbo, set.memory[i], objIndex * sizeof(SSBOType), sizeof(ssbo), false);
    498    }
    499 }
    500489
    501490// TODO: Right now, it's basically necessary to pass the identity matrix in for ssbo.model and to change
Note: See TracChangeset for help on using the changeset viewer.