/// <summary> /// /// </summary> public void Dispose() { prim_.Dispose(); if (drawModel_ != null) { drawModel_.Dispose(); } fxaaPrim_.Dispose(); foreach (var t in gbuffers_) { t.Dispose(); } uav_.Dispose(); hdrResolveBuffer_.Dispose(); globalCapture_.Dispose(); foreach (var c in localCapture_) { c.Dispose(); } if (giTextures_ != null) { foreach (var t in giTextures_) { t.Dispose(); } } toneMap_.Dispose(); shadowMap_.Dispose(); lightMgr_.Dispose(); csMgr_.Dispose(); }
public void CreateBasicShadowMap() { //Given ShadowMap map = new ShadowMap(GraphicsDevice.New(DeviceCreationFlags.Debug), 1, 1); //When //Then Assert.IsTrue(map.ResourceView != null); map.Dispose(); }
public virtual void SetShadowsEnabled(bool shadows) { ShadowsEnabled = shadows; if (!shadows) { ShadowMap?.Dispose(); ShadowMap = null; } else { CreateShadowMap(); CalculateLightSpace(); } }