public sealed class ViewModesThe compositor a viewport uses for each way of looking at the scene.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A mode is a compositor, not a flag. Doc 06 made the compositor data precisely so that "show me the normals" is a different tree rather than a branch inside the renderer, and this is where that is collected. A host registers the trees it has; a mode with no tree registered falls back to Shaded rather than showing nothing, because a menu item that appears to do nothing is worse than one that does the safe thing.
The two modes that are not a different tree are here as stage state. Wireframe and overdraw are the same geometry drawn with a different rasterizer and a different blend, so a host that has not authored a compositor for them can have them by handing over the stage they draw — which is what ApplyTo is for. Everything else genuinely needs a different shader and therefore a different tree.
Fields and properties (2)
Events (1)
Methods (4)
public void Register(ViewMode mode, SceneRenderer renderer)Registers the compositor tree for a mode.
public SceneRenderer? Resolve()The tree for the current mode.
public SceneRenderer? Resolve(ViewMode mode)The tree for a mode.
public void ApplyTo(RenderStage stage)Puts the current mode's stage state onto a stage.
Used by (7)
- EditorApplicationVixen.Editor.App
- SceneMaterialTestsVixen.Editor.SceneView.Tests
- SceneMeshesVixen.Editor.SceneView
- ScenePresenterVixen.Editor.App
- SceneViewportVixen.Editor.SceneView
- ViewportStateTestsVixen.Editor.SceneView.Tests
- ViewportTestsVixen.Editor.App.Tests