Keos::CShader Class Reference

Wrapper class for the IShaderBase. More...

#include <KeosShader.h>

List of all members.

Public Member Functions

void LoadFromFile (const String &strFilename)
 Load the shader from a file.
void Unload ()
 Unload the shader.
const IShaderBaseGetShader () const
 Get a pointer on the internal shader.
void SetParameter (const String &strName, float fValue)
 Change a parameter of the shader (float).
void SetParameter (const String &strName, const TVector2F &Value)
 Change a parameter of the shader (vector2).
void SetParameter (const String &strName, const TVector3F &Value)
 Change a parameter of the shader (vector3).
void SetParameter (const String &strName, const TVector4F &Value)
 Change a parameter of the shader (vector4).
void SetParameter (const String &strName, const CMatrix4 &Value)
 Change a parameter of the shader (matrix4).
void SetParameter (const String &strName, const CColor &Value)
 Change a parameter of the shader (color).


Detailed Description

Wrapper class for the IShaderBase.

Todo:
Shaders: See GPUManager from Ogre for the shaders management

Definition at line 33 of file KeosShader.h.


Member Function Documentation

void Keos::CShader::LoadFromFile ( const String strFilename  ) 

Load the shader from a file.

Parameters:
strFilename Name of file of the shader.

Definition at line 35 of file KeosShader.cpp.

References Keos::CSingleton< T >::Instance().

void Keos::CShader::Unload (  ) 

Unload the shader.

Definition at line 50 of file KeosShader.cpp.

const IShaderBase * Keos::CShader::GetShader (  )  const

Get a pointer on the internal shader.

Returns:
Pointer on the internal representation of the shader.

Definition at line 56 of file KeosShader.cpp.

void Keos::CShader::SetParameter ( const String strName,
float  fValue 
)

Change a parameter of the shader (float).

Parameters:
strName Name of the parameter in the shader.
fValue Value to be sent.

Definition at line 62 of file KeosShader.cpp.

void Keos::CShader::SetParameter ( const String strName,
const TVector2F Value 
)

Change a parameter of the shader (vector2).

Parameters:
strName Name of the parameter in the shader.
Value Value to be sent.

Definition at line 69 of file KeosShader.cpp.

References Keos::CVector2< T >::x, and Keos::CVector2< T >::y.

void Keos::CShader::SetParameter ( const String strName,
const TVector3F Value 
)

Change a parameter of the shader (vector3).

Parameters:
strName Name of the parameter in the shader.
Value Value to be sent.

Definition at line 76 of file KeosShader.cpp.

References Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.

void Keos::CShader::SetParameter ( const String strName,
const TVector4F Value 
)

Change a parameter of the shader (vector4).

Parameters:
strName Name of the parameter in the shader.
Value Value to be sent.

Definition at line 83 of file KeosShader.cpp.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

void Keos::CShader::SetParameter ( const String strName,
const CMatrix4 Value 
)

Change a parameter of the shader (matrix4).

Parameters:
strName Name of the parameter in the shader.
Value Value to be sent.

Definition at line 90 of file KeosShader.cpp.

void Keos::CShader::SetParameter ( const String strName,
const CColor Value 
)

Change a parameter of the shader (color).

Parameters:
strName Name of the parameter in the shader.
Value Value to be sent.

Definition at line 96 of file KeosShader.cpp.

References Keos::CColor::ToFloat().


The documentation for this class was generated from the following files:
Generated on Fri Mar 9 14:29:28 2007 for Keos by  doxygen 1.5.1-p1