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

# Keos::CShader Class Reference

Wrapper class for the ITextureBase. 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 IShaderBase * | GetShader () 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).

## Private Attributes

CSmartPtr< IShaderBase, CCOMRefCounted > | m_Shader
| Pointer on the shader.

## Detailed Description

Wrapper class for the ITextureBase.

Definition at line 33 of file KeosShader.h.

## Member Function Documentation

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.

References m_Shader.

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 m_Shader.

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 m_Shader.

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.

References m_Shader.

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 m_Shader.

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 m_Shader.

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 m_Shader.

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.

References m_Shader.

void Keos::CShader::Unload | ( |  | ) |

| Unload the shader. Definition at line 50 of file KeosShader.cpp. References m_Shader.

## Member Data Documentation

CSmartPtr<IShaderBase, CCOMRefCounted> Keos::CShader::m_Shader`[private]`

| Pointer on the shader. Definition at line 92 of file KeosShader.h. Referenced by GetShader(), LoadFromFile(), SetParameter(), and Unload().

The documentation for this class was generated from the following files:

- KeosEngine/KeosShader.h
- KeosEngine/KeosShader.cpp