Beispiel #1
0
        public static Vk.Extent2D SelectSwapExtent(Vk.SurfaceCapabilitiesKhr capabilities, Window window)
        {
            if (capabilities.CurrentExtent.Width != Int32.MaxValue)
            {
                return(capabilities.CurrentExtent);
            }
            else
            {
                int width  = window.FramebufferWidth;
                int height = window.FramebufferHeight;

                Vk.Extent2D actualExtent = new Vk.Extent2D();
                actualExtent.Width  = (uint)width;
                actualExtent.Height = (uint)height;
                return(actualExtent);
            }
        }
Beispiel #2
0
 public void SetExtent(Vk.Extent2D extent)
 {
     this.wrapper.Extent = extent;
 }