Vis::Texture2D Class Reference

#include <VisTexture2D.h>

List of all members.

Public Member Functions

 Texture2D ()
 ~Texture2D ()
void setData (int width, int height, GLint internalFormat, GLenum format, GLenum type, bool mipmap, void *data=NULL)
void setData (void *data, GLenum format, GLenum type)
bool setDataFromFile (const string &filename, bool mipmap)
void setParameter (GLenum wrapS, GLenum wrapT, GLenum mag, GLenum min)
GLuint getTextureId () const
void bind ()
void unbind ()
int getWidth () const
int getHeight () const
vector< unsigned char > getData ()


Detailed Description

2D Texture.

Constructor & Destructor Documentation

Vis::Texture2D::Texture2D (  ) 

ctor.

Vis::Texture2D::~Texture2D (  ) 

dtor.


Member Function Documentation

void Vis::Texture2D::bind (  ) 

Bind the texture.

vector< unsigned char > Vis::Texture2D::getData (  ) 

Return texture data.

Returns:
texture data.

int Vis::Texture2D::getHeight (  )  const

Return the height of the texture.

Returns:
height of the texture.

GLuint Vis::Texture2D::getTextureId (  )  const

Return the texture handle.

Returns:
handle to the texture.

int Vis::Texture2D::getWidth (  )  const

Return the width of the texture.

Returns:
width of the texture.

void Vis::Texture2D::setData ( void *  data,
GLenum  format,
GLenum  type 
)

Set the texture data.

Parameters:
data texture data.
format format of the texture.
type data type

void Vis::Texture2D::setData ( int  width,
int  height,
GLint  internalFormat,
GLenum  format,
GLenum  type,
bool  mipmap,
void *  data = NULL 
)

Set the texture data, with empty data.

Parameters:
width width of the texture.
height height of the texture.
internalFormat internal format of the texture.
format format of the texture.
type data type
mipmap true to generate mipmaps, false no mipmap generation.

bool Vis::Texture2D::setDataFromFile ( const string &  filename,
bool  mipmap 
)

Set texture data from a file.

Parameters:
filename image filename.
mipmap true to generate mipmaps, false no mipmap generation.

void Vis::Texture2D::setParameter ( GLenum  wrapS,
GLenum  wrapT,
GLenum  mag,
GLenum  min 
)

Set texture paramters, for clamping an min and magnification.

Parameters:
wrapS clamping
wrapT clamping
mag magnification paramter.
min minification parameter.

void Vis::Texture2D::unbind (  ) 

Unbind the texture.


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

Generated on Mon Jan 26 15:00:42 2009 for FlowVis by  doxygen 1.5.7.1