Texture2d Struct Reference

Structure for storing information about an OpenGL 2D-texture. More...

#include <texture2d.h>


Public Member Functions

 Texture2d ()
 The constructor of the Texture struct.
 Texture2d (const char *texture)
 The constructor of the Texture struct.
 ~Texture2d ()
 The destructor of the Texture struct.
void Load (const char *texture, bool useFloat32=false)
 Loads a given texture to VRAM.

Data Fields

GLuint texID
GLuint type
int width
int height
int bpp
char * filename


Detailed Description

Structure for storing information about an OpenGL 2D-texture.


Constructor & Destructor Documentation

Texture2d::Texture2d (  ) 

The constructor of the Texture struct.

Initializes all variables.

Texture2d::Texture2d ( const char *  texture  ) 

The constructor of the Texture struct.

Initializes all variables and loads the given texture.

Parameters:
texture the name of the file which will be used as a texture.

Texture2d::~Texture2d (  ) 

The destructor of the Texture struct.


Member Function Documentation

void Texture2d::Load ( const char *  texture,
bool  useFloat32 = false 
)

Loads a given texture to VRAM.

Parameters:
texture The filename of the texture


Field Documentation

GLuint Texture2d::texID

Texture ID

GLuint Texture2d::type

Byte order, GL_RGB or GL_RGBA

int Texture2d::width

Texture width in pixels

int Texture2d::height

Texture height in pixels

int Texture2d::bpp

Bits per pixel

char* Texture2d::filename

Stored filename to texture file


The documentation for this struct was generated from the following files:
Generated on Thu May 17 20:28:04 2007 for Ocean View by  doxygen 1.5.2