VulkanEngine 0.1
Graphics engine using Vulkan
Loading...
Searching...
No Matches
VulkanEngine::ShaderImage< format, image_type, tiling, sample_count_flags > Class Template Reference
Inheritance diagram for VulkanEngine::ShaderImage< format, image_type, tiling, sample_count_flags >:
VulkanEngine::Image< format, image_type, tiling, sample_count_flags > VulkanEngine::Descriptor VulkanEngine::StagedBufferDestination VulkanEngine::ImageBase VulkanEngine::BufferBase VulkanEngine::SingleUsageCommandBuffer

Public Member Functions

 ShaderImage (vk::ImageLayout initial_layout, vk::ImageUsageFlags usage_flags, VmaMemoryUsage vma_memory_usage, uint32_t width, uint32_t height, uint32_t depth, size_t pixel_size, uint32_t binding, uint32_t descriptor_count, vk::DescriptorType descriptor_type, vk::ShaderStageFlags shader_stage_flags)
 
 ~ShaderImage ()
 Destructor.
 
void createSampler ()
 Create image sampler.
 
vk::DescriptorImageInfo getVkDescriptorImageInfo () const
 Get descriptor image info.
 
virtual void appendVkDescriptorSets (std::shared_ptr< std::vector< vk::WriteDescriptorSet > > write_descriptor_sets, std::shared_ptr< std::vector< vk::CopyDescriptorSet > > copy_descriptor_sets, const vk::DescriptorSet &destination_set)
 Append descriptor sets to this shader image.
 
- Public Member Functions inherited from VulkanEngine::Image< format, image_type, tiling, sample_count_flags >
 Image (vk::ImageLayout initial_layout, vk::ImageUsageFlags usage_flags, VmaMemoryUsage vma_memory_usage, uint32_t _width, uint32_t _height, uint32_t _depth, size_t pixel_size, bool generate_mip_maps)
 
virtual ~Image ()
 Destructor.
 
void setImageData (const void *data)
 
void createImageView (vk::ImageViewType image_view_type, vk::ImageAspectFlags image_aspect_flags)
 
void transitionImageLayout (vk::ImageLayout new_layout, const vk::CommandBuffer &command_buffer=nullptr)
 
const vk::Format getVkFormat () const
 Get the vk::Format of the image.
 
const vk::SampleCountFlagBits getVkSampleCountFlags () const
 Get vk::SampleCountFlagBits.
 
virtual vk::Image getVkImage () const
 Get the interal vulkan image.
 
virtual vk::ImageView getVkImageView () const
 Get the vk::ImageView.
 
- Public Member Functions inherited from VulkanEngine::BufferBase
virtual void updateBuffer (const void *_data, size_t _data_size)
 
- Public Member Functions inherited from VulkanEngine::ImageBase
 ImageBase ()
 Contructor.
 
virtual ~ImageBase ()
 Destructor.
 
virtual vk::Image getVkImage () const =0
 Get the interal vulkan image.
 
virtual vk::ImageView getVkImageView () const =0
 Get the internal vulkan image view.
 
- Public Member Functions inherited from VulkanEngine::Descriptor
 Descriptor (uint32_t _binding, uint32_t _desciptor_count, vk::DescriptorType _vk_descriptor_type, vk::ShaderStageFlags _vk_shader_stage_flags)
 Constructor.
 
 ~Descriptor ()
 Destructor.
 
const vk::DescriptorSetLayoutBinding getVkDescriptorSetLayoutBinding () const
 
const vk::DescriptorPoolSize getVkDescriptorPoolSize () const
 
virtual void appendVkDescriptorSets (std::shared_ptr< std::vector< vk::WriteDescriptorSet > > write_descriptor_sets, std::shared_ptr< std::vector< vk::CopyDescriptorSet > > copy_descriptor_sets, const vk::DescriptorSet &destination_set)=0
 

Additional Inherited Members

- Protected Member Functions inherited from VulkanEngine::Image< format, image_type, tiling, sample_count_flags >
virtual void insertTransferCommand (const vk::CommandBuffer &command_buffer, const vk::Buffer &source_buffer)
 
virtual size_t getStagingBufferSize () const
 
- Protected Member Functions inherited from VulkanEngine::SingleUsageCommandBuffer
void beginSingleUsageCommandBuffer ()
 Creates and starts recording the command buffer.
 
void endSingleUsageCommandBuffer ()
 Stops recording and submits the command buffer.
 
- Protected Attributes inherited from VulkanEngine::Image< format, image_type, tiling, sample_count_flags >
uint32_t width
 The width of the Image.
 
uint32_t height
 The height of the Image.
 
uint32_t depth
 The depth of the Image.
 
size_t data_size
 The total size of Image's data.
 
uint32_t mipmap_levels
 The number of mipmap images to generate.
 
vk::ImageLayout vk_image_layout
 The current vk::ImageLayout.
 
vk::Image vk_image
 Internal vk_image.
 
vk::ImageView vk_image_view
 The vk::ImageView created in createImageView().
 
VkImageCreateInfo image_create_info
 VkImageCreateInfo.
 
- Protected Attributes inherited from VulkanEngine::BufferBase
VmaAllocation vma_allocation
 
- Protected Attributes inherited from VulkanEngine::SingleUsageCommandBuffer
vk::CommandBuffer single_use_command_buffer
 The single use command buffer.
 
- Protected Attributes inherited from VulkanEngine::Descriptor
uint32_t binding
 The binding index.
 
uint32_t descriptor_count
 The number of descriptors represented.
 
vk::DescriptorType vk_descriptor_type
 The type of descriptor represented.
 
vk::ShaderStageFlags vk_shader_stage_flags
 

Constructor & Destructor Documentation

◆ ShaderImage()

template<vk::Format format, vk::ImageType image_type, vk::ImageTiling tiling, vk::SampleCountFlagBits sample_count_flags>
VulkanEngine::ShaderImage< format, image_type, tiling, sample_count_flags >::ShaderImage ( vk::ImageLayout  initial_layout,
vk::ImageUsageFlags  usage_flags,
VmaMemoryUsage  vma_memory_usage,
uint32_t  width,
uint32_t  height,
uint32_t  depth,
size_t  pixel_size,
uint32_t  binding,
uint32_t  descriptor_count,
vk::DescriptorType  descriptor_type,
vk::ShaderStageFlags  shader_stage_flags 
)

Constructor.

Parameters
initial_layoutThe initial vk::ImageLayout of the image.
usage_flagsvk::ImageUsageFlags specifying how the image will be used.
vma_memory_usageVmaMemoryUsage flags to pass to the Vulkan memory allocator library when allocating the image.
_widthThe width of the image.
_heightThe height of the image.
_depthThe depth of the image.
pixel_sizeThe data size of a single pixel in the image.

Member Function Documentation

◆ appendVkDescriptorSets()

template<vk::Format format, vk::ImageType image_type, vk::ImageTiling tiling, vk::SampleCountFlagBits sample_count_flags>
void VulkanEngine::ShaderImage< format, image_type, tiling, sample_count_flags >::appendVkDescriptorSets ( std::shared_ptr< std::vector< vk::WriteDescriptorSet > >  write_descriptor_sets,
std::shared_ptr< std::vector< vk::CopyDescriptorSet > >  copy_descriptor_sets,
const vk::DescriptorSet &  destination_set 
)
virtual

Append descriptor sets to this shader image.

Implements VulkanEngine::Descriptor.


The documentation for this class was generated from the following files: