public static SurfaceKhr CreateMirSurfaceKHR(this Instance instance, MirSurfaceCreateInfoKhr pCreateInfo, AllocationCallbacks pAllocator = null) { Result result; SurfaceKhr pSurface; unsafe { pSurface = new SurfaceKhr(); fixed(UInt64 *ptrpSurface = &pSurface.m) { result = Linux.Interop.NativeMethods.vkCreateMirSurfaceKHR(instance.m, pCreateInfo.m, pAllocator != null ? pAllocator.m : null, ptrpSurface); } if (result != Result.Success) { throw new ResultException(result); } return(pSurface); } }
/// <summary> /// Create a <see cref="SurfaceKhr"/> object for a Mir window. /// </summary> /// <param name="instance">The <see cref="Instance"/> to associate with the surface.</param> /// <param name="createInfo"> /// The structure containing the parameters affecting the creation of the surface object. /// </param> /// <param name="allocator"> /// The allocator used for host memory allocated for the surface object. /// </param> /// <returns>The resulting surface object handle.</returns> /// <exception cref="VulkanException">Vulkan returns an error code.</exception> public static SurfaceKhr CreateMirSurfaceKhr(this Instance instance, MirSurfaceCreateInfoKhr createInfo, AllocationCallbacks?allocator = null) { return(new SurfaceKhr(instance, &createInfo, ref allocator)); }