Eulerian Smoke Simulation on the GPU
Texture Class Reference

A base class for creating OpenGL texture objects. More...

#include <Texture.h>

Inheritance diagram for Texture:
Texture1D Texture2D Texture3D

List of all members.

Public Member Functions

 Texture (GLenum _target, GLenum _format, GLenum _dataType, int _samplerIndex)
 Constructor.
 ~Texture ()
 Destructor.
void setTextureParameter (GLenum _target, GLenum _paramName, GLfloat _paramValue)
 Sets a texture (floating point) parameter.
void setTextureParameter (GLenum _target, GLenum _paramName, GLint _paramValue)
 Sets a texture (integer) parameter.
void read (GLenum _target, GLint _mipLevel, GLenum _format, GLenum _dataType, void *_readData)
 Reads the texture's data.
void bind ()
 Binds the texture object.
void unbind ()
 Unbinds the texture object.
bool isBound () const
 Returns if the texture is bound.
GLenum getTarget () const
 Accessor for the texture's target.
GLenum getFormat () const
 Accessor for the texture's format.
GLenum getDataType () const
 Accessor for the texture's data type.
GLuint getHandle () const
 Accessor for the texture's handle.
GLenum getImageUnit () const
 Accessor for the texture's image unit.
int getSamplerIndex () const
 Accessor for the texture's sampler index.

Protected Attributes

GLenum m_target
 The texture's target. Can be GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, or GL_TEXTURE_CUBE_MAP.
GLenum m_format
 The texture's data format.
GLenum m_dataType
 The texture's data type.
GLuint m_handle
 The texture's handle.
GLenum m_imageUnit
 The texture image unit to attach the texture to.
int m_samplerIndex
 The texture's sampler index.
bool m_isBound
 A flag to indicate if the texture is bound.

Detailed Description

A base class for creating OpenGL texture objects.

Author:
Nikolaos Verigakis
Version:
1.0
Date:
14/07/11 Revision History : Initial Version 14/07/11

Constructor & Destructor Documentation

Texture::Texture ( GLenum  _target,
GLenum  _format,
GLenum  _dataType,
int  _samplerIndex 
)

Constructor.

Parameters:
[in]_targetthe target texture
[in]_formatthe format of the pixel data
[in]_dataTypethe data type of the pixel data
[in]_samplerIndexthe sampler's index

Member Function Documentation

void Texture::read ( GLenum  _target,
GLint  _mipLevel,
GLenum  _format,
GLenum  _dataType,
void *  _readData 
)

Reads the texture's data.

Parameters:
[in]_targetthe texture's target
[in]_mipLevelthe texture's mipmap level
[in]_formatthe texture's format
[in]_dataTypethe texture's data type
[in]_readDataa pointer to the data to read to
void Texture::setTextureParameter ( GLenum  _target,
GLenum  _paramName,
GLfloat  _paramValue 
)

Sets a texture (floating point) parameter.

Parameters:
[in]_targetthe exture target
[in]_paramNamethe parameter's name
[in]_paramValuethe parameter's value
void Texture::setTextureParameter ( GLenum  _target,
GLenum  _paramName,
GLint  _paramValue 
)

Sets a texture (integer) parameter.

Parameters:
[in]_targetthe exture target
[in]_paramNamethe parameter's name
[in]_paramValuethe parameter's value

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables