IRenderEffectComponents
Description
- Extended by
-
RenderEffectComponents abstract
Base interface for classes that can build components of a IRenderEffect through a common interface which does not depend on a specific render API.
An implementation of IRenderEffect for a specific render API provide an object of this interface to its RenderEffectParameters object, which then build common render effect components. The purpose of this is to extract all common code into a single location, instead of having similar code spread over multiple classes which are distributed over (usually non-related) projects.
Public / Methods
Buffer
The render effect is using a constant buffer of the given name in.
If a render effect implementation does not require declaration of used constant buffers, calls to this method will be ignored silently. Constant buffer declaration is required for:
-
Direct3D 9 : no
-
Direct3D 11 : yes
-
Direct3D 12 : yes
-
OpenGL : no
-
OpenGLES : no
- RenderException
-
If a graphics subsystem error has occurred.
Finish
Finished building of common render effect components.
- RenderException
-
If a graphics subsystem error has occurred.
Pass
Creates shader objects and render passes and associated them with another.
The shader specifications are simple strings, using the following Grammar:
shader := type '|' name '|' id ; name := id .. '.' ; type := 'VS' | 'TP' | 'TV' | 'GS' | 'PS' | 'CS' ; id := char+ ; char := 'a'..'z' | 'A'..'Z' | '0'..'9' | '_' | '-' ;
Each call to this method causes a call to RenderEffect.ShaderCreate for each new shader specification, followed by zero or more calls RenderEffect.ShaderAssign.
For example, the shader specification…
"VS | My-Shader | Folder"
will use the following shader binary resp. source:
"$(ShaderRepository)/glsl.gl41/Folder/My-Shader.glsl" (OpenGL 4.1+) "$(ShaderRepository)/glsl.gles30/Folder/My-Shader.glsl" (OpenGLES 3.0+) "$(ShaderRepository)/hlsl.dx9/Folder/My-Shader.cso" (Direct3D 9) "$(ShaderRepository)/hlsl.dx11/Folder/My-Shader.cso" (Direct3D 11) "$(ShaderRepository)/hlsl.dx12/Folder/My-Shader.cso" (Direct3D 12)
- RenderException
-
If a graphics subsystem error has occurred.
Resource
Declares a shader resource.
If a render effect implementation does not require declaration of shader resources, calls to this method will be ignored silently. Shader resource declaration is required for:
-
Direct3D 9 : no
-
Direct3D 11 : yes
-
Direct3D 12 : yes
-
OpenGL : no
-
OpenGLES : no
Any additional state setup for the shader resource must be performed manually by the IRenderEffect implementation, such as sampler state.
- RenderException
-
If a graphics subsystem error has occurred.
Texture
Declares a texture resource with a sampler state preset.
The sampler state of the given texture resource will be created automatically, based on RenderEffectParameters.EffectSamplerState.
- RenderException
-
If a graphics subsystem error has occurred.
Vertex
Declares an input vertex attribute.
If a render effect implementation does not require declaration of vertex attributes, calls to this method will be ignored silently. Vertex attribute declaration is required for:
-
Direct3D 9 : no
-
Direct3D 11 : no
-
Direct3D 12 : no
-
OpenGL : yes
-
OpenGLES : yes
- RenderException
-
If a graphics subsystem error has occurred.
- See also