MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::GlTexture Class Referenceabstract

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

#include <MRGLTexture.h>

+ Inheritance diagram for MR::GlTexture:

Classes

struct  Settings
 

Public Member Functions

MRVIEWER_API GlTexture (GLenum val)
 
 GlTexture (const GlTexture &)=delete
 
MRVIEWER_API GlTexture (GlTexture &&r)
 
virtual MRVIEWER_API ~GlTexture ()
 
GlTextureoperator= (const GlTexture &)=delete
 
GlTextureoperator= (GlTexture &&r)
 
auto getId () const
 
bool valid () const
 
size_t size () const
 
MRVIEWER_API void gen ()
 generates new texture
 
MRVIEWER_API void del ()
 deletes the texture
 
MRVIEWER_API void bind ()
 binds current texture to OpenGL context
 
MRVIEWER_API 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)
 
MRVIEWER_API 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: