#include <texture.h>
Public Member Functions | |
TextureCube (Core &core) | |
virtual | ~TextureCube () override |
bool | init (const SurfaceDescriptor &descriptor, bool generateMipMaps, const glm::vec4 &clearColor, VkImageUsageFlags requiredFlags, utility::ErrorState &errorState) |
const glm::vec2 | getSize () const |
int | getWidth () const |
int | getHeight () const |
VkImageUsageFlags | getImageUsageFlags () const |
virtual uint | getLayerCount () const override |
virtual uint | getMipLevels () const override |
virtual const ImageData & | getHandle () const override |
virtual ImageData & | getHandle () override |
![]() | |
Texture (Core &core) | |
virtual | ~Texture () |
virtual VkImageLayout | getTargetLayout () const |
VkFormat | getFormat () const |
const SurfaceDescriptor & | getDescriptor () const |
RenderService & | getRenderService () |
const RenderService & | getRenderService () const |
virtual void | onDestroy () override |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
virtual bool | init (utility::ErrorState &errorState) |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
const EUsage | mUsage = EUsage::Static |
Texture usage (cube maps are currently always static) More... | |
![]() | |
nap::Signal | textureDestroyed |
Signal that is triggered before texture is destroyed. More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
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... | |
![]() | |
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 | |
![]() | |
enum | EUsage { Static, DynamicRead, DynamicWrite } |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
![]() | |
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 |
VkImageUsageFlags getImageUsageFlags | ( | ) | const |
|
overridevirtual |
Implements Texture.
|
overridevirtual |
Implements Texture.
const glm::vec2 getSize | ( | ) | const |
int getWidth | ( | ) | const |
bool init | ( | const SurfaceDescriptor & | descriptor, |
bool | generateMipMaps, | ||
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. |
generateMipMaps | if mip-maps are auto generated |
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.
const EUsage mUsage = EUsage::Static |
Texture usage (cube maps are currently always static)