"L. Spiro Engine"
|
Manages shaders in the model library. Allows shaders to be shared among models efficiently. More...
#include <LSDModelShaderManager.h>
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 |
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.
typedef struct lsd::CModelShaderManager::LSD_SHADER_FLAGS * lsd::CModelShaderManager::LPLSD_SHADER_FLAGS |
Shader flags.
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.
_sShader | The shader to which to generate and apply macros. |
_sfFlags | The flags indicating which macros to supply. |
static CSharedShaderPtr LSE_CALL lsd::CModelShaderManager::GetForwardRenderShader | ( | const LSD_SHADER_FLAGS & | _sfFlags | ) | [static] |
Get a forward-rendering shader with the specified flags.
_sfFlags | Flags for the shader to create and return. |
static CSharedShaderPtr LSE_CALL lsd::CModelShaderManager::GetForwardRenderShaderVL | ( | const LSD_SHADER_FLAGS & | _sfFlags | ) | [static] |
Get a forward-rendering vertex-lighting shader with the specified flags.
_sfFlags | Flags for the shader to create and return. |
static CSharedShaderPtr LSE_CALL lsd::CModelShaderManager::GetShadowMapShader | ( | const LSD_SHADER_FLAGS & | _sfFlags | ) | [static] |
Get a shadow mapping shader with the specified flags.
_sfFlags | Flags for the shader to create and return. |
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.
_sfFlags | Flags for the shader to create and return. |
_pcVertexFile | Vertex shader to load. |
_pcPixelFile | Pixel shader to load. |
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.