Changeset c074f81 in opengl-game for sdl-game.hpp


Ignore:
Timestamp:
Jun 8, 2021, 2:29:12 PM (3 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl
Children:
8aa4888
Parents:
567fa88
Message:

Change VulkanUtils::copyDataToMemory() to always require a size and to optionally flush the memory. Also add a VulkanUtils::copyDataToMappedMemory function that does the same thing, but assumes the data is already mapped.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sdl-game.hpp

    r567fa88 rc074f81  
    383383void VulkanGame::updateBufferSet(BufferSet& set, size_t objIndex, SSBOType& ssbo) {
    384384   for (size_t i = 0; i < set.memory.size(); i++) {
    385       VulkanUtils::copyDataToMemory(device, ssbo, set.memory[i], objIndex * sizeof(SSBOType));
     385      VulkanUtils::copyDataToMemory(device, &ssbo, set.memory[i], objIndex * sizeof(SSBOType), sizeof(ssbo), false);
    386386   }
    387387}
Note: See TracChangeset for help on using the changeset viewer.