public override void Draw(GameTime gameTime) { GraphicsDevice.DepthStencilState = _depthState; GraphicsDevice.RasterizerState = meshDisplay.Game.GeneralDialog.IsWireframeEnabled ? meshDisplay.Game.WireframeMode : RasterizerState.CullNone; _effect.View = meshDisplay.Game.Camera.Camera.View; _effect.Projection = meshDisplay.Game.Camera.Camera.Projection; _effect.World = Matrix.Identity; _effect.TextureEnabled = false; _effect.VertexColorEnabled = true; _effect.EnableDefaultLighting(); _effect.CurrentTechnique.Passes[0].Apply(); if (meshDisplay.Game.GeneralDialog.DrawTerrain) { _terrain.Draw(); } if (meshDisplay.Game.GeneralDialog.DrawDoodads && _doodads != null) { _doodads.Draw(); } if (meshDisplay.Game.GeneralDialog.DrawWmos && _wmos != null) { _wmos.Draw(); } if (meshDisplay.Game.GeneralDialog.DrawWater && _liquid != null) { _liquid.Draw(); } base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { GraphicsDevice.DepthStencilState = _depthState; GraphicsDevice.RasterizerState = meshDisplay.Game.GeneralDialog.IsWireframeEnabled ? meshDisplay.Game.WireframeMode : RasterizerState.CullNone; _effect.View = meshDisplay.Game.Camera.Camera.View; _effect.Projection = meshDisplay.Game.Camera.Camera.Projection; _effect.World = Matrix.Identity; _effect.TextureEnabled = false; _effect.VertexColorEnabled = true; _effect.EnableDefaultLighting(); _effect.CurrentTechnique.Passes[0].Apply(); _drawer.Draw(); base.Draw(gameTime); }