MeshLib C++ Docs
Loading...
Searching...
No Matches

represents OpenGL texture owner, and allows uploading data in it remembering texture size More...

#include <MRViewer/MRGLTexture.h>

Inheritance diagram for MR::GlTexture:

Classes

struct  Settings

Public Member Functions

 GlTexture (GLenum val)
 GlTexture (const GlTexture &)=delete
 GlTexture (GlTexture &&r)
virtual ~GlTexture ()
GlTextureoperator= (const GlTexture &)=delete
GlTextureoperator= (GlTexture &&r)
auto getId () const
bool valid () const
size_t size () const
void gen ()
 generates new texture
void del ()
 deletes the texture
void bind ()
 binds current texture to OpenGL context
void loadData (const Settings &settings, const char *arr)
 creates GL data texture using given data and binds it
template<typename C>
void loadData (const Settings &settings, const C &cont)
void loadDataOpt (bool refresh, const Settings &settings, const char *arr)
 binds current texture to OpenGL context, optionally refreshing its data
template<typename C>
void loadDataOpt (bool refresh, const Settings &settings, const C &cont)

Static Public Attributes

static constexpr GLuint NO_TEX = 0

Protected Member Functions

virtual void texImage_ (const Settings &settings, const char *arr)=0

Protected Attributes

GLuint textureID_ = NO_TEX
size_t size_ = 0
GLenum type_ = NO_TEX

Detailed Description

represents OpenGL texture owner, and allows uploading data in it remembering texture size


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