LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Related Symbols | List of all members
LibCarna::base::TextureBase Class Reference

Texture base class with dimension-independent definitions. More...

#include <Texture.hpp>

+ Inheritance diagram for LibCarna::base::TextureBase:

Public Member Functions

virtual ~TextureBase ()
 Deletes the maintained OpenGL texture object.
 

Static Public Member Functions

static unsigned int maxTextureSize ()
 Queries GL_MAX_TEXTURE_SIZE from the current GL context.
 

Public Attributes

const unsigned int id
 Holds the ID of the represented OpenGL texture object.
 

Static Public Attributes

static const unsigned int SETUP_UNIT = 0
 Texture unit that is fine to be used for temporal bindings, i.e. for setting textures up. This unit shouldn't be used for lasting bindings.
 

Protected Member Functions

 TextureBase ()
 Creates OpenGL texture object.
 
void uploadGLTextureData (const Eigen::Matrix< unsigned int, 1, 1 > &size, int internalFormat, int pixelFormat, int bufferType, const void *bufferPtr)
 Wraps glTexImage1d.
 
void uploadGLTextureData (const math::Vector2ui &size, int internalFormat, int pixelFormat, int bufferType, const void *bufferPtr)
 Wraps glTexImage2d.
 
void uploadGLTextureData (const math::Vector3ui &size, int internalFormat, int pixelFormat, int bufferType, const void *bufferPtr)
 Wraps glTexImage3d.
 

Related Symbols

(Note that these are not member symbols.)

template<unsigned int dimension>
void bindGLTextureObject (unsigned int unit, unsigned int id)
 Binds OpenGL texture object id to texture unit. For internal usage only, use Texture::bind instead.
 

Detailed Description

Texture base class with dimension-independent definitions.

Author
Leonid Kostrykin

Definition at line 80 of file Texture.hpp.

Friends And Related Symbol Documentation

◆ bindGLTextureObject()

template<unsigned int dimension>
void bindGLTextureObject ( unsigned int  unit,
unsigned int  id 
)
related

Binds OpenGL texture object id to texture unit. For internal usage only, use Texture::bind instead.

Definition at line 46 of file Texture.hpp.

Member Data Documentation

◆ id

const unsigned int LibCarna::base::TextureBase::id

Holds the ID of the represented OpenGL texture object.

Definition at line 90 of file Texture.hpp.

◆ SETUP_UNIT

const unsigned int LibCarna::base::TextureBase::SETUP_UNIT = 0
static

Texture unit that is fine to be used for temporal bindings, i.e. for setting textures up. This unit shouldn't be used for lasting bindings.

Definition at line 101 of file Texture.hpp.


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