Texture class
#include <include/engine/graphics/texture.h>
High-level wrapper for OpenGL Texture resources.
Manages loading, GPU upload, and automatic memory cleanup.
Public static functions
Constructors, destructors, conversion operators
- ~Texture()
- Destructor deletes the OpenGL texture.
Public functions
Function documentation
void engine:: graphics:: Texture:: Bind(unsigned int slot = 0) const
Binds the texture to a specific texture slot.
| Parameters | |
|---|---|
| slot | The texture slot to bind to (default is 0). |
unsigned int engine:: graphics:: Texture:: id() const
Gets the OpenGL ID of the texture.
| Returns | The renderer ID. |
|---|
int engine:: graphics:: Texture:: width() const
Gets the width of the texture.
| Returns | Width in pixels. |
|---|
int engine:: graphics:: Texture:: height() const
Gets the height of the texture.
| Returns | Height in pixels. |
|---|