Esempio n. 1
0
            public _SwapchainCreateInfoKHR(SwapchainCreateInfoKHR info)
            {
                SType                 = info.type;
                Next                  = info.next;
                Flags                 = info.flags;
                Surface               = info.surface;
                MinImageCount         = info.minImageCount;
                ImageFormat           = info.imageFormat;
                ImageColorSpace       = info.imageColorSpace;
                ImageExtent           = info.imageExtent;
                ImageArrayLayers      = info.imageArrayLayers;
                ImageUsage            = info.imageUsage;
                ImageSharingMode      = info.imageSharingMode;
                QueueFamilyIndexCount = (UInt32)(info.queueFamilyIndices?.Count ?? 0);
                QueueFamilyIndices    = info.queueFamilyIndices != null?Alloc.alloc(info.queueFamilyIndices) : IntPtr.Zero;

                PreTransform   = info.preTransform;
                CompositeAlpha = info.compositeAlpha;
                PresentMode    = info.presentMode;
                Clipped        = info.clipped;
                OldSwapchain   = info.oldSwapchain;
            }
Esempio n. 2
0
            public _PresentInfoKHR(PresentInfoKHR info)
            {
                SType = info.type;
                Next  = info.next;
                WaitSemaphoreCount = (UInt32)info.waitSemaphores.Count;
                SwapchainCount     = (UInt32)info.swapchains.Count;

                WaitSemaphores = Alloc.alloc(info.waitSemaphores);
                Swapchains     = Alloc.alloc(info.swapchains);
                ImageIndices   = Alloc.alloc(info.indices);

                List <UInt32> res;

                if (info.results == null || info.results.Count == 0)
                {
                    Results = IntPtr.Zero;
                }
                else
                {
                    res     = new List <UInt32>(info.results.Count);
                    Results = Alloc.alloc(res);
                }
            }