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, bool ignorecache=false)
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)
void DisableAll ()
 Disables all texturing.

Static Public Member Functions

static TexturePainterGet ()
static void Shutdown ()

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 50 of file TexturePainter.h.


Member Function Documentation

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

Todo:
stop this being a singleton...

Definition at line 54 of file TexturePainter.h.

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

Definition at line 60 of file TexturePainter.h.

void TexturePainter::Initialise (  ) 

Initialise all texture units.

Definition at line 35 of file TexturePainter.cpp.

void TexturePainter::ClearCache (  ) 

Clear the texture cache.

Definition at line 58 of file TexturePainter.cpp.

unsigned int TexturePainter::LoadTexture ( const string &  Filename,
bool  ignorecache = false 
)

Loads a texture, use ignore cache to force it to load. Returns the OpenGL ID number

Definition at line 64 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 114 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 160 of file TexturePainter.cpp.

bool TexturePainter::SetCurrent ( unsigned int *  ids  ) 

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 175 of file TexturePainter.cpp.

void TexturePainter::DisableAll (  ) 

Disables all texturing.

Definition at line 206 of file TexturePainter.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 4 23:22:45 2007 for The Fluxus Renderer (libfluxus) by  doxygen 1.5.1