#include <texture.h>
Public Member Functions | |
| TextureCube (Core &core) | |
| virtual | ~TextureCube () override |
| bool | init (const SurfaceDescriptor &descriptor, int mipCount, const glm::vec4 &clearColor, VkImageUsageFlags requiredFlags, utility::ErrorState &errorState) |
| const glm::vec2 | getSize () const |
| int | getWidth () const |
| int | getHeight () const |
| virtual uint | getLayerCount () const override |
| virtual uint | getMipLevels () const override |
| virtual const ImageData & | getHandle () const override |
| virtual ImageData & | getHandle () override |
| bool | init (const SurfaceDescriptor &descriptor, bool mipCount, const glm::vec4 &clearColor, VkImageUsageFlags requiredFlags, utility::ErrorState &errorState)=delete |
Public Member Functions inherited from Texture | |
| Texture (Core &core) | |
| virtual | ~Texture () |
| VkFormat | getFormat () const |
| const SurfaceDescriptor & | getDescriptor () const |
| RenderService & | getRenderService () |
| const RenderService & | getRenderService () const |
| virtual void | onDestroy () override |
Public Member Functions inherited from Resource | |
| Resource () | |
Public Member Functions inherited from Object | |
| Object () | |
| virtual | ~Object () |
| virtual bool | init (utility::ErrorState &errorState) |
| Object (Object &)=delete | |
| Object & | operator= (const Object &)=delete |
| Object (Object &&)=delete | |
| Object & | operator= (Object &&)=delete |
Static Public Attributes | |
| static constexpr const uint | layerCount = 6 |
Protected Attributes | |
| ImageData | mImageData = { TextureCube::layerCount } |
| Cube Texture vulkan image buffers. More... | |
| uint32 | mMipLevels = 1 |
| Total number of generated mip-maps. More... | |
Protected Attributes inherited from Texture | |
| RenderService & | mRenderService |
| Reference to the render service. More... | |
| SurfaceDescriptor | mDescriptor |
| Texture description. More... | |
| VkFormat | mFormat = VK_FORMAT_UNDEFINED |
| Vulkan texture format. More... | |
| VkClearColorValue | mClearColor = { 0.0f, 0.0f, 0.0f, 0.0f } |
| Color used for clearing the texture. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
| static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Public Attributes inherited from Texture | |
| nap::Signal | textureDestroyed |
| Signal that is triggered before texture is destroyed. More... | |
Public Attributes inherited from Object | |
| std::string | mID |
| Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Protected Member Functions inherited from Texture | |
| virtual void | clear (VkCommandBuffer commandBuffer) |
| void | requestClear () |
Cube texture base class. A cube texture is a six-layer image, where each layer represents one side
Cube image layers are addressed and oriented as follows:
| TextureCube | ( | Core & | core | ) |
|
overridevirtual |
|
overridevirtual |
Implements Texture.
|
overridevirtual |
Note: This function should actually be protected but is required by nap::CubeRenderTarget in the naprenderadvanced module.
Implements Texture.
| int getHeight | ( | ) | const |
|
overridevirtual |
Implements Texture.
|
overridevirtual |
Implements Texture.
| const glm::vec2 getSize | ( | ) | const |
| int getWidth | ( | ) | const |
|
delete |
| bool init | ( | const SurfaceDescriptor & | descriptor, |
| int | mipCount, | ||
| const glm::vec4 & | clearColor, | ||
| VkImageUsageFlags | requiredFlags, | ||
| utility::ErrorState & | errorState | ||
| ) |
Creates the texture on the GPU using the provided settings. The texture is cleared to 'ClearColor'. The Vulkan image usage flags are derived from texture usage.
| descriptor | texture description. |
| mipCount | number of mip-maps to generate when cubemap is created |
| clearColor | the color to clear the texture with. |
| requiredFlags | image usage flags that are required, 0 = no additional usage flags. |
| errorState | contains the error if the texture can't be initialized. |
|
staticconstexpr |
|
protected |
Cube Texture vulkan image buffers.
|
protected |
Total number of generated mip-maps.