|
Brenta Engine 1.2
|
Texture class. More...
#include <texture.hpp>
Static Public Member Functions | |
| static unsigned int | load_texture (std::string path, bool flip=true) |
| Load a texture from a file. | |
| static void | active_texture (GLenum texture) |
| Activate a texture unit. | |
| static void | bind_texture (GLenum target, unsigned int texture, GLint wrapping=GL_REPEAT, GLint filtering_min=GL_NEAREST, GLint filtering_mag=GL_NEAREST, GLboolean hasMipmap=GL_TRUE, GLint mipmap_min=GL_LINEAR_MIPMAP_LINEAR, GLint mipmap_mag=GL_LINEAR) |
| Bind a texture. | |
Texture class.
This class is used to load and manage textures.
Definition at line 19 of file texture.hpp.
|
static |
Activate a texture unit.
This method activates a texture unit.
Definition at line 24 of file texture.cpp.
|
static |
Bind a texture.
This method binds a texture to a target. The texture is bound with the specified wrapping and filtering modes.
You need to bind the texture before using it in the shader.
Definition at line 29 of file texture.cpp.
|
static |
Load a texture from a file.
This method loads a texture from a file and returns the texture ID. The texture is loaded using the stb_image library.
| path | Path to the texture file |
Definition at line 15 of file texture.cpp.