public virtual void ProcessResize(Rectangle newSize) { iRect = newSize; CrowInterface.ProcessResize(newSize); createContext(); GL.Viewport(0, 0, newSize.Width, newSize.Height); //TODO:find a better place for this }
protected override void OnResize() { base.OnResize(); iFace.ProcessResize(new Crow.Rectangle(0, 0, (int)Width, (int)Height)); initUISurface(); }
protected override void OnResize(EventArgs e) { base.OnResize(e); CrowInterface.ProcessResize( new Rectangle( 0, 0, this.ClientRectangle.Width, this.ClientRectangle.Height)); createContext(); GL.Viewport(0, 0, ClientRectangle.Width, ClientRectangle.Height); }
protected override void OnResize() { dev.WaitIdle(); crow.ProcessResize(new Rectangle(0, 0, (int)swapChain.Width, (int)swapChain.Height)); initUISurface(); CVKL.DescriptorSetWrites uboUpdate = new CVKL.DescriptorSetWrites(dsCrow, descLayout); uboUpdate.Write(dev, uiImage.Descriptor); if (uiFrameBuffers != null) { for (int i = 0; i < swapChain.ImageCount; ++i) { uiFrameBuffers[i]?.Dispose(); } } uiFrameBuffers = new CVKL.Framebuffer[swapChain.ImageCount]; for (int i = 0; i < swapChain.ImageCount; ++i) { uiFrameBuffers[i] = new CVKL.Framebuffer(uiPipeline.RenderPass, swapChain.Width, swapChain.Height, (uiPipeline.Samples == VkSampleCountFlags.SampleCount1) ? new CVKL.Image[] { swapChain.images[i], } : new CVKL.Image[] { null, swapChain.images[i] }); uiFrameBuffers[i].SetName("ui FB " + i); } buildCommandBuffers(); dev.WaitIdle(); }