Lagrange
Texture Class Reference

Classes

struct  DownloadResult
 
struct  Params
 
struct  Transform
 

Public Member Functions

 Texture (const fs::path &file_path, const Texture::Params &params=Texture::Params())
 
 Texture (const void *image_data, size_t size, const Texture::Params &params=Texture::Params())
 
 Texture (const Params &params, int width=1, int height=1, int depth=0)
 
void bind () const
 
void bind_to (GLenum texture_unit) const
 
GLuint get_id () const
 
const Paramsget_params () const
 
void resize (int width, int height=0, int depth=0, bool force=false)
 
int get_width () const
 
int get_height () const
 
void upload (float *data)
 
void upload (unsigned char *data)
 
void set_uv_transform (const Texture::Transform &uv_transform)
 
std::optional< Texture::DownloadResultdownload (GLenum target=GL_TEXTURE_2D, int mip_level=0)
 
bool save_to (const fs::path &file_path, GLenum opengl_target=GL_TEXTURE_2D, int quality=90, int mip_level=0)
 
GLenum get_gl_element_type () const
 

Static Public Member Functions

static bool is_internal_format_color_renderable (GLenum internal_format)
 

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