|
| | BackendTextureVulkan (std::shared_ptr< BackendRendererVulkan > renderer, VkImageUsageFlags additionalUsageFlags=0) |
| | Constructor.
|
| bool | loadTextureOnly (Vector2u size, const std::uint8_t *pixels, bool smooth) override |
| | Loads the texture from an array of 32-bits RGBA pixels, but don't take ownership of the pixels.
|
| VkImage | getInternalImage () const |
| | Returns the internal image.
|
| VkImageView | getInternalImageView () const |
| | Returns the view of the internal image.
|
|
const std::shared_ptr< ImageResources > & | getImageResources () const |
|
| BackendTexture (const BackendTexture &)=delete |
|
| BackendTexture (BackendTexture &&)=delete |
|
BackendTexture & | operator= (const BackendTexture &)=delete |
|
BackendTexture & | operator= (BackendTexture &&)=delete |
|
| BackendTexture ()=default |
| | Default constructor.
|
|
virtual | ~BackendTexture ()=default |
| | Virtual destructor.
|
| bool | load (Vector2u size, std::unique_ptr< std::uint8_t[]> pixels, bool smooth) |
| | Loads the texture from an array of 32-bits RGBA pixels.
|
| Vector2u | getSize () const |
| | Returns the size of the entire image.
|
| virtual void | setSmooth (bool smooth) |
| | Changes whether the smooth filter is enabled or not.
|
| bool | isSmooth () const |
| | Returns whether the smooth filter is enabled or not.
|
| bool | isTransparentPixel (Vector2u pixel) const |
| | Checks if a certain pixel is transparent.
|
| const std::uint8_t * | getPixels () const |
| | Returns a pointer to the pixels (read-only).
|
Texture implementation that uses Vulkan.
The image has the VK_FORMAT_R8G8B8A8_UNORM format and is kept in the VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL layout.
Loading the texture submits the upload to the queue without waiting for it to finish. Work that accesses the image must be submitted to the same queue, with a dependency on VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT as source stage.