Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 126.96.36.199 (188.8.131.5209)
A graphics screen represents a layer in a 3D application. Multiple screens might be stacked on one another, for example:
- The back (first) screen renders a 3D world.
- In front of the first screen is another screen that renders the HUD.
- In front of these layers is a graphics screen that renders a GUI. For example an "Options Dialog".
Each class that derives from OnUpdate(TimeSpan) and OnRender(RenderContext). OnUpdate(TimeSpan) is usually called once per frame and the screen can update its internal state in this method. OnUpdate(TimeSpan) is called by the GraphicsManager in its Update(TimeSpan) method.can override the methods
Each screen implements its own rendering pipeline by overriding OnRender(RenderContext). That means, a screen that renders a 3D world can implement a different render pipeline than a screen that draws the HUD or a GUI on top. Each graphics screen can use its own type of scene management. OnRender(RenderContext) is called by the GraphicsManager when one of its Render-methods is called. Special notes: If a screen is fully covered by another screen, the graphics service might not call OnRender(RenderContext). On the other hand, if the application has several IPresentationTargets, it can happen that OnRender(RenderContext) is called several times per frame.
OnUpdate(TimeSpan) and OnRender(RenderContext) are usually not called in a frame if the screen is invisible (e.g. if IsVisible is falseFalsefalsefalse (False in Visual Basic) or if the screen is totally covered by another screen).
The property Coverage indicates whether a screen covers the entire view or whether a screen is partially transparent. The property needs to be set by each graphics screen depending on the content which is going to be rendered. The graphics service reads the property to determine which screens need to be rendered.