core::meta::texture_t 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.

base classes

psl::meta::file
disk-based representation of a runtime instance.
publicpublic

static variables

polymorphic_name
the polymorphic serialization name for the psl::format::node that will be used to calculate the CRC64 ID of this type on.
constexprconstexprprivateprivatestaticstatic
uint64_t
polymorphic_identity
the associated unique ID (per type, not instance) for the polymorphic system.
constconstprivateprivatestaticstatic

member-functions

width
const public noexcept
width
sets the width in pixels of the given texture.
public
height
const public noexcept
height
sets the height in pixels of the given texture.
public
depth
const public noexcept
depth
sets the depth in pixels of the given texture.
public
mip_levels
const public noexcept
mip_levels
sets the used mip levels of the texture.
public
layers
const public noexcept
layers
sets the amount of layers this texture exists out of (think array textures).
public
format
const public noexcept
format
the format of the texture resource.
public
image_type
const public noexcept
image_type
sets the type of texture (2D, 3D, 2DArray, etc...).
public
usage
const public noexcept
usage
suggests the usage flags of this texture.
public
aspect_mask
const public noexcept
aspect_mask
suggests the aspect masks this texture exists out of.
public
serialize<…>
method that will be invoked by the serialization system.
private
validate
validates this texture
const private noexcept
polymorphic_id
returns the polymorphic ID at runtime, to resolve what type this is.
private override virtual

Function documentation

uint32_t core::meta::texture_t::width() const noexcept

Returns the width of the texture in pixels.

void core::meta::texture_t::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_t::height() const noexcept

Returns the height of the texture in pixels.

void core::meta::texture_t::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_t::depth() const noexcept

Returns the depth of the texture in pixels.

void core::meta::texture_t::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_t::mip_levels() const noexcept

Returns the used mip levels of the texture.

void core::meta::texture_t::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_t::layers() const noexcept

Returns the layers of the texture.

void core::meta::texture_t::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.

core::gfx::format_t core::meta::texture_t::format() const noexcept

Returns the format that the texture is in.

void core::meta::texture_t::format(core::gfx::format_t format)

Brief

the format of the texture resource.

Details

Parameters
format in the expected format.

core::gfx::image_type core::meta::texture_t::image_type() const noexcept

Returns the type of texture this is (2D, 3D, etc..).

void core::meta::texture_t::image_type(core::gfx::image_type type)

Brief

sets the type of texture (2D, 3D, 2DArray, etc...).

Parameters
type in the type of image to expect.

core::gfx::image_usage core::meta::texture_t::usage() const noexcept

Details

Returns the expected usage of this texture

void core::meta::texture_t::usage(core::gfx::image_usage usage)

Brief

suggests the usage flags of this texture.

Parameters
usage in the usage flags to expect.

core::gfx::image_aspect core::meta::texture_t::aspect_mask() const noexcept

Details

Returns what type of aspects to expect (color, depth, stencil, etc..)

void core::meta::texture_t::aspect_mask(core::gfx::image_aspect 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_t::serialize(S& s) private

Brief

method that will be invoked by the serialization system.

Template parameters
S the type of the serializer/deserializer
Parameters
in instance of a serializer that you can read from, or write to.