Changeset 8aa4888 in opengl-game
- Timestamp:
- Jun 8, 2021, 3:21:53 PM (3 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- 8dcbf62
- Parents:
- c074f81
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sdl-game.cpp
rc074f81 r8aa4888 1115 1115 } 1116 1116 1117 void VulkanGame::createBufferSet(VkDeviceSize bufferSize, VkBufferUsageFlags flags, VkMemoryPropertyFlags properties,1117 void VulkanGame::createBufferSet(VkDeviceSize bufferSize, VkBufferUsageFlags usages, VkMemoryPropertyFlags properties, 1118 1118 BufferSet& set) { 1119 set.usages = usages; 1120 set.properties = properties; 1121 1119 1122 set.buffers.resize(swapChainImageCount); 1120 1123 set.memory.resize(swapChainImageCount); … … 1122 1125 1123 1126 for (size_t i = 0; i < swapChainImageCount; i++) { 1124 VulkanUtils::createBuffer(device, physicalDevice, bufferSize, flags, properties, set.buffers[i], set.memory[i]);1127 VulkanUtils::createBuffer(device, physicalDevice, bufferSize, usages, properties, set.buffers[i], set.memory[i]); 1125 1128 1126 1129 set.infoSet[i].buffer = set.buffers[i]; -
sdl-game.hpp
rc074f81 r8aa4888 20 20 21 21 #include "consts.hpp" 22 #include "game-gui-sdl.hpp" 22 23 #include "vulkan-utils.hpp" 24 #include "graphics-pipeline_vulkan.hpp" 23 25 #include "vulkan-buffer.hpp" 24 #include "graphics-pipeline_vulkan.hpp"25 #include "game-gui-sdl.hpp"26 26 27 27 using namespace glm; … … 59 59 unsigned int objIndex; 60 60 }; 61 62 // Currently using these as the dynamic UBO types as well 63 // TODO: Rename them to something more general 61 64 62 65 struct SSBO_ModelObject { … … 83 86 vector<VkDeviceMemory> memory; 84 87 vector<VkDescriptorBufferInfo> infoSet; 88 VkBufferUsageFlags usages; 89 VkMemoryPropertyFlags properties; 85 90 }; 86 91 … … 289 294 // TODO: Maybe move these to a different class, possibly VulkanBuffer or some new related class 290 295 291 void createBufferSet(VkDeviceSize bufferSize, VkBufferUsageFlags flags, VkMemoryPropertyFlags properties,296 void createBufferSet(VkDeviceSize bufferSize, VkBufferUsageFlags usages, VkMemoryPropertyFlags properties, 292 297 BufferSet& set); 293 298 -
vulkan-game.cpp
rc074f81 r8aa4888 1942 1942 } 1943 1943 1944 void VulkanGame::createBufferSet(VkDeviceSize bufferSize, VkBufferUsageFlags flags, VkMemoryPropertyFlags properties,1944 void VulkanGame::createBufferSet(VkDeviceSize bufferSize, VkBufferUsageFlags usages, VkMemoryPropertyFlags properties, 1945 1945 BufferSet& set) { 1946 set.usages = usages; 1947 set.properties = properties; 1948 1946 1949 set.buffers.resize(swapChainImageCount); 1947 1950 set.memory.resize(swapChainImageCount); … … 1949 1952 1950 1953 for (size_t i = 0; i < swapChainImageCount; i++) { 1951 VulkanUtils::createBuffer(device, physicalDevice, bufferSize, flags, properties, set.buffers[i], set.memory[i]);1954 VulkanUtils::createBuffer(device, physicalDevice, bufferSize, usages, properties, set.buffers[i], set.memory[i]); 1952 1955 1953 1956 set.infoSet[i].buffer = set.buffers[i]; -
vulkan-game.hpp
rc074f81 r8aa4888 23 23 #include "consts.hpp" 24 24 #include "utils.hpp" 25 #include "game-gui-sdl.hpp" 25 26 #include "vulkan-utils.hpp" 27 #include "graphics-pipeline_vulkan.hpp" 26 28 #include "vulkan-buffer.hpp" 27 #include "graphics-pipeline_vulkan.hpp"28 #include "game-gui-sdl.hpp"29 29 30 30 using namespace glm; … … 102 102 vector<VkDeviceMemory> memory; 103 103 vector<VkDescriptorBufferInfo> infoSet; 104 VkBufferUsageFlags usages; 105 VkMemoryPropertyFlags properties; 104 106 }; 105 107 … … 427 429 // TODO: Maybe move these to a different class, possibly VulkanBuffer or some new related class 428 430 429 void createBufferSet(VkDeviceSize bufferSize, VkBufferUsageFlags flags, VkMemoryPropertyFlags properties,431 void createBufferSet(VkDeviceSize bufferSize, VkBufferUsageFlags usages, VkMemoryPropertyFlags properties, 430 432 BufferSet& set); 431 433
Note:
See TracChangeset
for help on using the changeset viewer.