lilith3d::ShaderManager Class Reference

#include <shader.h>

List of all members.


Detailed Description

A class to manage shaders for lilith.


Public Member Functions

 ShaderManager ()
 Create the shader manager.
 ~ShaderManager ()
 Delete the shader manager - you should call this if "Supported()" is false.
bool PowerFragments ()
 Returns 'true' if this system supports high quality fragment shaders.
void SetImportPath (const std::string &path)
 Set the path to the shaders needed by the engine.
bool LoadRequiredShaders ()
 Load the shaders required by the engine.
const Shader * GetShader (int id)
 Get a shader.
void UseShader (const Shader *group)
 Start using the specified shader.
void BindTextures (const Shader *group, const Texture *textures[], int numTextures)
void UnBindTextures (int startIndex, int count)
 Unbind textures, starting with "startIndex" and the number to unbind.
void SetUniform (const Shader *group, const char *name, float value)
 Set a shader uniform variable.
void SetUniform (const Shader *group, const char *name, const grinliz::Vector3F &value)
 Set a shader uniform variable.
void SetUniform (const Shader *group, const char *name, const grinliz::Vector4F &value)
 Set a shader uniform variable.
void SetUniform (const Shader *group, const char *name, const grinliz::Color3F &value)
 Set a shader uniform variable.
void SetUniform (const Shader *group, const char *name, const grinliz::Color4F &value)
 Set a shader uniform variable.
void SetUniform (const Shader *group, const char *name, const grinliz::Matrix4 &value)
 Set a shader uniform variable.
void ClearShaders ()
 Stop rendering with the current shader group.

Static Public Member Functions

static ShaderManagerInstance ()
 Get the pointer to the shader manager.


Member Function Documentation

void lilith3d::ShaderManager::BindTextures ( const Shader *  group,
const Texture textures[],
int  numTextures 
)

Bind textures for the shaders. The array of textures will be named tex0...texN and will be available in the fragment shader.


The documentation for this class was generated from the following file:
Generated on Fri Mar 23 19:36:28 2007 for Lilith3D by  doxygen 1.5.1-p1