public sealed class AppGraphicsThe device, the swapchain and the world's frame, owned by the host.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The step the host stopped one short of. WorldRenderer was the whole join between a world and a drawn frame — the standard features, the shared geometry, the extraction systems, a SceneRenderHost — and nothing outside a test project constructed one, so every sample opened a device and issued draws by hand and none of them was a game. This is that object put in VixenApp.Run's way, together with the two things it deliberately does not own: a device, and a swapchain to present it through.
What it decides is an order, which is the part a host gets wrong silently. The swapchain image is lent to the frame under a name before the compositor builds, because a graph culls a pass whose target nobody outside it reads; the camera's aspect ratio is set when the swapchain is sized rather than when the frame is drawn, because extraction has already run by then; and the world is drawn before OnRender is offered the same command list, so an application's own passes land on top of the scene rather than under it.
Every step is a public method on a public object. docs/plan/17's rule that nothing in the boot path is inaccessible applies here as much as to the loop: a head that wants two windows, a different swapchain, or a frame recorded into somebody else's command list builds this itself and calls Begin and End where it likes — or skips it and uses WorldRenderer directly, which is all this does.
Fields and properties (13)
public IGraphicsDevice DeviceThe device everything here lives on.
public EffectSystem EffectsWhere variants are compiled or looked up.
public WorldRenderer RendererThe world's frame: the features, the geometry, the extraction and the host.
public RenderView ViewThe view the scene's camera fills.
public CameraExtractionSystem CameraWhat fills it from the world.
public PostProcessVolumeSystem VolumesThe post-process volumes the camera is inside, folded into one overlay.
public RenderStageMask StagesWhich stages the world's drawables are extracted into.
public RenderStageMask ParticleStagesWhich stage the scene's particle emitters are drawn in, or none.
public ISwapChain? SwapChainThe swapchain, once one has been built.
public ICommandList? CommandsThe frame's command list, open only between Begin and End.
public bool IsLostWhether the device has gone and nothing more will be drawn.
public int FrameCountHow many frames have been recorded.
public static GraphicsCompositorAsset DefaultFrameThe frame a project gets before it authors one: one lit pass, into the window.
Methods (8)
public AppGraphics(IGraphicsDevice device, GraphicsOptions options, IWindow? window, AssetManager? assets, EffectStore? shaders, EngineLoop? engine, ILoggerFactory logs, bool ownsDevice = true)Builds the frame a world is drawn through.
public bool Begin()Opens the frame: acquires an image, lends it to the document, draws the world.
public void End()Closes the frame: submits it and presents.
public void Recreate(bool force = false)Rebuilds the swapchain for the window's current size, if it has changed.
public static Int2 FramebufferOf(IWindow window)The window's framebuffer size, never zero in either axis.
public static ISwapChain SwapChainFor(IGraphicsDevice device, IWindow? window, GraphicsOptions options)Creates the swapchain a device presents through.
public void Suspend()Drops the swapchain, for a platform that has taken the surface away.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (10)
- ArenaThirdPersonShooter
- ArenaIlluminationThirdPersonShooter
- ThirdPersonShooterGameThirdPersonShooter
- AppBuilderVixen.App.Hosting
- AppServicesVixen.App.Hosting
- VixenApplicationVixen.App.Hosting
- AppBackendTestsVixen.App.Tests
- GraphicsHostVixen.App
- HostedRendererTestsVixen.App.Tests
- RecordingGameVixen.App.Tests