예제 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="pointer">
 /// </param>
 internal unsafe void MarshalTo(SharpVk.Interop.Fuchsia.ImagePipeSurfaceCreateInfo *pointer)
 {
     pointer->SType = StructureType.ImagepipeSurfaceCreateInfo;
     pointer->Next  = null;
     if (this.Flags != null)
     {
         pointer->Flags = this.Flags.Value;
     }
     else
     {
         pointer->Flags = default(SharpVk.Fuchsia.ImagePipeSurfaceCreateFlags);
     }
     pointer->ImagePipeHandle = this.ImagePipeHandle;
 }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="extendedHandle">
 /// The Instance handle to extend.
 /// </param>
 public static unsafe SharpVk.Khronos.Surface CreateImagePipeSurface(this SharpVk.Instance extendedHandle, uint imagePipeHandle, SharpVk.Fuchsia.ImagePipeSurfaceCreateFlags?flags = default(SharpVk.Fuchsia.ImagePipeSurfaceCreateFlags?), SharpVk.AllocationCallbacks?allocator = default(SharpVk.AllocationCallbacks?))
 {
     try
     {
         SharpVk.Khronos.Surface result       = default(SharpVk.Khronos.Surface);
         CommandCache            commandCache = default(CommandCache);
         SharpVk.Interop.Fuchsia.ImagePipeSurfaceCreateInfo *marshalledCreateInfo = default(SharpVk.Interop.Fuchsia.ImagePipeSurfaceCreateInfo *);
         void *nextPointer = default(void *);
         SharpVk.Interop.AllocationCallbacks *marshalledAllocator = default(SharpVk.Interop.AllocationCallbacks *);
         SharpVk.Interop.Khronos.Surface      marshalledSurface   = default(SharpVk.Interop.Khronos.Surface);
         commandCache                = extendedHandle.commandCache;
         marshalledCreateInfo        = (SharpVk.Interop.Fuchsia.ImagePipeSurfaceCreateInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Fuchsia.ImagePipeSurfaceCreateInfo>());
         marshalledCreateInfo->SType = StructureType.ImagepipeSurfaceCreateInfo;
         marshalledCreateInfo->Next  = nextPointer;
         if (flags != null)
         {
             marshalledCreateInfo->Flags = flags.Value;
         }
         else
         {
             marshalledCreateInfo->Flags = default(SharpVk.Fuchsia.ImagePipeSurfaceCreateFlags);
         }
         marshalledCreateInfo->ImagePipeHandle = imagePipeHandle;
         if (allocator != null)
         {
             marshalledAllocator = (SharpVk.Interop.AllocationCallbacks *)(Interop.HeapUtil.Allocate <SharpVk.Interop.AllocationCallbacks>());
             allocator.Value.MarshalTo(marshalledAllocator);
         }
         else
         {
             marshalledAllocator = default(SharpVk.Interop.AllocationCallbacks *);
         }
         SharpVk.Interop.Fuchsia.VkInstanceCreateImagePipeSurfaceDelegate commandDelegate = commandCache.Cache.vkCreateImagePipeSurfaceFUCHSIA;
         Result methodResult = commandDelegate(extendedHandle.handle, marshalledCreateInfo, marshalledAllocator, &marshalledSurface);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
         result = new SharpVk.Khronos.Surface(extendedHandle, marshalledSurface);
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }