|
|
PixelBullet
0.0.1
A C++ game engine
|
A representation of a Vulkan image, sampler, and view. More...
#include <Image.hpp>
Public Member Functions | |
| Image (VkFilter filter, VkSamplerAddressMode addressMode, VkSampleCountFlagBits samples, VkImageLayout layout, VkImageUsageFlags usage, VkFormat format, uint32_t mipLevels, uint32_t arrayLayers, const VkExtent3D &extent) | |
| WriteDescriptorSet | GetWriteDescriptor (uint32_t binding, VkDescriptorType descriptorType, const std::optional< OffsetSize > &offsetSize) const override |
| std::unique_ptr< Bitmap > | GetBitmap (uint32_t mipLevel=0, uint32_t arrayLayer=0) const |
| const VkExtent3D & | GetExtent () const |
| glm::uvec2 | GetSize () const |
| VkFormat | GetFormat () const |
| VkSampleCountFlagBits | GetSamples () const |
| VkImageUsageFlags | GetUsage () const |
| uint32_t | GetMipLevels () const |
| uint32_t | GetArrayLevels () const |
| VkFilter | GetFilter () const |
| VkSamplerAddressMode | GetAddressMode () const |
| VkImageLayout | GetLayout () const |
| const VkImage & | GetImage () |
| const VkDeviceMemory & | GetMemory () |
| const VkSampler & | GetSampler () const |
| const VkImageView & | GetView () const |
Public Member Functions inherited from PixelBullet::Descriptor | |
Static Public Member Functions | |
| static VkDescriptorSetLayoutBinding | GetDescriptorSetLayout (uint32_t binding, VkDescriptorType descriptorType, VkShaderStageFlags stage, uint32_t count) |
| static uint32_t | GetMipLevels (const VkExtent3D &extent) |
| static VkFormat | FindSupportedFormat (const std::vector< VkFormat > &candidates, VkImageTiling tiling, VkFormatFeatureFlags features) |
| static bool | HasDepth (VkFormat format) |
| static bool | HasStencil (VkFormat format) |
| static void | CreateImage (VkImage &image, VkDeviceMemory &memory, const VkExtent3D &extent, VkFormat format, VkSampleCountFlagBits samples, VkImageTiling tiling, VkImageUsageFlags usage, VkMemoryPropertyFlags properties, uint32_t mipLevels, uint32_t arrayLayers, VkImageType type) |
| static void | CreateImageSampler (VkSampler &sampler, VkFilter filter, VkSamplerAddressMode addressMode, bool anisotropic, uint32_t mipLevels) |
| static void | CreateImageView (const VkImage &image, VkImageView &imageView, VkImageViewType type, VkFormat format, VkImageAspectFlags imageAspect, uint32_t mipLevels, uint32_t baseMipLevel, uint32_t layerCount, uint32_t baseArrayLayer) |
| static void | CreateMipmaps (const VkImage &image, const VkExtent3D &extent, VkFormat format, VkImageLayout dstImageLayout, uint32_t mipLevels, uint32_t baseArrayLayer, uint32_t layerCount) |
| static void | TransitionImageLayout (const VkImage &image, VkFormat format, VkImageLayout srcImageLayout, VkImageLayout dstImageLayout, VkImageAspectFlags imageAspect, uint32_t mipLevels, uint32_t baseMipLevel, uint32_t layerCount, uint32_t baseArrayLayer) |
| static void | InsertImageMemoryBarrier (const CommandBuffer &commandBuffer, const VkImage &image, VkAccessFlags srcAccessMask, VkAccessFlags dstAccessMask, VkImageLayout oldImageLayout, VkImageLayout newImageLayout, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkImageAspectFlags imageAspect, uint32_t mipLevels, uint32_t baseMipLevel, uint32_t layerCount, uint32_t baseArrayLayer) |
| static void | CopyBufferToImage (const VkBuffer &buffer, const VkImage &image, const VkExtent3D &extent, uint32_t layerCount, uint32_t baseArrayLayer) |
| static bool | CopyImage (const VkImage &srcImage, VkImage &dstImage, VkDeviceMemory &dstImageMemory, VkFormat srcFormat, const VkExtent3D &extent, VkImageLayout srcImageLayout, uint32_t mipLevel, uint32_t arrayLayer) |
A representation of a Vulkan image, sampler, and view.
| PixelBullet::Image::Image | ( | VkFilter | filter, |
| VkSamplerAddressMode | addressMode, | ||
| VkSampleCountFlagBits | samples, | ||
| VkImageLayout | layout, | ||
| VkImageUsageFlags | usage, | ||
| VkFormat | format, | ||
| uint32_t | mipLevels, | ||
| uint32_t | arrayLayers, | ||
| const VkExtent3D & | extent ) |
Creates a new image object.
| filter | The magnification/minification filter to apply to lookups. |
| addressMode | The addressing mode for outside [0..1] range. |
| samples | The number of samples per texel. |
| layout | The layout that the image subresources accessible from. |
| usage | The intended usage of the image. |
| format | The format and type of the texel blocks that will be contained in the image. |
| mipLevels | The number of levels of detail available for minified sampling of the image. |
| arrayLayers | The number of layers in the image. |
| extent | The number of data elements in each dimension of the base level. |
|
static |
Find a format in the candidates list that fits the tiling and features required.
| candidates | Formats that are tested for features, in order of preference. |
| tiling | Tiling mode to test features in. |
| features | The features to test for. |
| std::unique_ptr< Bitmap > PixelBullet::Image::GetBitmap | ( | uint32_t | mipLevel = 0, |
| uint32_t | arrayLayer = 0 ) const |
Copies the images pixels from memory to a bitmap. If this method is called from multiple threads at the same time Vulkan will crash!
| mipLevel | The mipmap level index to sample. |
| arrayLayer | The array level to sample. |
|
overridevirtual |
Implements PixelBullet::Descriptor.
|
static |
Gets if a format has a depth component.
| format | The format to check. |
|
static |
Gets if a format has a depth component.
| format | The format to check. |