Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 3
0
        public virtual void SetShadowsEnabled(bool shadows)
        {
            ShadowsEnabled = shadows;

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