/// <summary>
 /// Query the DisplayKHR corresponding to an X11 RandR Output.
 /// </summary>
 /// <param name="extendedHandle">
 /// The PhysicalDevice handle to extend.
 /// </param>
 public static unsafe SharpVk.Khronos.Display GetRandROutputDisplay(this SharpVk.PhysicalDevice extendedHandle, IntPtr dpy, IntPtr rrOutput)
 {
     try
     {
         SharpVk.Khronos.Display result       = default(SharpVk.Khronos.Display);
         CommandCache            commandCache = default(CommandCache);
         IntPtr *marshalledDpy = default(IntPtr *);
         SharpVk.Interop.Khronos.Display marshalledDisplay = default(SharpVk.Interop.Khronos.Display);
         commandCache  = extendedHandle.commandCache;
         marshalledDpy = (IntPtr *)(Interop.HeapUtil.Allocate <IntPtr>());
         *marshalledDpy = dpy;
         SharpVk.Interop.Multivendor.VkPhysicalDeviceGetRandROutputDisplayDelegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.Multivendor.VkPhysicalDeviceGetRandROutputDisplayDelegate>("vkGetRandROutputDisplayEXT", "instance");
         Result methodResult = commandDelegate(extendedHandle.handle, marshalledDpy, rrOutput, &marshalledDisplay);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
         result = new SharpVk.Khronos.Display(marshalledDisplay);
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
Ejemplo n.º 2
0
 internal Display(SharpVk.Interop.Khronos.Display handle)
 {
     this.handle       = handle;
     this.commandCache = null;
 }