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

# Keos::CShadersLoader Class Reference

Class managing the load of shaders. More...

`#include <KeosShadersLoader.h>`

Inheritance diagram for Keos::CShadersLoader:

List of all members.

## Public Member Functions

| CShadersLoader (TShaderType Type)
| Build the loader.
| ~CShadersLoader ()
| Destruct the loader.
virtual IShaderBase * | LoadFromFile (const String &strFilename)
| Load a shader from a file.

## Static Private Member Functions

static void | OnError ()
| Callback called in case of error Cg.

## Private Attributes

CGcontext | m_Context
| Cg context.
TShaderType | m_Type
| Type of the managed shaders.

## Detailed Description

Class managing the load of shaders.

Use the Cg library.

Definition at line 37 of file KeosShadersLoader.h.

## Constructor & Destructor Documentation

Keos::CShadersLoader::CShadersLoader | ( | TShaderType | Type | ) |

| Build the loader.

Parameters:

  | Type | Type of the managed shaders.

Definition at line 32 of file KeosShadersLoader.cpp.

References m_Context, and OnError().

Keos::CShadersLoader::~CShadersLoader | ( |  | ) |

| Destruct the loader. Definition at line 43 of file KeosShadersLoader.cpp. References m_Context.

## Member Function Documentation

IShaderBase * Keos::CShadersLoader::LoadFromFile | ( | const String & | strFilename | ) | `[virtual]`

| Load a shader from a file.

Parameters:

  | strFilename | Path of the file to be loaded.

Returns:
  Pointer on the shader loaded.

Reimplemented from Keos::ILoader< IShaderBase >.

Definition at line 53 of file KeosShadersLoader.cpp.

References Keos::CAP_FRAGMENT_PROGRAM, Keos::CAP_VERTEX_PROGRAM, LOADINGFAILED_EXCEPT, m_Context, m_Type, Renderer, Keos::SHADER_PIXEL, and Keos::SHADER_VERTEX.

void Keos::CShadersLoader::OnError | ( |  | ) | `[static, private]`

| Callback called in case of error Cg. Definition at line 81 of file KeosShadersLoader.cpp. Referenced by CShadersLoader().

## Member Data Documentation

CGcontext Keos::CShadersLoader::m_Context`[private]`

| Cg context. Definition at line 63 of file KeosShadersLoader.h. Referenced by CShadersLoader(), LoadFromFile(), and ~CShadersLoader().

TShaderType Keos::CShadersLoader::m_Type`[private]`

| Type of the managed shaders. Definition at line 65 of file KeosShadersLoader.h. Referenced by LoadFromFile().

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

- KeosEngine/KeosShadersLoader.h
- KeosEngine/KeosShadersLoader.cpp