Keos::IShaderBase Class Reference

Base class for textures. More...

#include <KeosShaderBase.h>

Inheritance diagram for Keos::IShaderBase:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 IShaderBase (CGprogram Program, TShaderType Type)
 Construct the shader from a program Cg.
virtual ~IShaderBase ()
 Destructor.
TShaderType GetType () const
 Return the shader type.
virtual void SetParameter (const String &strName, const float *pValue)=0
 Change a parameter of the shader (scalar or vector).
virtual void SetParameter (const String &strName, const CMatrix4 &Value)=0
 Change a parameter of the shader (matrix4).

Protected Member Functions

CGparameter GetParameter (const String &strName) const
 Get the CGparameter associated to an identifier.

Protected Attributes

CGprogram m_Program
 Program Cg associated to the shader.
TShaderType m_Type
 Shader type (vrtex / pixel).

Detailed Description

Base class for textures.

Definition at line 35 of file KeosShaderBase.h.


Constructor & Destructor Documentation

Keos::IShaderBase::IShaderBase ( CGprogram  Program,
TShaderType  Type 
)

Construct the shader from a program Cg.

Parameters:
Program Cg program.
Type Shader type.

Definition at line 30 of file KeosShaderBase.cpp.

Keos::IShaderBase::~IShaderBase (  )  [virtual]

Destructor.

Definition at line 36 of file KeosShaderBase.cpp.

References m_Program.


Member Function Documentation

TShaderType Keos::IShaderBase::GetType (  )  const

Return the shader type.

Definition at line 43 of file KeosShaderBase.cpp.

References m_Type.

Referenced by Keos::COGLRenderSystem::SetPixelShader(), Keos::CD3D9RenderSystem::SetPixelShader(), Keos::COGLRenderSystem::SetVertexShader(), and Keos::CD3D9RenderSystem::SetVertexShader().

virtual void Keos::IShaderBase::SetParameter ( const String strName,
const float *  pValue 
) [pure virtual]

Change a parameter of the shader (scalar or vector).

Parameters:
strName Name of the parameter in the shader.
pValue Value(s) to be sent.

virtual void Keos::IShaderBase::SetParameter ( const String strName,
const CMatrix4 Value 
) [pure virtual]

Change a parameter of the shader (matrix4).

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

CGparameter Keos::IShaderBase::GetParameter ( const String strName  )  const [protected]

Get the CGparameter associated to an identifier.

Parameters:
strName Parameter name.
Returns:
The CGparameter associated to the parameter.

Definition at line 49 of file KeosShaderBase.cpp.

References m_Program.


Member Data Documentation

CGprogram Keos::IShaderBase::m_Program [protected]

Program Cg associated to the shader.

Definition at line 74 of file KeosShaderBase.h.

Referenced by Keos::CD3D9Shader::CD3D9Shader(), Keos::COGLShader::COGLShader(), GetParameter(), Keos::COGLShader::GetProgram(), Keos::CD3D9Shader::GetProgram(), and ~IShaderBase().

TShaderType Keos::IShaderBase::m_Type [protected]

Shader type (vrtex / pixel).

Definition at line 76 of file KeosShaderBase.h.

Referenced by GetType().


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