Texture1D(int width, GLuint internal_format, GLuint format, GLuint type, const void *pixels=nullptr)
const Texture & set_filer_mode(GLenum mode) const
Set the filtering mode of the texture (e.g., GL_LINEAR, GL_NEAREST).
void set_size(const Eigen::Vector2i &size)
Change the size of the texture. This will invalidate the texture data and change the texture ID.
Texture(const Eigen::Vector2i &size, GLuint internal_format, GLuint format, GLuint type, const void *pixels=nullptr)
Constructor.
void unbind(GLenum target) const
Unbind the texture from the specified target (e.g., GL_TEXTURE0).
void bind(GLenum target) const
Bind the texture to the specified target (e.g., GL_TEXTURE0).
Texture & operator=(const Texture &temp_obj)=delete
std::vector< T > read_pixels(GLuint format=GL_RGBA, GLuint type=GL_UNSIGNED_BYTE, int num_elements=4) const
Read the pixel data from the texture into a vector.
Eigen::Vector2i size() const
Texture size.
Texture(const Texture &temp_obj)=delete
const Texture & set_clamp_mode(GLenum mode) const
Set the clamping mode of the texture (e.g., GL_CLAMP_TO_EDGE, GL_REPEAT).