public void Render() { if (_skybox != null) { _skybox.Draw(); } BoundingFrustum frustum = new BoundingFrustum(GameEngine.Camera.View * GameEngine.Camera.Projection); _actors.Render(Matrix.Identity, frustum); foreach (Opponent opponent in Opponents) { if (frustum.Intersects(opponent.GetBoundingSphere())) { opponent.Driver.InPlayersView = true; opponent.Vehicle.Render(); } else { opponent.Vehicle.SkidMarkBuffer.Render(); //always render skids opponent.Driver.InPlayersView = false; } opponent.Driver.DistanceFromPlayer = Vector3.Distance(PlayerVehicle.Position, opponent.Vehicle.Position); } Peds.Render(); RaceTime.Render(); MessageRenderer.Instance.Render(); //GameEngine.DebugRenderer.AddAxis(Matrix.CreateTranslation(ConfigFile.GridPosition), 10); if (_map.Show) { _map.Render(); return; } }
public void Render(Matrix pose) { _actors.Render(pose, null); }