VAPOR3 3.9.4
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
VAPoR::Texture Class Reference

Wrapper class for an OpenGL texture. More...

#include <Texture.h>

Inheritance diagram for VAPoR::Texture:
VAPoR::NonCopyableMixin VAPoR::Texture1D VAPoR::Texture2D VAPoR::Texture2DArray VAPoR::Texture3D

Public Member Functions

 ~Texture ()
 
int Generate ()
 
int Generate (int filter)
 
void Delete ()
 
bool Initialized () const
 
void Bind () const
 
void UnBind () const
 
int TexImage (int internalFormat, int width, int height, int depth, unsigned int format, unsigned int type, const void *data, int level=0)
 

Static Public Member Functions

static unsigned int GetDimsCount (unsigned int glTextureEnum)
 

Protected Member Functions

 Texture (unsigned int type)
 

Protected Attributes

unsigned int _id = 0
 
unsigned int _width = 0
 
unsigned int _height = 0
 
unsigned int _depth = 0
 
const unsigned int _type
 
const unsigned int _nDims
 

Friends

class Framebuffer
 

Detailed Description

Wrapper class for an OpenGL texture.

Author
Stas Jaroszynski
Version
1.0
Date
May 2019

This class is intended to be used as a member object for a renderer. Any use of this class (including the destructor and except the constructor) must occur inside the correct OpenGL context.

Definition at line 21 of file Texture.h.

Constructor & Destructor Documentation

◆ ~Texture()

VAPoR::Texture::~Texture ( )

◆ Texture()

VAPoR::Texture::Texture ( unsigned int  type)
protected

Member Function Documentation

◆ Bind()

void VAPoR::Texture::Bind ( ) const

◆ Delete()

void VAPoR::Texture::Delete ( )

◆ Generate() [1/2]

int VAPoR::Texture::Generate ( )

◆ Generate() [2/2]

int VAPoR::Texture::Generate ( int  filter)

◆ GetDimsCount()

static unsigned int VAPoR::Texture::GetDimsCount ( unsigned int  glTextureEnum)
static

◆ Initialized()

bool VAPoR::Texture::Initialized ( ) const

◆ TexImage()

int VAPoR::Texture::TexImage ( int  internalFormat,
int  width,
int  height,
int  depth,
unsigned int  format,
unsigned int  type,
const void *  data,
int  level = 0 
)

◆ UnBind()

void VAPoR::Texture::UnBind ( ) const

Friends And Related Function Documentation

◆ Framebuffer

friend class Framebuffer
friend

Definition at line 45 of file Texture.h.

Member Data Documentation

◆ _depth

unsigned int VAPoR::Texture::_depth = 0
protected

Definition at line 26 of file Texture.h.

◆ _height

unsigned int VAPoR::Texture::_height = 0
protected

Definition at line 25 of file Texture.h.

◆ _id

unsigned int VAPoR::Texture::_id = 0
protected

Definition at line 23 of file Texture.h.

◆ _nDims

const unsigned int VAPoR::Texture::_nDims
protected

Definition at line 28 of file Texture.h.

◆ _type

const unsigned int VAPoR::Texture::_type
protected

Definition at line 27 of file Texture.h.

◆ _width

unsigned int VAPoR::Texture::_width = 0
protected

Definition at line 24 of file Texture.h.


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