Fluxus::TexturePainter Class Reference

#include <TexturePainter.h>

Collaboration diagram for Fluxus::TexturePainter:

Collaboration graph
[legend]

Public Member Functions

void Initialise ()
 Initialise all texture units.
void ClearCache ()
 Clear the texture cache.
Texture Generation/Conversion
unsigned int LoadTexture (const string &Filename, CreateParams &params)
 Loads a texture returns the OpenGL ID number.
bool LoadPData (const string &Filename, unsigned int &w, unsigned int &h, TypedPData< dColour > &pixels)
 Loads texture information into a pdata array of colour type.
unsigned int MakeTexture (unsigned int w, unsigned int h, PData *data)
 Uploads texture data from pdata - returns OpenGL ID number.
State control
Controls the texture rendering state

bool SetCurrent (unsigned int *ids, TextureState *states)
void DisableAll ()
 Disables all texturing.

Static Public Member Functions

static TexturePainterGet ()
static void Shutdown ()

Data Structures

class  CreateParams
class  CubeMapDesc
class  TextureDesc

Detailed Description

The texture painter is resposible for making textures - initialising, loading, generating them from pdata for the pixel primitive, and uploading them ready for use. The TexturePainter also contains a cache, so it knows which filenames map to which texture ID's - so it won't load and upload files which are already on the graphics card.

Definition at line 62 of file TexturePainter.h.


Member Function Documentation

static TexturePainter* Fluxus::TexturePainter::Get (  )  [inline, static]

Todo:
stop this being a singleton...

Definition at line 66 of file TexturePainter.h.

static void Fluxus::TexturePainter::Shutdown (  )  [inline, static]

Definition at line 72 of file TexturePainter.h.

void TexturePainter::Initialise (  ) 

Initialise all texture units.

Definition at line 36 of file TexturePainter.cpp.

void TexturePainter::ClearCache (  ) 

Clear the texture cache.

Definition at line 54 of file TexturePainter.cpp.

unsigned int TexturePainter::LoadTexture ( const string &  Filename,
CreateParams params 
)

Loads a texture returns the OpenGL ID number.

Definition at line 61 of file TexturePainter.cpp.

bool TexturePainter::LoadPData ( const string &  Filename,
unsigned int &  w,
unsigned int &  h,
TypedPData< dColour > &  pixels 
)

Loads texture information into a pdata array of colour type.

Definition at line 215 of file TexturePainter.cpp.

unsigned int TexturePainter::MakeTexture ( unsigned int  w,
unsigned int  h,
PData data 
)

Uploads texture data from pdata - returns OpenGL ID number.

Definition at line 261 of file TexturePainter.cpp.

bool TexturePainter::SetCurrent ( unsigned int *  ids,
TextureState states 
)

Sets the current texture state - allow settings for each unit if multitexturing is enabled. The size of ids is expexted to be the same as MAX_TEXTURES

Definition at line 276 of file TexturePainter.cpp.

void TexturePainter::DisableAll (  ) 

Disables all texturing.

Definition at line 340 of file TexturePainter.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Feb 11 06:54:53 2008 for The Fluxus Renderer (libfluxus) by  doxygen 1.5.1