texture class final
Custom meta data that describes a texture. i.e. width, height, format, etc..
does not contain any actual texture data, just describes it. This aids the engine in setting up the correct resources for rendering the associated texture file.
static variables
member-functions
Function documentation
uint32_t core:: meta:: texture:: width() const noexcept
| Returns | the width of the texture in pixels. |
|---|
void core:: meta:: texture:: width(uint32_t width)
Brief
sets the width in pixels of the given texture.
Details
| Parameters | |
|---|---|
| width in | the width in pixels |
uint32_t core:: meta:: texture:: height() const noexcept
| Returns | the height of the texture in pixels. |
|---|
void core:: meta:: texture:: height(uint32_t height)
Brief
sets the height in pixels of the given texture.
Details
| Parameters | |
|---|---|
| height in | the height in pixels. |
uint32_t core:: meta:: texture:: depth() const noexcept
| Returns | the depth of the texture in pixels. |
|---|
void core:: meta:: texture:: depth(uint32_t depth)
Brief
sets the depth in pixels of the given texture.
Details
| Parameters | |
|---|---|
| depth in | the depth in pixels. |
uint32_t core:: meta:: texture:: mip_levels() const noexcept
| Returns | the used mip levels of the texture. |
|---|
void core:: meta:: texture:: mip_levels(uint32_t mip_levels)
Brief
sets the used mip levels of the texture.
Details
| Parameters | |
|---|---|
| mip_levels in | the amount of mip levels present in the resource. |
uint32_t core:: meta:: texture:: layers() const noexcept
| Returns | the layers of the texture. |
|---|
void core:: meta:: texture:: layers(uint32_t layers)
Brief
sets the amount of layers this texture exists out of (think array textures).
Details
| Parameters | |
|---|---|
| layers in | the amount of layers contained in this instance. |
vk::Format core:: meta:: texture:: format() const noexcept
| Returns | the format that the texture is in. |
|---|
void core:: meta:: texture:: format(vk::Format format)
Brief
the format of the texture resource.
Details
| Parameters | |
|---|---|
| format in | the expected format. |
vk::ImageViewType core:: meta:: texture:: image_type() const noexcept
| Returns | the type of texture this is (2D, 3D, etc..). |
|---|
void core:: meta:: texture:: image_type(vk::ImageViewType type)
Brief
sets the type of texture (2D, 3D, 2DArray, etc...).
| Parameters | |
|---|---|
| type in | the type of image to expect. |
vk::ImageUsageFlags core:: meta:: texture:: usage() const noexcept
Details
| Returns | the expected usage of this texture |
|---|
void core:: meta:: texture:: usage(vk::ImageUsageFlags usage)
Brief
suggests the usage flags of this texture.
| Parameters | |
|---|---|
| usage in | the usage flags to expect. |
vk::ImageAspectFlags core:: meta:: texture:: aspect_mask() const noexcept
Details
| Returns | what type of aspects to expect (color, depth, stencil, etc..) |
|---|
void core:: meta:: texture:: aspect_mask(vk::ImageAspectFlags aspect)
Brief
suggests the aspect masks this texture exists out of.
Details
| Parameters | |
|---|---|
| aspect in | the aspect mask flag to expect. |
template<typename S>
void core:: meta:: texture:: serialize(S& s) private
Brief
method that will be invoked by the serialization system.
| Template parameters | |
|---|---|
| S | the type of the serializer/deserializer |
| Parameters | |
| s in | instance of a serializer that you can read from, or write to. |