Public Member Functions | Public Attributes | List of all members
lvr2::GlTexture Class Reference

#include <GlTexture.hpp>

Public Member Functions

void bind () const
 Bind the texture to the current OpenGL context. More...
 
 GlTexture (unsigned char *pixels, int width, int height)
 Initializes a texture with given date. Class will release the data. More...
 
 GlTexture (const GlTexture &other)
 Copy ctor. More...
 
 GlTexture (const Texture &other)
 Copy ctor. More...
 
 GlTexture ()
 Empty ctor. More...
 
void upload ()
 Does all the OpenGL stuff to make it avialable for rendering. More...
 
virtual ~GlTexture ()
 Dtor. More...
 

Public Attributes

int m_height
 The height of the texture in pixels. More...
 
unsigned char * m_pixels
 The aligned pixel data. Three bytes per pixel (r,g,b) More...
 
GLuint m_texIndex
 The texture index of the texture. More...
 
int m_width
 The width of the texture in pixels. More...
 

Detailed Description

Definition at line 56 of file GlTexture.hpp.

Constructor & Destructor Documentation

◆ GlTexture() [1/4]

lvr2::GlTexture::GlTexture ( unsigned char *  pixels,
int  width,
int  height 
)

Initializes a texture with given date. Class will release the data.

Parameters
pixelsThe image data of the texture. Pixel aligned, three bytes per pixel
widthThe image width
heightThe image height

Definition at line 43 of file GlTexture.cpp.

◆ GlTexture() [2/4]

lvr2::GlTexture::GlTexture ( const GlTexture other)

Copy ctor.

Definition at line 51 of file GlTexture.cpp.

◆ GlTexture() [3/4]

lvr2::GlTexture::GlTexture ( const Texture other)

Copy ctor.

Definition at line 67 of file GlTexture.cpp.

◆ GlTexture() [4/4]

lvr2::GlTexture::GlTexture ( )
inline

Empty ctor.

Definition at line 84 of file GlTexture.hpp.

◆ ~GlTexture()

lvr2::GlTexture::~GlTexture ( )
virtual

Dtor.

Definition at line 96 of file GlTexture.cpp.

Member Function Documentation

◆ bind()

void lvr2::GlTexture::bind ( ) const
inline

Bind the texture to the current OpenGL context.

Definition at line 94 of file GlTexture.hpp.

◆ upload()

void lvr2::GlTexture::upload ( )

Does all the OpenGL stuff to make it avialable for rendering.

Definition at line 109 of file GlTexture.cpp.

Member Data Documentation

◆ m_height

int lvr2::GlTexture::m_height

The height of the texture in pixels.

Definition at line 106 of file GlTexture.hpp.

◆ m_pixels

unsigned char* lvr2::GlTexture::m_pixels

The aligned pixel data. Three bytes per pixel (r,g,b)

Definition at line 109 of file GlTexture.hpp.

◆ m_texIndex

GLuint lvr2::GlTexture::m_texIndex

The texture index of the texture.

Definition at line 112 of file GlTexture.hpp.

◆ m_width

int lvr2::GlTexture::m_width

The width of the texture in pixels.

Definition at line 103 of file GlTexture.hpp.


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


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:11