GraphicsManager Class |
Namespace: DigitalRune.Graphics
The GraphicsManager type exposes the following members.
Name | Description | |
---|---|---|
GraphicsManager(GraphicsDevice, ContentManager) |
Initializes a new instance of the GraphicsManager class.
| |
GraphicsManager(GraphicsDevice, GameWindow, ContentManager) |
Initializes a new instance of the GraphicsManager class.
|
Name | Description | |
---|---|---|
CreateRenderContext |
Creates a new render context.
| |
Dispose |
Releases all resources used by an instance of the GraphicsManager class.
| |
Dispose(Boolean) |
Releases the unmanaged resources used by an instance of the GraphicsManager 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.) | |
Present | Obsolete.
Presents the current back buffer target into the specified presentation target. (Windows
Forms only!)
| |
Render(Boolean) |
Renders the graphics screens to the back buffer.
| |
Render(IPresentationTarget) |
Renders the registered graphics screens into the given presentation target.
| |
Render(IPresentationTarget, IListGraphicsScreen) |
Renders the specified graphics screens into the given presentation target.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Update |
Updates the graphics service and the registered graphics screens.
|
Name | Description | |
---|---|---|
GetCopyFilter |
Gets a default CopyFilter that can be used to copy a texture into a render
target.
(Defined by PostProcessHelper.) | |
GetDefaultNormalTexture |
Gets a 1x1 normal map. The normal vector is (0, 0, 1).
(Defined by TextureHelper.) | |
GetDefaultTexture2DBlack |
Gets a black 2D texture with 1x1 pixels.
(Defined by TextureHelper.) | |
GetDefaultTexture2DWhite |
Gets a white 2D texture with 1x1 pixels.
(Defined by TextureHelper.) | |
GetDefaultTexture3DBlack |
Gets a black 3D texture with 1x1 pixels.
(Defined by TextureHelper.) | |
GetDefaultTexture3DWhite |
Gets a white 3D texture with 1x1 pixels.
(Defined by TextureHelper.) | |
GetDefaultTextureCubeBlack |
Gets a cubemap texture where each face consists of 1 black pixel.
(Defined by TextureHelper.) | |
GetDefaultTextureCubeWhite |
Gets a cubemap texture where each face consists of 1 white pixel.
(Defined by TextureHelper.) | |
GetDownsampleFilter |
Gets a default DownsampleFilter that can be used to downsample an image into
a low-resolution render target.
(Defined by PostProcessHelper.) | |
GetNormalsFittingTexture |
Gets the normals fitting texture for calculating "best fit" normals.
(Defined by TextureHelper.) | |
GetSpriteBatch |
Gets a shared SpriteBatch instance.
(Defined by GraphicsHelper.) |
Name | Description | |
---|---|---|
Content |
Gets the content manager that can be used to load predefined DigitalRune Graphics content
(e.g. predefined shaders, post-processing effects, lookup textures, etc.).
| |
Data |
Gets custom data associated with this graphics service or the graphics device.
| |
DeltaTime |
Gets the elapsed time since the last frame.
| |
EffectBinders |
Gets or sets the effect binders.
| |
EffectInterpreters |
Gets or sets the effect interpreters.
| |
Frame |
Gets the number of the current frame.
| |
GameForm |
Gets the main form (main window) of the
Game.
| |
GraphicsDevice |
Gets the graphics device.
| |
IsDisposed |
Gets a value indicating whether this instance has been disposed of.
| |
PresentationTargets |
A collection of all presentation targets.
| |
RenderTargetPool |
Gets or sets the render target pool.
| |
Screens |
Gets or sets the graphics screens.
| |
Time |
Gets or sets the total elapsed time.
|
This class implements the IGraphicsService for a 3D application or game. (See also IGraphicsService for more information.)
The method Update(TimeSpan) must be called once per frame to update the graphics service and the registered graphics screens. The methods Render(Boolean) or Render(IPresentationTarget) must be called to render the screens. Render(Boolean) renders the screens to the back buffer; the XNA game will automatically display this back buffer in the game window.
The method Render(IPresentationTarget) or Render(IPresentationTarget, IListGraphicsScreen) can be used to display graphics in a Windows Forms or WPF application. These methods render the graphics screens into a presentation target. A presentation target (see interface IPresentationTarget) is a Windows Forms control or a WPF control where the graphics can be displayed.
Windows Forms: Windows Forms applications can host a FormsPresentationTarget. The methods Render(IPresentationTarget) or Render(IPresentationTarget, IListGraphicsScreen) can be used to render a scene into this presentation target. The method first renders the graphics screens into the back buffer and then displays the result in the specified presentation target. The method Present(IPresentationTarget) can be used to display the current back buffer content in a presentation target (without re-rendering the screens).
WPF: WPF applications can host an ElementPresentationTarget (legacy) or a D3DImagePresentationTarget (recommended, MonoGame only). The methods Render(IPresentationTarget) or Render(IPresentationTarget, IListGraphicsScreen) can be used to render a scene directly into a D3DImagePresentationTarget.