Abstract rendered attribute buffers. More...
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< ShaderObject > | Attachments [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. |
Abstract rendered attribute buffers.
void Derm.Render.BaseShaderAttributes.ClearExcludedAttributes | ( | ) |
Reset excluded attributes.
void Derm.Render.BaseShaderAttributes.ExcludeAttribute | ( | string | binding | ) |
Exclude an attribute for being excluded in rendering.
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.
binding |
abstract void Derm.Render.BaseShaderAttributes.Render | ( | RenderContext | ctx, | |
ShaderProgram | sProgram | |||
) | [pure virtual] |
Render vertices attributes.
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] |
ctx | ||
sProgram |
Implements Derm.Render.IShaderState.
virtual IEnumerable<ShaderObject> Derm.Render.BaseShaderAttributes.Attachments [get] |
Implements Derm.Render.IShaderState.
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.
CompilerEventHandler Derm.Render.BaseShaderAttributes.CompilerEvent |
Compiler event.
Implements Derm.Render.IShaderState.
LinkerEventHandler Derm.Render.BaseShaderAttributes.LinkerEvent |
Linker event.
Implements Derm.Render.IShaderState.