protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.DarkGray); var cameraPosition = new Vector3(0, 0, 2.5f); var aspect = GraphicsDevice.Viewport.AspectRatio; var view = Matrix.CreateLookAt(cameraPosition, Vector3.Zero, Vector3.Up); var projection = Matrix.CreatePerspectiveFieldOfView(1, aspect, 1, 1000); _renderer.Draw(view, projection); _spriteBatch.Begin(); Profiler.DrawStats(_spriteBatch, _spriteFont); _spriteBatch.End(); Profiler.Clear(); base.Draw(gameTime); }
protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); var cameraPosition = new Vector3(0, 0, 2.5f); var aspect = GraphicsDevice.Viewport.AspectRatio; var view = Matrix.CreateLookAt(cameraPosition, Vector3.Zero, Vector3.Up); var projection = Matrix.CreatePerspectiveFieldOfView(1, aspect, 1, 1000); _renderer.Draw(view, projection); // Reset the fill mode renderstate. GraphicsDevice.RasterizerState = RasterizerState.CullCounterClockwise; _spriteBatch.Begin(); Profiler.DrawStats(_spriteBatch, _spriteFont); _spriteBatch.End(); Profiler.Clear(); base.Draw(gameTime); }