Vixen
02b45cc4
csharp
public sealed class ViewModes

The 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)

  • public ViewMode Current

    Which mode the viewport is in.

  • public IReadOnlyCollection<ViewMode> Registered

    The modes a compositor has been registered for.

Events (1)

Methods (4)

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