コード例 #1
0
ファイル: main.cs プロジェクト: jpbruyere/vke.net
        //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();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: jpbruyere/vke.net
        protected override void OnResize()
        {
            base.OnResize();

            updateViewRequested = true;

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

            buildCommandBuffers();
        }
コード例 #3
0
ファイル: main.cs プロジェクト: jpbruyere/vke.net
        protected override void OnResize()
        {
            base.OnResize();

            dev.WaitIdle();
            updateMatrices();

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

            buildCommandBuffers();
        }
コード例 #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);
        }
コード例 #5
0
ファイル: main.cs プロジェクト: jpbruyere/vke.net
        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();
        }
コード例 #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);
        }