|
Brenta Engine 1.0
|
#include <texture.hpp>
Static Public Member Functions | |
| static unsigned int | LoadTexture (std::string path, 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, bool flip=true) |
| Load a texture from a file. | |
| static void | ActiveTexture (GLenum texture) |
| Activate a texture unit. | |
| static void | BindTexture (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 51 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 56 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 |
| hasMipmap | 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 36 of file texture.cpp.