The Joe Engine
Joe's engine programming playground
|
The JEVulkanDescriptor class. More...
#include <VulkanDescriptor.h>
Public Member Functions | |
JEVulkanDescriptor ()=delete | |
Default constructor (deleted). More... | |
JEVulkanDescriptor (VkPhysicalDevice physicalDevice, VkDevice device, uint32_t numSwapChainImages, const std::vector< std::vector< VkImageView >> &imageViews, const std::vector< VkSampler > &samplers, const std::vector< uint32_t > &bufferSizes, const std::vector< uint32_t > &ssboSizes, VkDescriptorSetLayout descSetLayout, PipelineType type) | |
Constructor. More... | |
~JEVulkanDescriptor ()=default | |
Destructor (default). More... | |
void | Cleanup (VkDevice device) |
void | BindDescriptorSets (VkCommandBuffer commandBuffer, VkPipelineLayout pipelineLayout, uint32_t descrSetIndex, uint32_t imageIndex) const |
Bind descriptor sets. More... | |
void | UpdateDescriptorSets (VkDevice device, uint32_t imageIndex, const std::vector< const void * > &buffers, const std::vector< uint32_t > &bufferSizes, const std::vector< const void * > &ssboBuffers, const std::vector< uint32_t > &ssboSizes) |
Update descriptor sets. More... | |
The JEVulkanDescriptor class.
Class that manages descriptor sets and device memory buffers for materials in the Joe Engine.
|
delete |
Default constructor (deleted).
|
inline |
Constructor.
Creates all necessary Vulkan descriptor objects (pool and sets) and allocates all necessary buffer objects.
|
default |
Destructor (default).
|
inline |
Bind descriptor sets.
Binds the specified descriptor set. Called during command buffer recording.
commandBuffer | the command buffer to record the bind command to. |
pipelineLayout | the pipeline layout for the descriptor set. |
descrSetIndex | the specific descriptor set index to bind. |
imageIndex | the currently active swap chain image index. |
void JoeEngine::JEVulkanDescriptor::Cleanup | ( | VkDevice | device | ) |
Cleanup all Vulkan objects and memory.
device | the Vulkan logical device to clean up with. |
void JoeEngine::JEVulkanDescriptor::UpdateDescriptorSets | ( | VkDevice | device, |
uint32_t | imageIndex, | ||
const std::vector< const void * > & | buffers, | ||
const std::vector< uint32_t > & | bufferSizes, | ||
const std::vector< const void * > & | ssboBuffers, | ||
const std::vector< uint32_t > & | ssboSizes | ||
) |
Update descriptor sets.
Updates all descriptor set uniform and shader storage memory buffers to the data provided.
device | the Vulkan logical device. |
imageIndex | the currently active swap chain image index. |
buffers | list of new uniform buffer data to copy to the GPU. |
bufferSizes | size of each element in the parameter 'buffers'. |
ssboBuffers | list of new shader storage buffer data to copy to the GPU. |
ssboSizes | size of each element in the parameter 'ssboBuffers'. |