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

    r567fa88 rc074f81  
    3939// TODO: Consider if there is a better way of dealing with all the vertex types and ssbo types, maybe
    4040// by consolidating some and trying to keep new ones to a minimum
    41 
    42 struct OverlayVertex {
    43    vec3 pos;
    44    vec2 texCoord;
    45 };
    4641
    4742struct ModelVertex {
     
    546541void VulkanGame::updateBufferSet(BufferSet& set, size_t objIndex, SSBOType& ssbo) {
    547542   for (size_t i = 0; i < set.memory.size(); i++) {
    548       VulkanUtils::copyDataToMemory(device, ssbo, set.memory[i], objIndex * sizeof(SSBOType));
     543      VulkanUtils::copyDataToMemory(device, &ssbo, set.memory[i], objIndex * sizeof(SSBOType), sizeof(ssbo), false);
    549544   }
    550545}
Note: See TracChangeset for help on using the changeset viewer.