RenderTargetPool Class |
Namespace: DigitalRune.Graphics
The RenderTargetPool type exposes the following members.
Name | Description | |
---|---|---|
RenderTargetPool |
Initializes a new instance of the RenderTargetPool class.
|
Name | Description | |
---|---|---|
Clear |
Removes all cached render targets.
| |
Dispose |
Releases all resources used by an instance of the RenderTargetPool class.
| |
Dispose(Boolean) |
Releases the unmanaged resources used by an instance of the RenderTargetPool
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.) | |
Obtain2D |
Obtains a 2D render target that matches the given specification.
| |
ObtainCube |
Obtains a cube map render target that matches the given specification.
| |
Recycle(RenderTarget2D) |
Releases a render target and puts it back into the pool for future reuse.
| |
Recycle(RenderTargetCube) |
Releases a render target and puts it back into the pool for future reuse.
| |
Recycle(Texture) |
Releases a render target and puts it back into the pool for future reuse.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Update |
Manages the cached render targets.
|
Name | Description | |
---|---|---|
Enabled |
Gets or sets a value indicating whether render target pooling is enabled.
| |
FrameLimit |
Gets or sets the number of frames a recycled render target will be cached before it is
released.
| |
GraphicsService |
Gets the graphics service.
|
This class manages a list of render targets. To get a render target call the Obtain2D or ObtainCube method. After the render target is not needed any more call Recycle. Once per frame, Update must be called. This method updates internal render target usage data and removes render targets which have not been used for a while (see property FrameLimit). Clear should be called when the graphics settings of the game have changed, e.g. when the size of the back buffer is changed, or at certain events, e.g. when a new level is loaded.
Thread-Safety: This class is not thread-safe.