IRenderEffectBase
Description
- Derived from
- Extended by
Base interface for classes that represent a render effect, implemented as a GPU program.
To obtain a IRenderEffectBase instance, the following steps are required:
-
Obtain a IGraphicsContext.
-
Call IGraphicsContext.RegisterRenderEffectFactory, if necessary.
-
Create a RenderEffectParameters object: its implementation class implicitly chooses the render effect.
-
Call IGraphicsContext.CreateRenderEffect to create a render effect.
The IBeginEnd.Begin and IBeginEnd.End methods of IRenderEffectBase may only be called between paired IBeginEnd.Begin / IBeginEnd.End of the owning IGraphicsContext.
- See also
Public / Methods
Apply
Applies all changes that have been made to render effect parameters since the last call to Pass.
Initialize
Initializes the object, if necessary.
- RenderException
-
If a graphics subsystem error has occurred.
Pass
Begins to render the given effect pass.
When this method is called, the resource objects (see IResource) in the render effect parameters will be applied to the GPU. The caller is responsible for ensuring that all resource objects are valid, i.e. that none of them has been disposed. A common approach is to clear all resource objects after the render pass (for example, by calling RenderEffectParameters.ClearResources).
PassAvailable
Checks if the given render effect pass is available in the current graphics context.
A render effect may provide advanced techniques that may not be applicable to old graphics APIs (e.g. hardware tessellation on Direct3D 9). This method is used to determine if a specific pass is supported.