CoriEngine
Loading...
Searching...
No Matches
Cori::Graphics::Texture Class Referenceabstract

Abstract class for textures. More...

#include <Texture.hpp>

Inheritance diagram for Cori::Graphics::Texture:

Classes

struct  Params
 Params to use when creating a texture. More...

Public Types

enum  PixelFormat { RGBA8888 , RGB888 }
 Available pixel formats. More...
enum  WrapMode { CLAMP_TO_EDGE , CLAMP_TO_BORDER , REPEAT }
 Available wrap modes. More...
enum  Filter { LINEAR , NEAREST }
 Available filtering options. More...

Public Member Functions

virtual ~Texture ()=default
virtual uint32_t GetWidth () const =0
 Gives the texture width.
virtual uint32_t GetHeight () const =0
 Gives the texture height.
virtual bool HasSemiTransparency () const =0
 Checks if texture has semi transparency.
virtual void Bind (uint32_t slot) const =0
 Binds the texture to the slot.
AssetStatus GetStatus () const

Protected Attributes

AssetStatus m_Status { AssetStatus::UNSPECIFIED }

Detailed Description

Abstract class for textures.

Definition at line 19 of file Texture.hpp.

Member Enumeration Documentation

◆ Filter

Available filtering options.

Enumerator
LINEAR 
NEAREST 

Definition at line 38 of file Texture.hpp.

◆ PixelFormat

Available pixel formats.

Enumerator
RGBA8888 
RGB888 

Definition at line 24 of file Texture.hpp.

◆ WrapMode

Available wrap modes.

Enumerator
CLAMP_TO_EDGE 
CLAMP_TO_BORDER 
REPEAT 

Definition at line 31 of file Texture.hpp.

Constructor & Destructor Documentation

◆ ~Texture()

virtual Cori::Graphics::Texture::~Texture ( )
virtualdefault

Member Function Documentation

◆ Bind()

virtual void Cori::Graphics::Texture::Bind ( uint32_t slot) const
pure virtual

Binds the texture to the slot.

Parameters
slotSlot to bound the texture to.
Note
Don't touch this if you're not using it outside the provided Renderer2D.

Implemented in Cori::Graphics::Internal::OpenGLTexture2D.

◆ GetHeight()

virtual uint32_t Cori::Graphics::Texture::GetHeight ( ) const
nodiscardpure virtual

Gives the texture height.

Returns
Texture height.

Implemented in Cori::Graphics::Internal::OpenGLTexture2D.

◆ GetStatus()

AssetStatus Cori::Graphics::Texture::GetStatus ( ) const
inline

Definition at line 88 of file Texture.hpp.

◆ GetWidth()

virtual uint32_t Cori::Graphics::Texture::GetWidth ( ) const
nodiscardpure virtual

Gives the texture width.

Returns
Texture width.

Implemented in Cori::Graphics::Internal::OpenGLTexture2D.

◆ HasSemiTransparency()

virtual bool Cori::Graphics::Texture::HasSemiTransparency ( ) const
nodiscardpure virtual

Checks if texture has semi transparency.

Returns

Implemented in Cori::Graphics::Internal::OpenGLTexture2D.

Member Data Documentation

◆ m_Status

AssetStatus Cori::Graphics::Texture::m_Status { AssetStatus::UNSPECIFIED }
protected

Definition at line 93 of file Texture.hpp.


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