Changeset 5ea0a37 in opengl-game for sdl-game.cpp


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
  • sdl-game.cpp

    r6486ba8 r5ea0a37  
    465465      objData.model = obj.model_transform * obj.model_base;
    466466      obj.center = vec3(objData.model * vec4(0.0f, 0.0f, 0.0f, 1.0f));
    467 
    468       updateBufferSet(storageBuffers_modelPipeline, i, objData);
    469    }
     467   }
     468
     469   VulkanUtils::copyDataToMemory(device, objects_modelPipeline.data(), storageBuffers_modelPipeline.memory[imageIndex],
     470                                 0, objects_modelPipeline.memorySize(), false);
    470471
    471472   VulkanUtils::copyDataToMemory(device, &object_VP_mats, uniformBuffers_modelPipeline.memory[imageIndex], 0,
Note: See TracChangeset for help on using the changeset viewer.