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

# Keos::IRenderSystem Class Reference

Abstract class for renderer systems. More...

`#include <KeosRenderSystem.h>`

Inheritance diagram for Keos::IRenderSystem:

List of all members.

## Public Member Functions

| IRenderSystem ()
| Constructor.
virtual | ~IRenderSystem ()
| Destructor.
virtual const String & | GetName (void) const =0
| Returns the name of the rendering system.
virtual IRenderWindow * | Initialise (bool bAutoCreateWindow, const String &strWindowTitle="KEOS Render Window")
| Start up the renderer using the settings selected (Or the defaults if none have been selected).
virtual IRenderWindow * | CreateRenderWindow (const String &strName, uint nWidth, uint nHeight, uint nColourDepth, bool bFullScreen)=0
| Create a new rendering window.
virtual void | Reinitialise (void)=0
| Restart the renderer.
virtual void | Shutdown (void)
| Shutdown the renderer and cleanup resources.
void | AttachRenderTarget (IRenderTarget &target, bool bIsWindow=true)
| Attaches the passed render target to the render system.
bool | SetRenderApp (IRenderApp *pRenderApp)
| Attaches a IRenderApp interface to render window.
bool | SetRenderApp (IRenderApp *pRenderApp, String &strTargetName)
| Attaches a IRenderApp interface to a specified render target.
const CRenderSystemCapabilities * | GetCapabilities (void) const
| Gets the capabilities of the render system.
virtual void | BeginScene (void) const =0
| Start a scene render.
virtual void | EndScene (void) const =0
| End a scene render.
virtual void | PrintInfo (void) const =0
| Print information on the API.
void | InitAllRenderTargets (void)
| Initialise all render targets attached to this rendering system.
void | UpdateAllRenderTargets (void)
| Method for updating all render targets attached to this rendering system.
void | DestroyRenderTarget (const String &strName)
| Destroys a render target.
IRenderTarget * | DetachRenderTarget (const String &strName)
| Detaches the render target with the passed name from the render system.
IRenderTarget * | GetRenderTarget (const String &strName)
| Returns a pointer to the render target with the passed name.
virtual IBufferBase * | _CreateVB (ulong nSize, ulong nStride, ulong nFlags) const =0
| Create a vertex buffer.
virtual IBufferBase * | _CreateIB (ulong nSize, ulong nStride, ulong nFlags) const =0
| Create a index buffer.
virtual IDeclaration * | CreateDeclaration (const TDeclarationElement *pElements, size_t nCount) const =0
| Create a vertex declaration.
virtual void | _SetVB (uint nStream, const IBufferBase *pBuffer, ulong nStride, ulong nMinVertex, ulong nMaxVertex)=0
| Change the current vertex buffer.
virtual void | _SetIB (const IBufferBase *pBuffer, ulong nStride)=0
| Change the current index buffer.
virtual void | SetDeclaration (const IDeclaration *pDeclaration)=0
| Change the current vertex declaration.
virtual void | DrawPrimitives (TPrimitiveType Type, ulong nFirstVertex, ulong nCount) const =0
| Draw primitives.
virtual void | DrawIndexedPrimitives (TPrimitiveType Type, ulong nFirstIndex, ulong nCount) const =0
| Draw indexed primitives.
virtual void | PushMatrix (TMatrixType Type)=0
| Push the current matix.
virtual void | PopMatrix (TMatrixType Type)=0
| Pop the current matix.
virtual void | LoadMatrix (TMatrixType Type, const CMatrix4 &Matrix)=0
| Load a matrix.
virtual void | LoadMatrixMult (TMatrixType Type, const CMatrix4 &Matrix)=0
| Load a matrix by multiplying it with the previous one.
virtual void | GetMatrix (TMatrixType Type, CMatrix4 &Matrix) const =0
| Get the current matrix.
virtual ulong | ConvertColor (const CColor &Color) const =0
| Converts a color in the format taken care by the API.
template<class T>
CBuffer< T > | CreateVertexBuffer (ulong nSize, ulong nFlags, const T *pData=NULL) const
| Create a vertex buffer.
template<class T>
CBuffer< T > | CreateIndexBuffer (ulong nSize, ulong nFlags, const T *pData=NULL) const
| Create a index buffer.
template<class T>
void | SetVertexBuffer (uint nStream, const CBuffer< T > &Buffer, ulong nMinVertex=0, ulong nMaxVertex=0)
| Change the current vertex buffer.
template<class T>
void | SetIndexBuffer (const CBuffer< T > &Buffer)
| Change the current index buffer.
template<size_t N>
IDeclaration * | CreateVertexDeclaration (const TDeclarationElement(&Elements)[N]) const
| Create a vertex declaration.
virtual ITextureBase * | CreateTexture (const TVector2I &Size, TPixelFormat Format, ulong nFlags=0) const =0
| Create a new texture.
virtual void | SetTexture (uint nUnit, const ITextureBase *pTexture) const =0
| Change a texture.
virtual void | InitConfigOptions (void)
| Initialize the config options of the render system.
virtual void | SetConfigOption (const String &strName, const String &strValue)
| Change an config option.
virtual ConfigOptionMap | GetConfigOptions ()
| Get the config options map.
virtual void | SetupAlphaBlending (TBlend Src, TBlend Dest) const =0
| Setup the alpha-blending.
virtual void | SetupTextureUnit (uint nUnit, TTextureOp Op, TTextureArg Arg1, TTextureArg Arg2=TXA_DIFFUSE, const CColor &Constant=0x00) const =0
| Setup the operations of one texture unit.
virtual void | Enable (TRenderParameter Param, bool bValue) const =0
| Enable/Disable a render parameter.
CGprofile | GetShaderProfile (TShaderType Type) const
| Return the profile of shader to be used.
const char *const * | GetShaderOptions (TShaderType Type) const
| Return the options to be used for the creation of shaders.
virtual IShaderBase * | CreateShader (CGprogram Program, TShaderType Type) const =0
| Create a shader from a program Cg.
virtual void | SetVertexShader (const IShaderBase *pShader)=0
| Change the current vertex shader.
virtual void | SetPixelShader (const IShaderBase *pShader)=0
| Change the current pixel shader.
virtual void | SetClearColor (const CColor &Color)=0
| Change the current clear color.

## Protected Attributes

IRenderWindow * | m_pRenderWindow
| Pointer on the render window using this render system (only one).
RenderTargetMap | m_RenderTargets
| The render targets using this render system.
CRenderSystemCapabilities * | m_pCapabilities
| Used to store the capabilities of the graphics card.
ConfigOptionMap | m_Options
| Stored options.
CGprofile | m_VSProfile
| Vertex shaders profile.
CGprofile | m_PSProfile
| Pixel shaders profile.
const char * | m_VSOptions [2]
| Vertex shaders options.
const char * | m_PSOptions [2]
| Pixel shaders options.
CColor | m_ClearColor
| Clear color (background color).

## Detailed Description

Abstract class for renderer systems.

Definition at line 47 of file KeosRenderSystem.h.

## Constructor & Destructor Documentation

Keos::IRenderSystem::IRenderSystem | ( |  | ) |

| Constructor. Definition at line 32 of file KeosRenderSystem.cpp. References InitConfigOptions(), m_pCapabilities, and m_pRenderWindow.

Keos::IRenderSystem::~IRenderSystem | ( |  | ) | `[virtual]`

| Destructor. Definition at line 42 of file KeosRenderSystem.cpp. References m_pCapabilities.

## Member Function Documentation

virtual IBufferBase* Keos::IRenderSystem::_CreateIB | ( | ulong | nSize,
|  | ulong | nStride,
|  | ulong | nFlags
| ) | const`[pure virtual]`

| Create a index buffer.

Parameters:

  | nSize | Elements number.
  | nStride | One element size.
  | nFlags | Creation options.

Returns:
  Pointer on the new index buffer.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

Referenced by CreateIndexBuffer().

virtual IBufferBase* Keos::IRenderSystem::_CreateVB | ( | ulong | nSize,
|  | ulong | nStride,
|  | ulong | nFlags
| ) | const`[pure virtual]`

| Create a vertex buffer.

Parameters:

  | nSize | Elements number.
  | nStride | One element size.
  | nFlags | Creation options.

Returns:
  Pointer on the new vertex buffer.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

Referenced by CreateVertexBuffer().

virtual void Keos::IRenderSystem::_SetIB | ( | const IBufferBase * | pBuffer,
|  | ulong | nStride
| ) | `[pure virtual]`

| Change the current index buffer.

Parameters:

  | pBuffer | Pointer on the buffer.
  | nStride | Size of one index.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

Referenced by SetIndexBuffer().

virtual void Keos::IRenderSystem::_SetVB | ( | uint | nStream,
|  | const IBufferBase * | pBuffer,
|  | ulong | nStride,
|  | ulong | nMinVertex,
|  | ulong | nMaxVertex
| ) | `[pure virtual]`

| Change the current vertex buffer.

Parameters:

  | nStream | Stream.
  | pBuffer | Pointer on the buffer.
  | nStride | Size of one vertex.
  | nMinVertex | Minimum vertex index.
  | nMaxVertex | Maximum vertex index.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

Referenced by SetVertexBuffer().

void Keos::IRenderSystem::AttachRenderTarget | ( | IRenderTarget & | target,
|  | bool | bIsWindow = `true`
| ) |

| Attaches the passed render target to the render system. Definition at line 103 of file KeosRenderSystem.cpp. References m_pRenderWindow, and m_RenderTargets. Referenced by Keos::COGLRenderSystem::CreateRenderWindow(), and Keos::CD3D9RenderSystem::CreateRenderWindow().

virtual void Keos::IRenderSystem::BeginScene | ( | void |  | ) | const`[pure virtual]`

| Start a scene render. Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem. Referenced by UpdateAllRenderTargets().

virtual ulong Keos::IRenderSystem::ConvertColor | ( | const CColor & | Color | ) | const`[pure virtual]`

| Converts a color in the format taken care by the API.

Parameters:

  | Color | Color to be converted.

Returns:
  Colour converted in the form of unsigned long.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual IDeclaration* Keos::IRenderSystem::CreateDeclaration | ( | const TDeclarationElement * | pElements,
|  | size_t | nCount
| ) | const`[pure virtual]`

| Create a vertex declaration.

Parameters:

  | pElements | Declaration description.
  | nCount | Number of elements in the array.

Returns:
  Pointer on the new declaration.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

Referenced by CreateVertexDeclaration().

template<class T>
CBuffer< T > Keos::IRenderSystem::CreateIndexBuffer | ( | ulong | nSize,
|  | ulong | nFlags,
|  | const T * | pData = `NULL`
| ) | const`[inline]`

| Create a index buffer.

Parameters:

  | nSize | Elements number.
  | nFlags | Creation options.
  | pData | Pointer on the data.

Returns:
  The new index buffer.

Definition at line 409 of file KeosRenderSystem.h.

References _CreateIB(), and Keos::CBuffer< T >::Fill().

virtual IRenderWindow* Keos::IRenderSystem::CreateRenderWindow | ( | const String & | strName,
|  | uint | nWidth,
|  | uint | nHeight,
|  | uint | nColourDepth,
|  | bool | bFullScreen
| ) | `[pure virtual]`

| Create a new rendering window.

Parameters:

  | strName | Name of the window.
  | nWidth | Window width (pixels).
  | nHeight | Window height (pixels).
  | nColourDepth | Colour depth.
  | bFullScreen | Fullscreen mode.

Returns:
  A pointer to the created window.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual IShaderBase* Keos::IRenderSystem::CreateShader | ( | CGprogram | Program,
|  | TShaderType | Type
| ) | const`[pure virtual]`

| Create a shader from a program Cg.

Parameters:

  | Program | Cg program.
  | Type | Shader type.

Returns:
  Created and loaded shader.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual ITextureBase* Keos::IRenderSystem::CreateTexture | ( | const TVector2I & | Size,
|  | TPixelFormat | Format,
|  | ulong | nFlags = `0`
| ) | const`[pure virtual]`

| Create a new texture.

Parameters:

  | Size | Texture size.
  | Format | Pixels format.
  | nFlags | Creation options.

Returns:
  Pointer on the created texture.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

template<class T>
CBuffer< T > Keos::IRenderSystem::CreateVertexBuffer | ( | ulong | nSize,
|  | ulong | nFlags,
|  | const T * | pData = `NULL`
| ) | const`[inline]`

| Create a vertex buffer.

Parameters:

  | nSize | Elements number.
  | nFlags | Creation options.
  | pData | Pointer on the data.

Returns:
  The new vertex buffer.

Definition at line 398 of file KeosRenderSystem.h.

References _CreateVB(), and Keos::CBuffer< T >::Fill().

template<size_t N>
IDeclaration * Keos::IRenderSystem::CreateVertexDeclaration | ( | const TDeclarationElement & | Elements[N] | ) | const

| Create a vertex declaration.

Parameters:

  | Elements | Declaration description.

Returns:
  Pointer on the new declaration.

Definition at line 434 of file KeosRenderSystem.h.

References CreateDeclaration().

void Keos::IRenderSystem::DestroyRenderTarget | ( | const String & | strName | ) |

| Destroys a render target.

Parameters:

  | strName | Name of the target.

Definition at line 69 of file KeosRenderSystem.cpp.

References DetachRenderTarget().

IRenderTarget * Keos::IRenderSystem::DetachRenderTarget | ( | const String & | strName | ) |

| Detaches the render target with the passed name from the render system.

Parameters:

  | strName | Name of the target.

Returns:
  Pointer on the target, NULL if that render target cannot be found.

Definition at line 111 of file KeosRenderSystem.cpp.

References m_RenderTargets.

Referenced by DestroyRenderTarget().

virtual void Keos::IRenderSystem::DrawIndexedPrimitives | ( | TPrimitiveType | Type,
|  | ulong | nFirstIndex,
|  | ulong | nCount
| ) | const`[pure virtual]`

| Draw indexed primitives.

Parameters:

  | Type | Primitive type.
  | nFirstIndex | First index position.
  | nCount | Number of triangles.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual void Keos::IRenderSystem::DrawPrimitives | ( | TPrimitiveType | Type,
|  | ulong | nFirstVertex,
|  | ulong | nCount
| ) | const`[pure virtual]`

| Draw primitives.

Parameters:

  | Type | Primitive type.
  | nFirstVertex | First vertex position.
  | nCount | Number of triangles.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual void Keos::IRenderSystem::Enable | ( | TRenderParameter | Param,
|  | bool | bValue
| ) | const`[pure virtual]`

| Enable/Disable a render parameter.

Parameters:

  | Param | Render parameter.
  | bValue | Value (on/off).

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual void Keos::IRenderSystem::EndScene | ( | void |  | ) | const`[pure virtual]`

| End a scene render. Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem. Referenced by UpdateAllRenderTargets().

const CRenderSystemCapabilities* Keos::IRenderSystem::GetCapabilities | ( | void |  | ) | const`[inline]`

| Gets the capabilities of the render system. Definition at line 114 of file KeosRenderSystem.h. Referenced by Keos::COGLRenderSystem::CreateTexture(), and Keos::CD3D9RenderSystem::CreateTexture().

virtual ConfigOptionMap Keos::IRenderSystem::GetConfigOptions | ( |  | ) | `[inline, virtual]`

| Get the config options map. Definition at line 306 of file KeosRenderSystem.h. Referenced by Keos::CWin32ConfigDialog::DlgProc(), and Keos::CRoot::SaveConfig().

virtual void Keos::IRenderSystem::GetMatrix | ( | TMatrixType | Type,
|  | CMatrix4 & | Matrix
| ) | const`[pure virtual]`

| Get the current matrix.

Parameters:

  | Type | Matrix type.
  | Matrix | Destination matrix.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual const String& Keos::IRenderSystem::GetName | ( | void |  | ) | const`[pure virtual]`

| Returns the name of the rendering system. Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem. Referenced by Keos::CRoot::SaveConfig().

IRenderTarget * Keos::IRenderSystem::GetRenderTarget | ( | const String & | strName | ) |

| Returns a pointer to the render target with the passed name.

Parameters:

  | strName | Name of the target.

Returns:
  Pointer on the target, NULL if that render target cannot be found.

Definition at line 76 of file KeosRenderSystem.cpp.

References m_RenderTargets.

const char *const * Keos::IRenderSystem::GetShaderOptions | ( | TShaderType | Type | ) | const

| Return the options to be used for the creation of shaders.

Parameters:

  | Type | Shader type.

Returns:
  Options corresponding to the type of shader.

Definition at line 237 of file KeosRenderSystem.cpp.

References m_PSOptions, m_VSOptions, and Keos::SHADER_VERTEX.

CGprofile Keos::IRenderSystem::GetShaderProfile | ( | TShaderType | Type | ) | const

| Return the profile of shader to be used.

Parameters:

  | Type | Shader type.

Returns:
  Profile corresponding to the type of shader.

Definition at line 230 of file KeosRenderSystem.cpp.

References m_PSProfile, m_VSProfile, and Keos::SHADER_VERTEX.

void Keos::IRenderSystem::InitAllRenderTargets | ( | void |  | ) |

| Initialise all render targets attached to this rendering system. Definition at line 127 of file KeosRenderSystem.cpp. References Keos::IRenderTarget::Init(), m_RenderTargets, and Keos::IRenderTarget::ResetStatistics(). Referenced by Keos::CRoot::StartRendering().

void Keos::IRenderSystem::InitConfigOptions | ( | void |  | ) | `[virtual]`

| Initialize the config options of the render system. Definition at line 173 of file KeosRenderSystem.cpp. References Keos::_ConfigOption::currentValue, Keos::_ConfigOption::immutable, m_Options, Keos::_ConfigOption::name, and Keos::_ConfigOption::possibleValues.

Referenced by IRenderSystem().

IRenderWindow * Keos::IRenderSystem::Initialise | ( | bool | bAutoCreateWindow,
|  | const String & | strWindowTitle = `"KEOS Render Window"`
| ) | `[virtual]`

| Start up the renderer using the settings selected (Or the defaults if none have been selected).

Parameters:

  | bAutoCreateWindow | If true, creates a render window automatically, based on settings chosen so far. This saves an extra call to RenderSystem::CreateRenderWindow for the main render window.
  | strWindowTitle | Window title.

Returns:
  A pointer to the automatically created window, if requested, otherwise null.

Reimplemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

Definition at line 48 of file KeosRenderSystem.cpp.

Referenced by Keos::CRoot::Initialise().

virtual void Keos::IRenderSystem::LoadMatrix | ( | TMatrixType | Type,
|  | const CMatrix4 & | Matrix
| ) | `[pure virtual]`

| Load a matrix.

Parameters:

  | Type | Matrix type.
  | Matrix | New matrix.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual void Keos::IRenderSystem::LoadMatrixMult | ( | TMatrixType | Type,
|  | const CMatrix4 & | Matrix
| ) | `[pure virtual]`

| Load a matrix by multiplying it with the previous one.

Parameters:

  | Type | Matrix type.
  | Matrix | New matrix.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual void Keos::IRenderSystem::PopMatrix | ( | TMatrixType | Type | ) | `[pure virtual]`

| Pop the current matix.

Parameters:

  | Type | Matrix type.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual void Keos::IRenderSystem::PrintInfo | ( | void |  | ) | const`[pure virtual]`

| Print information on the API. Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual void Keos::IRenderSystem::PushMatrix | ( | TMatrixType | Type | ) | `[pure virtual]`

| Push the current matix.

Parameters:

  | Type | Matrix type.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual void Keos::IRenderSystem::Reinitialise | ( | void |  | ) | `[pure virtual]`

| Restart the renderer. Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual void Keos::IRenderSystem::SetClearColor | ( | const CColor & | Color | ) | `[pure virtual]`

| Change the current clear color.

Parameters:

  | Color | New clear color.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

void Keos::IRenderSystem::SetConfigOption | ( | const String & | strName,
|  | const String & | strValue
| ) | `[virtual]`

| Change an config option. Definition at line 215 of file KeosRenderSystem.cpp. References Keos::_ConfigOption::currentValue, and m_Options. Referenced by Keos::CWin32ConfigDialog::DlgProc(), and Keos::CRoot::RestoreConfig().

virtual void Keos::IRenderSystem::SetDeclaration | ( | const IDeclaration * | pDeclaration | ) | `[pure virtual]`

| Change the current vertex declaration.

Parameters:

  | pDeclaration | The new declaration.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

template<class T>
void Keos::IRenderSystem::SetIndexBuffer | ( | const CBuffer< T > & | Buffer | ) | `[inline]`

| Change the current index buffer.

Parameters:

  | Buffer | Buffer.

Definition at line 427 of file KeosRenderSystem.h.

References _SetIB().

virtual void Keos::IRenderSystem::SetPixelShader | ( | const IShaderBase * | pShader | ) | `[pure virtual]`

| Change the current pixel shader.

Parameters:

  | pShader | New shader.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

bool Keos::IRenderSystem::SetRenderApp | ( | IRenderApp * | pRenderApp,
|  | String & | strTargetName
| ) |

| Attaches a IRenderApp interface to a specified render target.

Parameters:

  | pRenderApp | Interface for render of the target.
  | strTargetName | Name of the target.

Returns:
  False if that render target cannot be found.

Definition at line 90 of file KeosRenderSystem.cpp.

References m_RenderTargets, and Keos::IRenderTarget::SetRenderApp().

bool Keos::IRenderSystem::SetRenderApp | ( | IRenderApp * | pRenderApp | ) | `[inline]`

| Attaches a IRenderApp interface to render window.

Parameters:

  | pRenderApp | Interface for render of the window.

Definition at line 98 of file KeosRenderSystem.h.

virtual void Keos::IRenderSystem::SetTexture | ( | uint | nUnit,
|  | const ITextureBase * | pTexture
| ) | const`[pure virtual]`

| Change a texture.

Parameters:

  | nUnit | Texture unit.
  | pTexture | The new texture.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual void Keos::IRenderSystem::SetupAlphaBlending | ( | TBlend | Src,
|  | TBlend | Dest
| ) | const`[pure virtual]`

| Setup the alpha-blending.

Parameters:

  | Src | Source parameter.
  | Dest | Destination parameter.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

virtual void Keos::IRenderSystem::SetupTextureUnit | ( | uint | nUnit,
|  | TTextureOp | Op,
|  | TTextureArg | Arg1,
|  | TTextureArg | Arg2 = `TXA_DIFFUSE`,
|  | const CColor & | Constant = `0x00`
| ) | const`[pure virtual]`

| Setup the operations of one texture unit.

Parameters:

  | nUnit | Texture unit.
  | Op | Operator.
  | Arg1 | First argument.
  | Arg2 | Second argument.
  | Constant | Constant in the case of one argument is TXA_CONSTANT.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

template<class T>
void Keos::IRenderSystem::SetVertexBuffer | ( | uint | nStream,
|  | const CBuffer< T > & | Buffer,
|  | ulong | nMinVertex = `0`,
|  | ulong | nMaxVertex = `0`
| ) | `[inline]`

| Change the current vertex buffer.

Parameters:

  | nStream | Stream.
  | Buffer | Buffer.
  | nMinVertex | Minimum vertex index.
  | nMaxVertex | Maximum vertex index.

Definition at line 420 of file KeosRenderSystem.h.

References _SetVB().

virtual void Keos::IRenderSystem::SetVertexShader | ( | const IShaderBase * | pShader | ) | `[pure virtual]`

| Change the current vertex shader.

Parameters:

  | pShader | New shader.

Implemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem.

void Keos::IRenderSystem::Shutdown | ( | void |  | ) | `[virtual]`

| Shutdown the renderer and cleanup resources. Reimplemented in Keos::CD3D9RenderSystem, and Keos::COGLRenderSystem. Definition at line 54 of file KeosRenderSystem.cpp. References m_RenderTargets. Referenced by Keos::CRoot::SetRenderSystem().

void Keos::IRenderSystem::UpdateAllRenderTargets | ( | void |  | ) |

| Method for updating all render targets attached to this rendering system. Definition at line 141 of file KeosRenderSystem.cpp. References Assert, BeginScene(), EndScene(), Keos::IRenderTarget::IsActive(), Keos::IRenderTarget::IsAutoUpdated(), Keos::IRenderWindow::IsClosed(), m_pRenderWindow, m_RenderTargets, Keos::IRenderWindow::SwapBuffers(), and Keos::IRenderTarget::Update().

Referenced by Keos::CRoot::RenderOneFrame().

## Member Data Documentation

CColor Keos::IRenderSystem::m_ClearColor`[protected]`

| Clear color (background color). Definition at line 388 of file KeosRenderSystem.h.

ConfigOptionMap Keos::IRenderSystem::m_Options`[protected]`

| Stored options. Definition at line 376 of file KeosRenderSystem.h. Referenced by InitConfigOptions(), and SetConfigOption().

CRenderSystemCapabilities* Keos::IRenderSystem::m_pCapabilities`[protected]`

| Used to store the capabilities of the graphics card. Definition at line 373 of file KeosRenderSystem.h. Referenced by IRenderSystem(), and ~IRenderSystem().

IRenderWindow* Keos::IRenderSystem::m_pRenderWindow`[protected]`

| Pointer on the render window using this render system (only one). Definition at line 367 of file KeosRenderSystem.h. Referenced by AttachRenderTarget(), IRenderSystem(), and UpdateAllRenderTargets().

const char* Keos::IRenderSystem::m_PSOptions[2]`[protected]`

| Pixel shaders options. Definition at line 385 of file KeosRenderSystem.h. Referenced by GetShaderOptions().

CGprofile Keos::IRenderSystem::m_PSProfile`[protected]`

| Pixel shaders profile. Definition at line 381 of file KeosRenderSystem.h. Referenced by GetShaderProfile().

RenderTargetMap Keos::IRenderSystem::m_RenderTargets`[protected]`

| The render targets using this render system. Definition at line 370 of file KeosRenderSystem.h. Referenced by AttachRenderTarget(), DetachRenderTarget(), GetRenderTarget(), InitAllRenderTargets(), SetRenderApp(), Shutdown(), and UpdateAllRenderTargets().

const char* Keos::IRenderSystem::m_VSOptions[2]`[protected]`

| Vertex shaders options. Definition at line 383 of file KeosRenderSystem.h. Referenced by GetShaderOptions().

CGprofile Keos::IRenderSystem::m_VSProfile`[protected]`

| Vertex shaders profile. Definition at line 379 of file KeosRenderSystem.h. Referenced by GetShaderProfile().

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

- KeosEngine/KeosRenderSystem.h
- KeosEngine/KeosRenderSystem.cpp