Derm.Render.BaseShaderAttributes Class Reference

Abstract rendered attribute buffers. More...

Inheritance diagram for Derm.Render.BaseShaderAttributes:
Derm.Render.IShaderState Derm.Render.ShaderAttributes Derm.Render.ShaderAttributesProxy Derm.Mesh.Mesh.Surface

List of all members.

Public Member Functions

void ClearExcludedAttributes ()
 Reset excluded attributes.
void ExcludeAttribute (string binding)
 Exclude an attribute for being excluded in rendering.
abstract void Render (RenderContext ctx, ShaderProgram sProgram)
 Render vertices attributes.
virtual void SetState (RenderContext ctx, ShaderProgram sProgram)

Protected Member Functions

bool IsExcludedAttribute (string binding)
 Check whether an attribute is excluded.

Properties

virtual IEnumerable< ShaderObjectAttachments [get]
abstract IEnumerable< string > Bindings [get]
 Current attributes bindings.
IEnumerable< string > Defines [get]
 Obtain a symbols list depending on current attributes.

Events

CompilerEventHandler CompilerEvent
 Compiler event.
LinkerEventHandler LinkerEvent
 Linker event.

Detailed Description

Abstract rendered attribute buffers.


Member Function Documentation

void Derm.Render.BaseShaderAttributes.ClearExcludedAttributes (  ) 

Reset excluded attributes.

void Derm.Render.BaseShaderAttributes.ExcludeAttribute ( string  binding  ) 

Exclude an attribute for being excluded in rendering.

Parameters:
binding A System.String indicating the binding name used for the excluded attribute.
bool Derm.Render.BaseShaderAttributes.IsExcludedAttribute ( string  binding  )  [protected]

Check whether an attribute is excluded.

Parameters:
binding 
Returns:
abstract void Derm.Render.BaseShaderAttributes.Render ( RenderContext  ctx,
ShaderProgram  sProgram 
) [pure virtual]

Render vertices attributes.

Parameters:
ctx A RenderContext used for rendering.
sProgram A ShaderProgram used for rendering.

Implemented in Derm.Render.ShaderAttributes, and Derm.Render.ShaderAttributesProxy.

virtual void Derm.Render.BaseShaderAttributes.SetState ( RenderContext  ctx,
ShaderProgram  sProgram 
) [virtual]
Parameters:
ctx 
sProgram 

Implements Derm.Render.IShaderState.


Property Documentation

virtual IEnumerable<ShaderObject> Derm.Render.BaseShaderAttributes.Attachments [get]
abstract IEnumerable<string> Derm.Render.BaseShaderAttributes.Bindings [get]

Current attributes bindings.

Reimplemented in Derm.Render.ShaderAttributes, and Derm.Render.ShaderAttributesProxy.

IEnumerable<string> Derm.Render.BaseShaderAttributes.Defines [get]

Obtain a symbols list depending on current attributes.

Most of ShaderPrograms can handle a different set of attributes. This mean that the shaders composing the ShaderProgram can be adapted depending on the current available attributes.

This is usefull in the case it's needed to run the ShaderProgram with different

Instead of leave to shader developer the effort of defining preprocessor symbols to include/exclude certain shader code depending on current inputs, the ShaderAttributes offers this routine to obtain a list of preprocessor strings dependent on current available attributes.

The defined symbols have the for "HasSymbolName", where symbol name is derived by removing the first 3 letters of the input binding name. This because suppose input bindings starts with 2 letters and one underscore (i.e.: ds_VertexPosition will produce HasVertexPosition symbol).

Implements Derm.Render.IShaderState.


Event Documentation

CompilerEventHandler Derm.Render.BaseShaderAttributes.CompilerEvent

Compiler event.

Implements Derm.Render.IShaderState.

LinkerEventHandler Derm.Render.BaseShaderAttributes.LinkerEvent

Linker event.

Implements Derm.Render.IShaderState.



Services powered by Get Deus Ex Render Machina at SourceForge.net. Fast, secure and Free Open Source software downloads