// Called when the game should draw itself protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.Black); water.PreDraw(camera, gameTime); GraphicsDevice.Clear(Color.Black); sky.Draw(camera.View, camera.Projection, ((FreeCamera)camera).Position); foreach (CModel model in models) { if (camera.BoundingVolumeIsInView(model.BoundingSphere)) { model.Draw(camera.View, camera.Projection, ((FreeCamera)camera).Position); } } terrain.Draw(camera.View, camera.Projection, ((FreeCamera)camera).Position); water.Draw(camera.View, camera.Projection, ((FreeCamera)camera).Position); trees.Draw(camera.View, camera.Projection, ((FreeCamera)camera).Up, ((FreeCamera)camera).Right); grass.Draw(camera.View, camera.Projection, ((FreeCamera)camera).Up, ((FreeCamera)camera).Right); clouds.Draw(camera.View, camera.Projection, ((FreeCamera)camera).Up, ((FreeCamera)camera).Right); base.Draw(gameTime); }
// Called when the game should draw itself protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); foreach (CModel model in models) { if (camera.BoundingVolumeIsInView(model.BoundingSphere)) { model.Draw(camera.View, camera.Projection, ((FreeCamera)camera).Position); } } trees.Draw(camera.View, camera.Projection); clouds.Draw(camera.View, camera.Projection, ((FreeCamera)camera).Up, ((FreeCamera)camera).Right); base.Draw(gameTime); }