public void Render(GraphicsDevice device) { PrimitiveMutex.WaitOne(); if (Primitive != null) { Primitive.Render(device); } PrimitiveMutex.ReleaseMutex(); }
override public void Render(DwarfTime gameTime, ChunkManager chunks, Camera camera, SpriteBatch spriteBatch, GraphicsDevice graphicsDevice, Shader effect, bool renderingForWater) { if (Texture == null || Texture.IsDisposed || Texture.GraphicsDevice.IsDisposed) { Texture = AssetManager.GetContentTexture(Asset); } ApplyTintingToEffect(effect); effect.MainTexture = Texture; effect.World = GlobalTransform; foreach (EffectPass pass in effect.CurrentTechnique.Passes) { pass.Apply(); Primitive.Render(graphicsDevice); } EndDraw(effect); }