Exemplo n.º 1
0
        //The resize method is called at least once before any rendering, so it's
        //a safe place to initialize output size related vulkan objects like the
        //frame buffers.
        protected override void OnResize()
        {
            base.OnResize();

            frameBuffers?.Dispose();
            frameBuffers = renderPass.CreateFrameBuffers(swapChain);

            buildCommandBuffers();
        }
Exemplo n.º 2
0
        protected override void OnResize()
        {
            base.OnResize();

            updateViewRequested = true;

            frameBuffers?.Dispose();
            frameBuffers = pipeline.RenderPass.CreateFrameBuffers(swapChain);

            buildCommandBuffers();
        }
Exemplo n.º 3
0
        protected override void OnResize()
        {
            base.OnResize();

            dev.WaitIdle();
            updateMatrices();

            frameBuffers?.Dispose();
            frameBuffers = pipeline.RenderPass.CreateFrameBuffers(swapChain);

            buildCommandBuffers();
        }
Exemplo n.º 4
0
        public void Resize()
        {
            frameBuffers?.Dispose();
            frameBuffers = new FrameBuffers();

            createGBuff();

            for (int i = 0; i < swapChain.ImageCount; ++i)
            {
                frameBuffers.Add(new FrameBuffer(renderPass, swapChain.Width, swapChain.Height, new Image [] {
                    swapChain.images[i], null, gbColorRough, gbEmitMetal, gbN_AO, gbPos, hdrImg
                }));
            }
            //frameBuffers = renderPass.CreateFrameBuffers (swapChain);
        }
Exemplo n.º 5
0
        protected override void OnResize()
        {
            base.OnResize();

            dev.WaitIdle();

            renderer.Resize(Width, Height);

            UpdateView();

            frameBuffers?.Dispose();
            frameBuffers = plToneMap.RenderPass.CreateFrameBuffers(swapChain);

            DescriptorSetWrites dsUpdate = new DescriptorSetWrites(plToneMap.Layout.DescriptorSetLayouts[0].Bindings[0]);

            dsUpdate.Write(dev, descriptorSet, renderer.hdrImgResolved.Descriptor);

            buildCommandBuffers();

            dev.WaitIdle();
        }
Exemplo n.º 6
0
        protected override void Dispose(bool disposing)
        {
            dev.WaitIdle();

            if (disposing)
            {
                if (!isDisposed)
                {
                    pipeline.Dispose();
                    dsLayout.Dispose();
                    frameBuffers.Dispose();
                    descriptorPool.Dispose();
                    texture?.Dispose();
                    nextTexture?.Dispose();
                    vbo.Dispose();
                    ibo.Dispose();
                    uboMats.Dispose();
                }
            }

            base.Dispose(disposing);
        }