Carpenter Engine
A C++ game engine with a build once run anywhere solution
|
A wrapper class for a texture for the game engine. More...
#include <Texture.hpp>
Public Member Functions | |
Texture (const char *path) | |
The default constructor of the Texture class. | |
unsigned | GetTexture () |
Returns the id of the texture. | |
A wrapper class for a texture for the game engine.
The class takes a path to the texture (preferrably along Assets/
), and prepares the texture to be loaded into the GPU. When the game is ready to use the texture via GetTexture()
, the texture is loaded into the GPU to be used by the game engine.
Engine::Graphics::Texture::Texture | ( | const char * | path | ) |
The default constructor of the Texture class.
Takes a path to the texture (preferrably along Assets/
), and prepares the texture to be loaded into the GPU.
The texture is not loaded into the GPU until GetTexture is called.
path | The path to the texture |
unsigned Engine::Graphics::Texture::GetTexture | ( | ) |
Returns the id of the texture.
This is the id of the texture that is loaded into the GPU according to the renderer. When constructed, the texture is not loaded in immediately, but rather when GetTexture is called.