/// <summary> /// Normal Drawn Function. /// </summary> /// <param name="gt">The gt.</param> /// <param name="obj">The obj.</param> /// <param name="cam">The cam.</param> /// <param name="lights">The lights.</param> /// <param name="render">The render.</param> public void Drawn(GameTime gt, PloobsEngine.SceneControl.IObject obj, PloobsEngine.Cameras.ICamera cam, System.Collections.Generic.IList <PloobsEngine.Light.ILight> lights, PloobsEngine.SceneControl.RenderHelper render) { if (first) { _terrainModel.Initialize(cam, render.device); first = false; } if (_terrainModel.Effect is IEffectMatrices) { IEffectMatrices effectMatrices = (IEffectMatrices)_terrainModel.Effect; effectMatrices.World = obj.WorldMatrix; effectMatrices.View = cam.View; effectMatrices.Projection = cam.Projection; } render.SetSamplerStates(SamplerState.LinearWrap, 6); _terrainModel.Draw(); render.SetSamplerStates(ginfo.SamplerState, 6); }