A base class for CDirectX11PixelShader and CDirectX11VertexShader which handles the common functionality between them.
More...
#include <LSGDirectX11CompiledShader.h>
List of all members.
Classes |
struct | LSG_CONSTANT_MAP |
struct | LSG_CS_CBUFFER |
Public Member Functions |
virtual LSVOID LSE_CALL | Reset () |
LSBOOL LSE_CALL | SetUniforms (const CShaderTranslationProcessorBase::LSG_UNIFORM_LIST &_ulUniforms) |
CShaderBase::LSG_HANDLE LSE_CALL | GetConstantByName (const LSCHAR *_pcName) |
LSBOOL LSE_CALL | SetFloat (CShaderBase::LSG_HANDLE _hHandle, LSFLOAT _fValue) |
LSBOOL LSE_CALL | SetFloatArray (CShaderBase::LSG_HANDLE _hHandle, const LSFLOAT *_pfValues, LSUINT32 _ui32Total) |
LSBOOL LSE_CALL | SetInt (CShaderBase::LSG_HANDLE _hHandle, LSINT32 _iValue) |
LSBOOL LSE_CALL | SetIntArray (CShaderBase::LSG_HANDLE _hHandle, const LSINT32 *_piValues, LSUINT32 _ui32Total) |
LSBOOL LSE_CALL | SetBool (CShaderBase::LSG_HANDLE _hHandle, LSBOOL _bValue) |
LSBOOL LSE_CALL | SetBoolArray (CShaderBase::LSG_HANDLE _hHandle, const LSBOOL *_pbValues, LSUINT32 _ui32Total) |
LSBOOL LSE_CALL | SetVector2 (CShaderBase::LSG_HANDLE _hHandle, const CVector2 &_vValue) |
LSBOOL LSE_CALL | SetVector2Array (CShaderBase::LSG_HANDLE _hHandle, const CVector2 *_pvValues, LSUINT32 _ui32Total) |
LSBOOL LSE_CALL | SetVector3 (CShaderBase::LSG_HANDLE _hHandle, const CVector3 &_vValue) |
LSBOOL LSE_CALL | SetVector3Array (CShaderBase::LSG_HANDLE _hHandle, const CVector3 *_pvValues, LSUINT32 _ui32Total) |
LSBOOL LSE_CALL | SetVector4 (CShaderBase::LSG_HANDLE _hHandle, const CVector4 &_vValue) |
LSBOOL LSE_CALL | SetVector4Array (CShaderBase::LSG_HANDLE _hHandle, const CVector4 *_pvValues, LSUINT32 _ui32Total) |
LSBOOL LSE_CALL | SetMatrix2x2 (CShaderBase::LSG_HANDLE _hHandle, const CMatrix2x2 &_mValue) |
LSBOOL LSE_CALL | SetMatrix3x3 (CShaderBase::LSG_HANDLE _hHandle, const CMatrix3x3 &_mValue) |
LSBOOL LSE_CALL | SetMatrix4x4 (CShaderBase::LSG_HANDLE _hHandle, const CMatrix4x4 &_mValue) |
LSBOOL LSE_CALL | SetMatrix4x4Array (CShaderBase::LSG_HANDLE _hHandle, const CMatrix4x4 *_pmValues, LSUINT32 _ui32Total) |
LSE_INLINE const void *LSE_CALL | GetBufferPointer () const |
LSE_INLINE SIZE_T LSE_CALL | GetBufferSize () const |
Protected Types |
typedef struct
lsg::CDirectX11CompiledShader::LSG_CONSTANT_MAP * | LPLSG_CONSTANT_MAP |
typedef struct
lsg::CDirectX11CompiledShader::LSG_CONSTANT_MAP | LPCLSG_CONSTANT_MAP |
typedef struct
lsg::CDirectX11CompiledShader::LSG_CS_CBUFFER * | LPLSG_CS_CBUFFER |
typedef struct
lsg::CDirectX11CompiledShader::LSG_CS_CBUFFER | LPCLSG_CS_CBUFFER |
Protected Attributes |
ID3DBlob * | m_pbShader |
CVectorPoD< ID3D11Buffer * > | m_vConstantBuffers |
CVector< LSG_CS_CBUFFER > | m_vConstBufferRawData |
CShaderTranslationProcessorBase::LSG_UNIFORM_LIST | m_ulUniforms |
CVectorPoD< LSG_CONSTANT_MAP > | m_vConstantMap |
CVectorPoD< LSUINT8, LSUINT32 > | m_vTempBuffer |
Detailed Description
A base class for CDirectX11PixelShader and CDirectX11VertexShader which handles the common functionality between them.
Class CDirectX11CompiledShader Description: A base class for CDirectX11PixelShader and CDirectX11VertexShader which handles the common functionality between them. Both classes have compiled code and a few constant buffers, and a way to convert handles from that constant table handle type to our custom handle type.
Member Typedef Documentation
Mapping of constant handles from the ID3DXConstantTable to our custom type.
A cbuffer. It is just an array of bytes and a dirty flag.
Member Function Documentation
LSE_INLINE const void *LSE_CALL lsg::CDirectX11CompiledShader::GetBufferPointer |
( |
| ) |
const |
Gets the blob's signature.
- Returns:
- Returns a constant pointer to the blob data.
LSE_INLINE SIZE_T LSE_CALL lsg::CDirectX11CompiledShader::GetBufferSize |
( |
| ) |
const |
Gets the blob's size.
- Returns:
- Returns the size of the blob data.
Get a handle for a uniform variable in the shader.
- Parameters:
-
_pcName | Name of the variable whose handle is to be obtained. |
- Returns:
- Returns the handle to the given variable or ~0UL if the given name does not exist.
virtual LSVOID LSE_CALL lsg::CDirectX11CompiledShader::Reset |
( |
| ) |
[virtual] |
Set a single boolean value in the shader of type int. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_bValue | New value. |
- Returns:
- Returns true if the value was set in the shader.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetBoolArray |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const LSBOOL * |
_pbValues, |
|
|
LSUINT32 |
_ui32Total |
|
) |
| |
Set an array of boolean values in the shader. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_piValues | New values. |
_ui32Total | Total ints to set. |
- Returns:
- Returns true if the values were set in the shader.
Set a single scalar value in the shader of type float. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_fValue | New value. |
- Returns:
- Returns true if the value was set in the shader.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetFloatArray |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const LSFLOAT * |
_pfValues, |
|
|
LSUINT32 |
_ui32Total |
|
) |
| |
Set an array of scalar values in the shader of type float. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_pfValues | New values. |
_ui32Total | Total floats to set. |
- Returns:
- Returns true if the values were set in the shader.
Set a single scalar value in the shader of type int. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_iValue | New value. |
- Returns:
- Returns true if the value was set in the shader.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetIntArray |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const LSINT32 * |
_piValues, |
|
|
LSUINT32 |
_ui32Total |
|
) |
| |
Set an array of scalar values in the shader of type int. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_piValues | New values. |
_ui32Total | Total ints to set. |
- Returns:
- Returns true if the values were set in the shader.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetMatrix2x2 |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const CMatrix2x2 & |
_mValue |
|
) |
| |
Set a 2-by-2 matrix in a shader. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_mValue | New value. |
- Returns:
- Returns true if the value was set in the shader.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetMatrix3x3 |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const CMatrix3x3 & |
_mValue |
|
) |
| |
Set a 3-by-3 matrix in a shader. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_mValue | New value. |
- Returns:
- Returns true if the value was set in the shader.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetMatrix4x4 |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const CMatrix4x4 & |
_mValue |
|
) |
| |
Set a 4-by-4 matrix in a shader. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_mValue | New value. |
- Returns:
- Returns true if the value was set in the shader.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetMatrix4x4Array |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const CMatrix4x4 * |
_pmValues, |
|
|
LSUINT32 |
_ui32Total |
|
) |
| |
Set an array of 4-by-4 matrices in a shader. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_pmValues | New values. |
_ui32Total | Total ints to set. |
- Returns:
- Returns true if the values were set in the shader.
Set the uniforms associated with this shader.
- Parameters:
-
_ulUniforms | The uniforms to copy to this shader. |
- Returns:
- Returns true if there is enough memory to copy the list of uniforms.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetVector2 |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const CVector2 & |
_vValue |
|
) |
| |
Set a 2-dimensional vector in the shader of type int. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_vValue | New value. |
- Returns:
- Returns true if the value was set in the shader.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetVector2Array |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const CVector2 * |
_pvValues, |
|
|
LSUINT32 |
_ui32Total |
|
) |
| |
Set a 2-dimensional vector array in the shader of type int. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_vValue | New values. |
_ui32Total | Total ints to set. |
- Returns:
- Returns true if the values were set in the shader.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetVector3 |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const CVector3 & |
_vValue |
|
) |
| |
Set a 3-dimensional vector in the shader of type int. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_vValue | New value. |
- Returns:
- Returns true if the value was set in the shader.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetVector3Array |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const CVector3 * |
_pvValues, |
|
|
LSUINT32 |
_ui32Total |
|
) |
| |
Set a 3-dimensional vector array in the shader of type int. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_vValue | New values. |
_ui32Total | Total ints to set. |
- Returns:
- Returns true if the values were set in the shader.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetVector4 |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const CVector4 & |
_vValue |
|
) |
| |
Set a 4-dimensional vector in the shader of type int. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_vValue | New value. |
- Returns:
- Returns true if the value was set in the shader.
LSBOOL LSE_CALL lsg::CDirectX11CompiledShader::SetVector4Array |
( |
CShaderBase::LSG_HANDLE |
_hHandle, |
|
|
const CVector4 * |
_pvValues, |
|
|
LSUINT32 |
_ui32Total |
|
) |
| |
Set a 4-dimensional vector array in the shader of type int. Shader must be active.
- Parameters:
-
_hHandle | Handle to the value to set in the shader. |
_vValue | New values. |
_ui32Total | Total ints to set. |
- Returns:
- Returns true if the values were set in the shader.
Member Data Documentation
Uniform globals in the shaders.
Constant tables, one for each cbuffer.
Map of constants and their handles/other data related to them.
The documentation for this class was generated from the following file: