/// <summary> /// Reference page contains code sample. /// </summary> /// <param name="gameTime"> /// Time passed since the last call to Draw. /// </param> protected virtual void Draw(GameTime gameTime) { GameSystems.Draw(gameTime); // Make sure that the render target is set back to the back buffer // From a user perspective this is better. From an internal point of view, // this code is already present in GraphicsDeviceManager.BeginDraw() // but due to the fact that a GameSystem can modify the state of GraphicsDevice // we need to restore the default render targets // TODO: Check how we can handle this more cleanly if (GraphicsDevice != null && GraphicsDevice.Presenter.BackBuffer != null) { GraphicsContext.CommandList.SetRenderTargetAndViewport(GraphicsDevice.Presenter.DepthStencilBuffer, GraphicsDevice.Presenter.BackBuffer); } }
public sealed override void Draw() { // The draw order can be left to whatever the systems's current orders are. GameSystems.Draw(RenderTime); }