PostProcessor Class |
Namespace: DigitalRune.Graphics.PostProcessing
The PostProcessor type exposes the following members.
Name | Description | |
---|---|---|
PostProcessor |
Initializes a new instance of the PostProcessor class.
|
Name | Description | |
---|---|---|
Dispose |
Releases all resources used by an instance of the PostProcessor class.
| |
Dispose(Boolean) |
Releases the unmanaged resources used by an instance of the PostProcessor class
and optionally releases the managed resources.
| |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnDisable |
Called when this post-processor is disabled.
| |
OnEnable |
Called when this post-processor is enabled.
| |
OnProcess |
Called when the post-processor should perform the post-processing.
| |
Process |
Performs the post-processing using the SourceTexture
and the RenderTarget specified in the render context.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
DefaultTargetFormat |
Gets or sets the default target format.
(This property is used by the PostProcessorChain).
| |
Enabled |
Gets or sets a value indicating whether this post-processor is enabled.
| |
GraphicsService |
Gets the graphics service.
| |
IsDisposed |
Gets a value indicating whether this post-processor has been disposed of.
| |
Name |
Gets or sets the name of the post-processor.
|
A post-processor reads a source texture, which must be specified in the SourceTexture property of the RenderContext. It processes the source texture and writes its output to a render target, which must be specified in the RenderTarget property of the RenderContext. The render target can be to write into the back buffer of the graphics device.
The post-processor will always call GraphicsDevice.SetRenderTarget(RenderTarget2D) for the specified render target - that means it is not necessary that the render target is currently set in the graphics device.
In general, the SourceTexture and the RenderTarget must not reference the same render target. Only if the post-processor uses multi-pass rendering internally, or if the post-processor is a PostProcessorChain consisting of several post-processors, then the source texture and the render target can reference the same object. That means, it depends on the used post-processor whether it is possible or not. If it is not possible, and the same render target is used as the source texture and the target, then XNA will throw an exception.
Post-processors can be chained together: See class PostProcessorChain for more information.