|
CoriEngine
|
A regular 2D texture with 1 layer. More...
#include <Texture.hpp>


Classes | |
| class | Descriptor |
| Texture2D Descriptor meant to be used with AssetManager only. 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 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 |
Static Public Member Functions | |
| static std::shared_ptr< Texture2D > | Create (const std::shared_ptr< Image > &image) |
| Creates a Texture2D from the Image. | |
| static std::shared_ptr< Texture2D > | Create (const void *pixelData, const uint32_t width, const uint32_t height, const Params ¶ms) |
| Creates a Texture2D. | |
Protected Attributes | |
| AssetStatus | m_Status { AssetStatus::UNSPECIFIED } |
A regular 2D texture with 1 layer.
Definition at line 99 of file Texture.hpp.
|
inherited |
|
inherited |
|
inherited |
Available wrap modes.
| Enumerator | |
|---|---|
| CLAMP_TO_EDGE | |
| CLAMP_TO_BORDER | |
| REPEAT | |
Definition at line 31 of file Texture.hpp.
|
pure virtualinherited |
Binds the texture to the slot.
| slot | Slot to bound the texture to. |
Implemented in Cori::Graphics::Internal::OpenGLTexture2D.
|
staticnodiscard |
Creates a Texture2D.
| pixelData | Pixel data to create Texture2D from. |
| width | Width of the source picture data. |
| height | Height of the source picture data. |
| params | Parameters to create a texture with. |
Definition at line 13 of file Texture.cpp.

|
nodiscardpure virtualinherited |
Gives the texture height.
Implemented in Cori::Graphics::Internal::OpenGLTexture2D.
|
inlineinherited |
Definition at line 88 of file Texture.hpp.
|
nodiscardpure virtualinherited |
Gives the texture width.
Implemented in Cori::Graphics::Internal::OpenGLTexture2D.
|
nodiscardpure virtualinherited |
Checks if texture has semi transparency.
Implemented in Cori::Graphics::Internal::OpenGLTexture2D.
|
protectedinherited |
Definition at line 93 of file Texture.hpp.