Esempio n. 1
0
        public void Dispose()
        {
            dev.WaitIdle();

            frameBuffer?.Dispose();

            gbColorRough.Dispose();
            gbEmitMetal.Dispose();
            gbN_AO.Dispose();
            gbPos.Dispose();
            hdrImgResolved.Dispose();

            gBuffPipeline.Dispose();
            composePipeline.Dispose();
            //toneMappingPipeline.Dispose ();
            debugPipeline?.Dispose();

            descLayoutMain.Dispose();
            descLayoutTextures?.Dispose();
            descLayoutGBuff.Dispose();

            uboMatrices.Dispose();
            uboLights.Dispose();
            model.Dispose();
            envCube.Dispose();

#if WITH_SHADOWS
            shadowMapRenderer.Dispose();
#endif

            descriptorPool.Dispose();

            dev.DestroySemaphore(DrawComplete);
        }
Esempio n. 2
0
        public void Dispose()
        {
            dev.WaitIdle();
            for (int i = 0; i < swapChain.ImageCount; ++i)
            {
                frameBuffers[i]?.Dispose();
            }

            gbColorRough.Dispose();
            gbEmitMetal.Dispose();
            gbN_AO.Dispose();
            gbPos.Dispose();
            hdrImg.Dispose();

            gBuffPipeline.Dispose();
            composePipeline.Dispose();
            toneMappingPipeline.Dispose();
            debugPipeline.Dispose();

            descLayoutMain.Dispose();
            descLayoutTextures?.Dispose();
            descLayoutGBuff.Dispose();

            uboMatrices.Dispose();
            uboLights.Dispose();
            model.Dispose();
            envCube.Dispose();

#if WITH_SHADOWS
            shadowMapRenderer.Dispose();
#endif

            descriptorPool.Dispose();
        }
Esempio n. 3
0
        protected override void Dispose(bool disposing)
        {
            model.Dispose();
            envCube.Dispose();

            descLayoutMain.Dispose();
            descLayoutTextures.Dispose();
            descriptorPool.Dispose();

            uboMats.Dispose();

            base.Dispose(disposing);
        }
Esempio n. 4
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (!isDisposed)
                {
                    dev.WaitIdle();
                    for (int i = 0; i < swapChain.ImageCount; ++i)
                    {
                        frameBuffers[i]?.Dispose();
                    }

                    gbColorRough.Dispose();
                    gbEmitMetal.Dispose();
                    gbN.Dispose();
                    gbPos.Dispose();

                    gBuffPipeline.Dispose();
                    composePipeline.Dispose();

                    descLayoutMain.Dispose();
                    descLayoutModelTextures.Dispose();
                    descLayoutGBuff.Dispose();

                    uboMats.Dispose();
                    model.Dispose();
                    envCube.Dispose();

                    descriptorPool.Dispose();
#if DEBUG
                    foreach (Framebuffer fb in debugFB)
                    {
                        fb.Dispose();
                    }

                    debugDraw.Dispose();
                    timestampQPool?.Dispose();
                    statPool?.Dispose();
#endif
                }
            }

            base.Dispose(disposing);
        }