public void Drawn(Microsoft.Xna.Framework.GameTime gt, SceneControl.IObject obj, Cameras.ICamera cam, IList <Light.ILight> lights, SceneControl.RenderHelper render) { if (SamplePositions != null) { for (int i = 0; i < SamplePositions.Count(); i++) { render.SetSamplerState(SamplerState[i], SamplePositions[i]); samplers[SamplePositions[i]] = SamplerState[i]; } } if (BlendState != null) { render.PushBlendState(BlendState); } if (RasterizerState != null) { render.PushRasterizerState(RasterizerState); } material.Drawn(gt, obj, cam, lights, render); if (RasterizerState != null) { render.PopRasterizerState(); } if (BlendState != null) { render.PopBlendState(); } if (SamplePositions != null) { for (int i = 0; i < SamplePositions.Count(); i++) { render.SetSamplerState(samplers[SamplePositions[i]], SamplePositions[i]); } } }