Brenta Engine 1.2
Loading...
Searching...
No Matches
brenta::texture Class Reference

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.
 

Detailed Description

Texture class.

This class is used to load and manage textures.

Definition at line 19 of file texture.hpp.

Member Function Documentation

◆ active_texture()

void texture::active_texture ( GLenum texture)
static

Activate a texture unit.

This method activates a texture unit.

Definition at line 24 of file texture.cpp.

◆ bind_texture()

void texture::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 )
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.

◆ load_texture()

unsigned int texture::load_texture ( std::string path,
bool flip = true )
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.

Parameters
pathPath to the texture file
Returns
The texture ID

Definition at line 15 of file texture.cpp.


The documentation for this class was generated from the following files: