Engine::Graphics::Texture2D Class Reference An example game engine / Graphical related classes / Texture2D
Defined in header <src/Graphics/Texture2D.hpp>
class Texture2D;
Member Functions | Description |
---|---|
(constructor) | (function) |
(destructor) | (virtual function) |
getWidth const override | Returns the width of the texture in pixels. (virtual function) |
getHeight const override | Returns the height of the texture in pixels. (virtual function) |
getDepth const override | Returns the depth of the texture in pixels. (virtual function) |
Public Types(inherited from Engine::Graphics::Texture)
Member Types | Definition |
---|---|
Type | Type (enum) |
Public Functions(inherited from Engine::Graphics::Texture)
Member Functions | Description |
---|---|
Texture | (function) |
~Texture = default | (virtual function) |
isLoaded const | (function) |
Protected Attributes(inherited from Engine::Graphics::Texture)
Member Protected Attributes | Description |
---|---|
loaded | bool (protected variable) |
type | Type (protected variable) |
Public Functions(inherited from Engine::Graphics::Handle)
Member Functions | Description |
---|---|
Handle = default | (function) |
~Handle = default | (virtual function) |
getHandle const | (function) |
Protected Attributes(inherited from Engine::Graphics::Handle)
Member Protected Attributes | Description |
---|---|
handle | int (protected variable) |
Defined in header <src/Graphics/Texture2D.hpp>
Texture2D(
int width,
int height,
uint8_t * data,
Texture::Type type =Texture::Type::RGBA8);
Parameters
Exception Safety
Basic exception guarantee.
Defined in header <src/Graphics/Texture2D.hpp>
virtual ~Texture2D();
Exception Safety
Basic exception guarantee.
Defined in header <src/Graphics/Texture2D.hpp>
virtual int
getWidth() const override;
Returns the width of the texture in pixels.
Return value
Width in pixels
Exception Safety
Basic exception guarantee.
Defined in header <src/Graphics/Texture2D.hpp>
virtual int
getHeight() const override;
Returns the height of the texture in pixels.
Return value
Height in pixels
Exception Safety
Basic exception guarantee.
Defined in header <src/Graphics/Texture2D.hpp>
virtual int
getDepth() const override;
Returns the depth of the texture in pixels.
Return value
Depth in pixels
Notes
If this texture is 2D the depth is always 1 pixels
Exception Safety
Basic exception guarantee.
Updated on 2023-04-03