public override void Draw(GameTime gameTime) { if (SceneInstance == null || MainRenderFrame == null) { return; } // If the width or height changed, we have to recycle all temporary allocated resources. // NOTE: We assume that they are mostly resolution dependent. if (previousWidth != MainRenderFrame.Width || previousHeight != MainRenderFrame.Height) { // Force a recycle of all allocated temporary textures renderContext.Allocator.Recycle(link => true); } previousWidth = MainRenderFrame.Width; previousHeight = MainRenderFrame.Height; // Update the entities at draw time. renderContext.Time = gameTime; SceneInstance.Draw(renderContext); // Renders the scene SceneInstance.Draw(renderContext, MainRenderFrame); }
protected override void DrawCore(RenderContext context, RenderFrame output) { if (ChildScene == null || !ChildScene.Enabled) { return; } currentSceneInstance = SceneInstance.GetCurrent(Context); childSceneProcessor = childSceneProcessor ?? currentSceneInstance.GetProcessor <ChildSceneProcessor>(); if (childSceneProcessor == null) { return; } SceneInstance sceneInstance = childSceneProcessor.GetSceneInstance(ChildScene); if (sceneInstance != null) { sceneInstance.Draw(context, output, GraphicsCompositorOverride); } }