Hymn to Beauty
C++ 3D Engine
Video::Texture Class Reference

A texture. More...

#include <Texture.hpp>

Inheritance diagram for Video::Texture:
Video::OpenGLTexture Video::VulkanTexture Video::WebGPUTexture

Public Types

enum class  Type { COLOR , RENDER_COLOR , RENDER_DEPTH }
 The type of texture. More...
 
enum class  Format {
  R8 , R8G8B8A8 , R11G11B10 , R16G16B16A16 ,
  D32
}
 The format of the texture. More...
 

Public Member Functions

 Texture (Type type, const glm::uvec2 &size, Format format)
 Create a new texture. More...
 
virtual ~Texture ()
 Destructor. More...
 
Type GetType () const
 Get the type of texture. More...
 
const glm::uvec2 & GetSize () const
 Get the size of the texture. More...
 
Format GetFormat () const
 Get the format of the texture. More...
 
uint64_t GetUniqueIdentifier () const
 Get a unique identifier. More...
 

Detailed Description

A texture.

Member Enumeration Documentation

◆ Format

enum class Video::Texture::Format
strong

The format of the texture.

Enumerator
R8 

8-bit single channel color format.

R8G8B8A8 

8-bit RGBA color format.

R11G11B10 

HDR RGB color format.

R16G16B16A16 

HDR RGBA color format.

D32 

32-bit depth format.

◆ Type

enum class Video::Texture::Type
strong

The type of texture.

Enumerator
COLOR 

A sampled color texture.

RENDER_COLOR 

A color texture that can be rendered to.

RENDER_DEPTH 

A depth texture that can be rendered to.

Constructor & Destructor Documentation

◆ Texture()

Video::Texture::Texture ( Type  type,
const glm::uvec2 &  size,
Format  format 
)

Create a new texture.

Parameters
typeThe type of texture.
sizeThe size of the texture.
formatThe format of the texture.

◆ ~Texture()

virtual Video::Texture::~Texture ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ GetFormat()

Format Video::Texture::GetFormat ( ) const
inline

Get the format of the texture.

Returns
The format of the texture.

◆ GetSize()

const glm::uvec2 & Video::Texture::GetSize ( ) const
inline

Get the size of the texture.

Returns
The size of the texture in pixels.

◆ GetType()

Type Video::Texture::GetType ( ) const
inline

Get the type of texture.

Returns
The type of the texture.

◆ GetUniqueIdentifier()

uint64_t Video::Texture::GetUniqueIdentifier ( ) const

Get a unique identifier.

Returns
A unique identifier.

The documentation for this class was generated from the following files: