"L. Spiro Engine"
Classes | Public Types | Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes

lsd::CModelShaderManager Class Reference

Manages shaders in the model library. Allows shaders to be shared among models efficiently. More...

#include <LSDModelShaderManager.h>

List of all members.

Classes

struct  LSD_SHADER_FLAGS

Public Types

typedef struct
lsd::CModelShaderManager::LSD_SHADER_FLAGS
LPLSD_SHADER_FLAGS
typedef struct
lsd::CModelShaderManager::LSD_SHADER_FLAGS 
LPCLSD_SHADER_FLAGS

Static Public Member Functions

static CSharedShaderPtr LSE_CALL GetForwardRenderShader (const LSD_SHADER_FLAGS &_sfFlags)
static CSharedShaderPtr LSE_CALL GetForwardRenderShaderVL (const LSD_SHADER_FLAGS &_sfFlags)
static CSharedShaderPtr LSE_CALL GetShadowMapShader (const LSD_SHADER_FLAGS &_sfFlags)
static LSVOID LSE_CALL DeleteUnrefedShaders ()

Static Protected Member Functions

static CSharedShaderPtr LSE_CALL NewShader (const LSD_SHADER_FLAGS &_sfFlags, const LSCHAR *_pcVertexFile, const LSCHAR *_pcPixelFile)
static LSBOOL LSE_CALL GenerateMacros (CShader &_sShader, const LSD_SHADER_FLAGS &_sfFlags)

Static Protected Attributes

static CMap< LSD_SHADER_FLAGS,
CSharedShaderPtr > 
m_mForwardShaders
static CMap< LSD_SHADER_FLAGS,
CSharedShaderPtr > 
m_mForwardShadowMapShaders
static CMap< CString, CVector
< LSUINT8, LSUINT32 > > 
m_mFileMap
static CCriticalSection m_csCrit

Detailed Description

Manages shaders in the model library. Allows shaders to be shared among models efficiently.

Class CModelShaderManager Description: Manages shaders in the model library. Allows shaders to be shared among models efficiently.


Member Typedef Documentation

Shader flags.


Member Function Documentation

static LSVOID LSE_CALL lsd::CModelShaderManager::DeleteUnrefedShaders ( ) [static]

Delete all unreferenced shaders.

static LSBOOL LSE_CALL lsd::CModelShaderManager::GenerateMacros ( CShader &  _sShader,
const LSD_SHADER_FLAGS _sfFlags 
) [static, protected]

Prepares macros for a given shader with the given flags.

Parameters:
_sShaderThe shader to which to generate and apply macros.
_sfFlagsThe flags indicating which macros to supply.
Returns:
Returns true if there were no errors generating the macros for the given shader.
static CSharedShaderPtr LSE_CALL lsd::CModelShaderManager::GetForwardRenderShader ( const LSD_SHADER_FLAGS _sfFlags) [static]

Get a forward-rendering shader with the specified flags.

Parameters:
_sfFlagsFlags for the shader to create and return.
Returns:
Returns the default shader that uses the given flags.
static CSharedShaderPtr LSE_CALL lsd::CModelShaderManager::GetForwardRenderShaderVL ( const LSD_SHADER_FLAGS _sfFlags) [static]

Get a forward-rendering vertex-lighting shader with the specified flags.

Parameters:
_sfFlagsFlags for the shader to create and return.
Returns:
Returns the default shader that uses the given flags.
static CSharedShaderPtr LSE_CALL lsd::CModelShaderManager::GetShadowMapShader ( const LSD_SHADER_FLAGS _sfFlags) [static]

Get a shadow mapping shader with the specified flags.

Parameters:
_sfFlagsFlags for the shader to create and return.
Returns:
Returns the shadow mapping shader that uses the given flags.
static CSharedShaderPtr LSE_CALL lsd::CModelShaderManager::NewShader ( const LSD_SHADER_FLAGS _sfFlags,
const LSCHAR *  _pcVertexFile,
const LSCHAR *  _pcPixelFile 
) [static, protected]

Create a new shader with the given flags using the two files given.

Parameters:
_sfFlagsFlags for the shader to create and return.
_pcVertexFileVertex shader to load.
_pcPixelFilePixel shader to load.
Returns:
Returns the shader that uses the given flags.

Member Data Documentation

CCriticalSection lsd::CModelShaderManager::m_csCrit [static, protected]

Critical section.

CMap<CString, CVector<LSUINT8, LSUINT32> > lsd::CModelShaderManager::m_mFileMap [static, protected]

A map between file names and the actual in-memory image of the file.

CMap<LSD_SHADER_FLAGS, CSharedShaderPtr> lsd::CModelShaderManager::m_mForwardShaders [static, protected]

A map of created forward-rendering shaders.

CMap<LSD_SHADER_FLAGS, CSharedShaderPtr> lsd::CModelShaderManager::m_mForwardShadowMapShaders [static, protected]

A map of created forward-rendering shadow-mapping shaders.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator