Rasterfarm-SDK
Loading...
Searching...
No Matches
ShadowMap::ShadowMaterial Class Reference

#include <shadowmap.h>

Inheritance diagram for ShadowMap::ShadowMaterial:
Surface::Material Program DynamicType

Public Member Functions

 ShadowMaterial (Surface::Material *pMaterial)
 
virtual ~ShadowMaterial ()
 
virtual void init ()
 
virtual void update ()
 
- Public Member Functions inherited from Surface::Material
 Material (Render::Model::Position *pPosition, MaterialManager *pManager)
 
 Material (Render::Model::Position *pPosition, MaterialManager *pManager, size_t startElementIndex, size_t indexElementSize)
 
virtual ~Material ()
 
virtual void perform ()
 
bool isInitialized ()
 
virtual void setModelView (const Matrix4f &model, const Matrix4f &view)
 
void setFragmentColor (const Vector4f &color)
 
void addNormal (Render::Normal *pNormal)
 
void addColorSampler (Render::Color::Texel::Sampler *pComponent)
 
void addColorFactor (Render::Color::Pixel::Factor *pComponent)
 
void addColorFilter (Render::Color::Function::Filter *pComponent)
 
void addModelUpdate (Render::ModelUpdate *pModelUpdate)
 
void addViewUpdate (Render::ViewUpdate *pViewUpdate)
 
void addModelViewUpdate (Render::ModelViewUpdate *pModelViewUpdate)
 
void addAttributeBuffer (AttributeLocation location, void *pArray, size_t arrayLength, uint componentSize, BufferType componentType)
 
void updateAttributeBuffer (AttributeLocation location, void *pArray, size_t arrayLength, size_t offset=0)
 
Engine::UniformgetUniform (UniformBinding binding)
 
String assembleShaderCode (ShaderType type)
 
const String & getShaderGlobalCode (ShaderType type)
 
const String & getShaderMainCode (ShaderType type)
 
const String & getShaderFunctionCode (ShaderType type)
 
Render::Model::PositiongetPosition ()
 
ElementBuffergetElementBuffer ()
 
virtual void initElements (Shape::Geometry *pGeometry)
 
virtual void updateElements (Shape::Geometry *pGeometry)
 
virtual void submit ()
 
void addShaderFunctionCode (ShaderType type, String code)
 Add a new GLSL function to shader code.
 
void addShaderGlobalDefinitionCode (ShaderType type, String code)
 Add a new GLSL variable or define to shader code.
 
void appendShaderMainCode (ShaderType type, String code)
 Append code to main() function of shader code. Code should be non-dependent on existing code within main.
 
void addGlobalsToShaderCode ()
 
size_t getStartElementIndex () const
 
size_t getIndexElementSize () const
 
void setIndexElementSize (size_t size)
 
template<class C >
C * getNormal ()
 
template<class C >
List< C * > getColorSamplerList ()
 
template<class C >
List< C * > getColorFactorList ()
 
template<class C >
List< C * > getColorFilterList ()
 
template<class C >
Handle getColorFilterIndex (C *pObject)
 
template<class C >
Handle getColorSamplerIndex (C *pObject)
 
template<class C >
Handle getColorFactorIndex (C *pObject)
 
const FactorListgetColorFactorList () const
 
const FilterListgetColorFilterList () const
 
const SamplerListgetColorSamplerList () const
 
ComponentList getComponents () const
 
Raster::GeometricBase * getObject () const
 
void setObject (Raster::GeometricBase *pObject)
 
- Public Member Functions inherited from Program
 Program ()
 
virtual ~Program ()
 
void update ()
 
DrawPrimitive getDrawPrimitive () const
 
void setDrawPrimitive (DrawPrimitive drawPrimitive)
 
void setElementBufferUsage (const DrawUsageHint usage)
 
bool hasUniformBuffer (UniformBinding binding)
 
void addUniformMatrix3f (UniformBinding binding, Matrix3f *pMatrix=nullptr, uint count=1)
 
void addUniformMatrix4f (UniformBinding binding, Matrix4f *pMatrix=nullptr, uint count=1)
 
void setUniformMatrix4f (UniformBinding binding, Matrix4f *pMatrix)
 
void addUniformValue1i (UniformBinding binding, int value)
 
void addUniformSampler2D (UniformBinding binding, Texture *pTexture, TextureType textureType=QUAD_MAP)
 
void addUniformSampler2D (UniformBinding binding, TextureUnit textureUnit, TextureType textureType=QUAD_MAP)
 
void addUniformValue1f (UniformBinding binding, float value)
 
void updateUniformValue1i (UniformBinding binding, int value)
 
void updateUniformValue1f (UniformBinding binding, float value)
 
void addUniformBuffer1i (UniformBinding binding, int *pValue, uint count=1)
 
void addUniformBuffer1f (UniformBinding binding, float *pValue, uint count=1)
 
void addUniformBuffer2f (UniformBinding binding, float *pArray, uint count=1)
 
void addUniformBuffer3f (UniformBinding binding, float *pArray, uint count=1)
 
void addUniformBuffer4f (UniformBinding binding, float *pArray, uint count=1)
 
void setUniformBuffer2f (UniformBinding binding, float *pArray)
 
void setUniformBuffer3f (UniformBinding binding, float *pArray)
 
void setUniformBuffer4f (UniformBinding binding, float *pArray)
 
ProgramHandle getHandle ()
 
void create (const HeapArray< Shader * > &pShader)
 
void addGlobalAttribute (const String &typeString, const String &location)
 
void addGlobalUniform (const String &typeString, const String &binding, ShaderType type)
 
void addGlobalSampler (const String &typeString, const String &binding)
 
void addGlobalVarying (const String &typeString, const String &location)
 
bool hasGlobalAttribute (const String &location)
 
bool hasGlobalAttribute (const String &typeString, const String &location)
 
bool hasGlobalUniform (const String &location, ShaderType type)
 
bool hasGlobalVarying (const String &location)
 
AttributeLocation getAttributeLocation (const String &str)
 
UniformBinding getUniformBinding (const String &str)
 
ProgramHandle getProgramHandle ()
 
bool hasShader (ShaderType shaderType)
 
ShadergetShader (ShaderType shaderType)
 
HeapArray< Shader * > getShaders ()
 
bool getDepthBufferWrite ()
 
void enable ()
 
void disable ()
 
bool hasEnableState (PipelineState state)
 
void addEnableState (PipelineState state)
 
void removeEnableState (PipelineState state)
 
void setStates ()
 
bool isTransparent ()
 
void setTransparent (bool transparent=true)
 
void setStencilComparisonArgs (CompareOperation stencilTestFunction, int stencilComparisonValue, Handle stencilComparisonMask)
 
void setStencilOperationArgs (StencilOperation stencilOperationFail, StencilOperation stencilOperationDepthFail, StencilOperation stencilOperationDepthPass)
 
void setTriangleVertexOrientation (VertexOrientation orientation)
 
void setDepthTestFunction (CompareOperation function)
 
void setDepthBufferWrite (bool write=true)
 
void setLineWidth (float width)
 
void setBlendFactors (BlendFactor sBlendFactor, BlendFactor dBlendFactor)
 
void setBlend ()
 
void bindAttributeBuffers ()
 
void submit (ElementBuffer *pElementBuffer)
 
void submitUniforms ()
 
void setUniformSampler2D (UniformBinding binding, Texture *pTexture, TextureType textureType)
 
void setUniformValue1i (UniformBinding location, int value)
 
void setUniformValue1f (UniformBinding location, float value)
 
void setUniformBuffer1f (UniformBinding location, float *pBuffer)
 
void updateUniformPointer1i (UniformBinding location, int count, int *pBuffer)
 
void updateUniformPointer1f (UniformBinding location, int count, float *pBuffer)
 
void updateUniformPointer2f (UniformBinding location, int count, float *pBuffer)
 
void updateUniformPointer3f (UniformBinding location, int count, float *pBuffer)
 
void updateUniformPointer4f (UniformBinding location, int count, float *pBuffer)
 
void updateUniformMatrix3f (UniformBinding location, int count, float *pBuffer)
 
void updateUniformMatrix4f (UniformBinding location, int count, float *pBuffer)
 
- Public Member Functions inherited from DynamicType
 DynamicType ()
 
template<class C >
void addType ()
 
TypeID getDerivedTypeId () const
 
template<class C >
const bool isType () const
 
template<class C >
const C * cast () const
 
template<class C >
C * cast ()
 
template<class FROM , class TO >
TO * cast ()
 
template<class FROM , class TO >
const TO * cast () const
 

Additional Inherited Members

- Public Types inherited from Surface::Material
typedef List< Render::Component * > ComponentList
 
typedef List< Render::ModelUpdate * > ModelUpdateList
 
typedef List< Render::ViewUpdate * > ViewUpdateList
 
typedef List< Render::ModelViewUpdate * > ModelViewUpdateList
 
typedef UnorderedMap< TypeID, Render::Normal * > NormalMap
 
typedef List< Render::Color::Texel::Sampler * > SamplerList
 
typedef List< Render::Color::Pixel::Factor * > FactorList
 
typedef List< Render::Color::Function::Filter * > FilterList
 
- Public Types inherited from Program
enum  Errors { NO_LOCATION = -1 }
 
typedef Handle AttributeLocation
 
typedef Handle VaryingLocation
 
typedef Handle UniformBinding
 
typedef UnorderedMap< AttributeLocation, AttributeBuffer * > LocationAttributeBufferMap
 
typedef UnorderedMap< UniformBinding, Uniform * > BindingUniformMap
 
typedef UnorderedMap< AttributeLocation, bool > AttributeEnabled
 
typedef UnorderedMap< String, Handle > StringLocation
 
typedef UnorderedMap< UniformBinding, intBindingIntMap
 
typedef UnorderedMap< UniformBinding, floatBindingFloatMap
 
typedef UnorderedMap< UniformBinding, intBindingIntPointerMap
 
typedef UnorderedMap< UniformBinding, floatBindingFloatPointerMap
 
typedef UnorderedMap< UniformBinding, Vector2fArrayBindingVector2fArrayMap
 
typedef UnorderedMap< UniformBinding, Vector3fArrayBindingVector3fArrayMap
 
typedef UnorderedMap< UniformBinding, Vector4fArrayBindingVector4fArrayMap
 
typedef UnorderedMap< UniformBinding, HeapArray< Matrix3f > > BindingMatrix3fArrayMap
 
typedef UnorderedMap< UniformBinding, HeapArray< Matrix4f > > BindingMatrix4fArrayMap
 
typedef UnorderedMap< UniformBinding, UniformDescriptorTypeBindingDescriptorTypeMap
 
- Public Attributes inherited from Program
HeapArray< AttributeLocationattributeLocation
 
HeapArray< VaryingLocationvaryingLocation
 
StringLocation attributeHandle
 
StringLocation uniformHandle
 
StringLocation varyingHandle
 
AttributeEnabled attributeEnabled
 
- Static Public Attributes inherited from Program
static const String shaderVersionString
 
static const String shaderMainStartString
 
static const String fragmentColorString
 
static const String fragnentShaderHeaderString
 
static const String vertexPositionString
 
static const String texture2DSamplerString
 
static const String textureCubeSamplerString
 
static const String projectionSamplerString
 
- Protected Member Functions inherited from Surface::Material
void updateComponents ()
 
- Protected Attributes inherited from Surface::Material
UnorderedMap< ShaderType, ShaderCodeshaderCode
 
Raster::GeometricBase * pObject
 
NormalMap pNormal
 
SamplerList pColorSampler
 
FactorList pColorFactor
 
FilterList pColorFilter
 
ModelUpdateList modelUpdate
 
ViewUpdateList viewUpdate
 
ModelViewUpdateList modelViewUpdate
 
size_t startElementIndex
 
size_t indexElementSize
 
ElementBufferpElementBuffer
 
Render::Model::PositionpPosition
 
bool initialized
 
MaterialManagerpManager
 
- Protected Attributes inherited from Program
VertexArrayHandle vao
 
UnorderedMap< ShaderType, Shader * > pShader
 
LocationAttributeBufferMap pAttributeBuffer
 
BindingUniformMap pUniform
 
String vertexShaderCode
 
String vertexShaderMainCode
 
String vertexShaderFunctionCode
 
String vertexShaderGlobalCode
 
String fragmentShaderCode
 
String fragmentShaderMainCode
 
String fragmentShaderFunctionCode
 
String fragmentShaderGlobalCode
 
StringUnorderedSet globalAttributeString
 
StringUnorderedSet vertexVaryingString
 
StringUnorderedSet fragmentVaryingString
 
StringUnorderedSet vertexGlobalUniformString
 
StringUnorderedSet fragmentGlobalUniformString
 
StateUnorderedSet stateEnable
 
DrawUsageHint elementBufferUsage
 
ElementBufferpElementBuffer
 
bool transparent
 
CullFace faceCull
 
bool depthBufferWrite
 
DrawPrimitive drawPrimitive
 
CompareOperation depthTestFunction
 
CompareOperation stencilTestFunction
 
int stencilComparisonValue
 
Handle stencilComparisonMask
 
StencilOperation stencilOperationFail
 
StencilOperation stencilOperationDepthFail
 
StencilOperation stencilOperationDepthPass
 
VertexOrientation triangleVertexOrientation
 
BlendFactor sBlendFactor
 
BlendFactor dBlendFactor
 
float lineWidth
 

Detailed Description

A Material that only renders Geometry

Constructor & Destructor Documentation

◆ ShadowMaterial()

ShadowMap::ShadowMaterial::ShadowMaterial ( Surface::Material * pMaterial)

◆ ~ShadowMaterial()

virtual ShadowMap::ShadowMaterial::~ShadowMaterial ( )
virtual

Member Function Documentation

◆ init()

virtual void ShadowMap::ShadowMaterial::init ( )
virtual

This can only be called 1X.

Reimplemented from Surface::Material.

◆ update()

virtual void ShadowMap::ShadowMaterial::update ( )
virtual

Reimplemented from Surface::Material.


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