예제 #1
0
        /// <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();
        }
예제 #2
0
        public void CreateBasicShadowMap()
        {
            //Given
            ShadowMap map = new ShadowMap(GraphicsDevice.New(DeviceCreationFlags.Debug), 1, 1);

            //When

            //Then
            Assert.IsTrue(map.ResourceView != null);
            map.Dispose();
        }
예제 #3
0
파일: Light.cs 프로젝트: Etny/Yahtzee-Quest
        public virtual void SetShadowsEnabled(bool shadows)
        {
            ShadowsEnabled = shadows;

            if (!shadows)
            {
                ShadowMap?.Dispose();
                ShadowMap = null;
            }
            else
            {
                CreateShadowMap();
                CalculateLightSpace();
            }
        }