protected override void DrawCore(RenderDrawContext context) { var renderFrame = context.RenderContext.Tags.Get(RenderFrame.Current); context.CommandList.Clear(renderFrame.DepthStencil, DepthStencilClearOptions.DepthBuffer); RenderSystem.Draw(context, MainRenderView, PhysicsDebugShapeRenderStage); }
/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); // TODO: Add your drawing code here renderSystem.Draw(gameTime, spriteBatch); base.Draw(gameTime); }
/// <summary> /// Called when the game determines it is time to draw a frame. /// In stereo mode this method will be called twice to render left and right parts of stereo image. /// </summary> /// <param name="gameTime"></param> /// <param name="stereoEye"></param> protected virtual void Draw(GameTime gameTime, StereoEye stereoEye) { //GIS.Draw(gameTime, stereoEye); RenderSystem.Draw(gameTime, stereoEye); GraphicsDevice.ResetStates(); GraphicsDevice.RestoreBackbuffer(); }
/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { RenderSystem.Draw(); GraphicsService.Instance.Begin(SpriteSortMode.Immediate); // GraphicsService.Instance.DrawString(GameContent.Instance.defaultFont, gameTime.ElapsedGameTime.Milliseconds.ToString(), new Vector2(50, 50), Color.White); GraphicsService.Instance.DrawString(GameContent.Instance.defaultFont, PhysicsSystem.objects.Count.ToString(), new Vector2(50, 250), Color.White); // GraphicsService.Instance.DrawString(GameContent.Instance.defaultFont, phys_time.ToString(), new Vector2(50, 350), Color.White); // GraphicsService.Instance.DrawString(GameContent.Instance.defaultFont, elapsed_frames.ToString(), new Vector2(50, 450), Color.White); GraphicsService.Instance.End(); base.Draw(gameTime); }
public void Draw(SpriteBatch spritebatch, IDictionary <string, Entity> entities) { RenderSystem.Draw(entities.Values.ToList(), spritebatch); }