OpenGL texture wrapper.
More...
#include <visuals/Texture.hpp>
|
| | Texture (Resources::Resource file) |
| | Load texture from resource.
|
| |
| | Texture (const Texture ©) |
| | Copy constructor.
|
| |
| void | operator= (const Texture ©) |
| | Assignment operator.
|
| |
|
| ~Texture () |
| | Clean up texture resources.
|
| |
|
void | BindTexture (bool force=false) |
| | Bind texture to OpenGL Generates and configures texture in GPU memory.
|
| |
|
void | FreeTexture () |
| | Free texture from OpenGL Releases texture from GPU memory.
|
| |
| bool | IsBound () const |
| | Check if texture is bound to OpenGL.
|
| |
| GLuint | GetGLLocation () const |
| | Get OpenGL texture ID.
|
| |
| std::string | GetPath () const |
| | Get texture file path.
|
| |
|
|
| Texture () |
| | Create empty texture.
|
| |
|
|
std::string | path |
| | Path to texture file.
|
| |
|
SDL_Surface * | surface |
| | SDL surface containing image data.
|
| |
|
GLuint | GLLocation |
| | OpenGL texture ID.
|
| |
|
bool | bound |
| | Whether texture is bound to OpenGL.
|
| |
OpenGL texture wrapper.
Manages loading, binding and cleanup of OpenGL textures. Supports loading from image files and provides texture state management.
◆ Texture() [1/2]
Load texture from resource.
- Parameters
-
| file | Resource containing image data |
◆ Texture() [2/2]
| StevEngine::Visuals::Texture::Texture |
( |
const Texture & | copy | ) |
|
Copy constructor.
- Parameters
-
◆ GetGLLocation()
| GLuint StevEngine::Visuals::Texture::GetGLLocation |
( |
| ) |
const |
|
inline |
Get OpenGL texture ID.
- Returns
- OpenGL texture location
◆ GetPath()
| std::string StevEngine::Visuals::Texture::GetPath |
( |
| ) |
const |
|
inline |
Get texture file path.
- Returns
- Path to source texture file
◆ IsBound()
| bool StevEngine::Visuals::Texture::IsBound |
( |
| ) |
const |
|
inline |
Check if texture is bound to OpenGL.
- Returns
- True if texture is in GPU memory
◆ operator=()
| void StevEngine::Visuals::Texture::operator= |
( |
const Texture & | copy | ) |
|
Assignment operator.
- Parameters
-
The documentation for this class was generated from the following files: