Brenta Engine 1.1
|
Texture class. More...
#include <texture.hpp>
Static Public Member Functions | |
static unsigned int | load_texture (std::string path, GLint wrapping=GL_REPEAT, GLint filtering_min=GL_NEAREST, GLint filtering_mag=GL_NEAREST, GLboolean has_mipmap=GL_TRUE, GLint mipmap_min=GL_LINEAR_MIPMAP_LINEAR, GLint mipmap_mag=GL_LINEAR, 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 40 of file texture.hpp.
|
static |
Activate a texture unit.
This method activates a texture unit.
Definition at line 52 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 57 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. The texture is loaded with the specified wrapping and filtering modes. The texture can also have mipmaps.
path | Path to the texture file |
wrapping | Wrapping mode of the texture |
filtering_min | Filtering mode of the texture |
filtering_mag | Filtering mode of the texture |
has_mipmap | If the texture has mipmaps |
mipmap_min | Mipmap filtering mode of the texture |
mipmap_mag | Mipmap filtering mode of the texture |
flip | If the texture should be flipped |
Definition at line 37 of file texture.cpp.