Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

# Keos::IShaderBase Class Reference

Base class for textures. More...

`#include <KeosShaderBase.h>`

Inheritance diagram for Keos::IShaderBase:

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 38 of file KeosShaderBase.cpp. References m_Program.

## Member Function Documentation

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 51 of file KeosShaderBase.cpp.

References m_Program.

Referenced by Keos::COGLShader::SetParameter(), and Keos::CD3D9Shader::SetParameter().

TShaderType Keos::IShaderBase::GetType | ( |  | ) | const

| Return the shader type. Definition at line 45 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 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.

Implemented in Keos::CD3D9Shader, and Keos::COGLShader.

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.

Implemented in Keos::CD3D9Shader, and Keos::COGLShader.

## 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 GetParameter(), 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:

- KeosEngine/KeosShaderBase.h
- KeosEngine/KeosShaderBase.cpp