Пример #1
0
        public Result CreateAndroidSurfaceKHR(MgAndroidSurfaceCreateInfoKHR pCreateInfo, IMgAllocationCallbacks allocator, out IMgSurfaceKHR pSurface)
        {
            if (pCreateInfo == null)
            {
                throw new ArgumentNullException(nameof(pCreateInfo));
            }

            Debug.Assert(!mIsDisposed);

            var allocatorHandle = GetAllocatorHandle(allocator);

            // TODO : MIGHT NEED GetInstanceProcAddr INSTEAD
            var createInfo = new VkAndroidSurfaceCreateInfoKHR
            {
                sType  = VkStructureType.StructureTypeAndroidSurfaceCreateInfoKhr,
                pNext  = IntPtr.Zero,
                flags  = pCreateInfo.Flags,
                window = pCreateInfo.Window,
            };

            var surfaceHandle = 0UL;
            var result        = Interops.vkCreateAndroidSurfaceKHR(Handle, ref createInfo, allocatorHandle, ref surfaceHandle);

            pSurface = new VkSurfaceKHR(surfaceHandle);

            return(result);
        }
Пример #2
0
 internal extern static Result vkCreateAndroidSurfaceKHR(IntPtr instance, ref VkAndroidSurfaceCreateInfoKHR pCreateInfo, IntPtr pAllocator, ref UInt64 pSurface);