Class NVDrawVulkanImage
- java.lang.Object
-
- org.lwjgl.opengl.NVDrawVulkanImage
-
public class NVDrawVulkanImage extends java.lang.Object
Native bindings to the NV_draw_vulkan_image extension.This extension provides a new function,
DrawVkImageNV
, allowing applications to draw a screen-aligned rectangle displaying some or all of the contents of a two-dimensional Vulkan VkImage. Callers specify a VulkanVkImage
handle, an optional OpenGL sampler object, window coordinates of the rectangle to draw, and texture coordinates corresponding to the corners of the rectangle. For each fragment produced by the rectangle,DrawVkImageNV
interpolates the texture coordinates, performs a texture lookup, and uses the texture result as the fragment color.No shaders are used by
DrawVkImageNV
; the results of the texture lookup are used in lieu of a fragment shader output. The fragments generated are processed by all per-fragment operations. In particular,DrawVkImageNV()
fully supports blending and multisampling.In order to synchronize between Vulkan and OpenGL there are three other functions provided;
WaitVkSemaphoreNV
,SignalVkSemaphoreNV
andSignalVkFenceNV
. These allow OpenGL to wait for Vulkan to complete work and also Vulkan to wait for OpenGL to complete work. Together OpenGL and Vulkan can synchronize on the server without application interation.Finally the function
GetVkProcAddrNV()
is provided to allow the OpenGL context to query the Vulkan entry points directly and avoid having to load them through the typical Vulkan loader.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static void
glDrawVkImageNV(long vkImage, int sampler, float x0, float y0, float x1, float y1, float z, float s0, float t0, float s1, float t1)
Draws a screen-aligned rectangle displaying a portion of the contents of the VulkanVkImage
.static long
glGetVkProcAddrNV(java.nio.ByteBuffer name)
Queries the Vulkan function entry points from within an OpenGL context.static long
glGetVkProcAddrNV(java.lang.CharSequence name)
Queries the Vulkan function entry points from within an OpenGL context.static void
glSignalVkFenceNV(long vkFence)
Causes the GL server to signal the VulkanVkFence
object when it executes this command.static void
glSignalVkSemaphoreNV(long vkSemaphore)
Causes the GL server to signal the VulkanVkSemaphore
when it executes this command.static void
glWaitVkSemaphoreNV(long vkSemaphore)
Causes the GL server to block until the VulkanVkSemaphore
is signalled.
-
-
-
Method Detail
-
glDrawVkImageNV
public static void glDrawVkImageNV(long vkImage, int sampler, float x0, float y0, float x1, float y1, float z, float s0, float t0, float s1, float t1)
Draws a screen-aligned rectangle displaying a portion of the contents of the VulkanVkImage
.- Parameters:
vkImage
- the Vulkan image handlesampler
- an optional sampler objectx0
- the rectangle left window coordinatey0
- the rectangle bottom window coordinatex1
- the rectangle right window coordinatey1
- the rectangle top window coordinatez
- the Z window coordinates0
- the left texture coordinatet0
- the bottom texture coordinates1
- the right texture coordinatet1
- the top texture coordinate
-
glGetVkProcAddrNV
public static long glGetVkProcAddrNV(java.nio.ByteBuffer name) public static long glGetVkProcAddrNV(java.lang.CharSequence name)
Queries the Vulkan function entry points from within an OpenGL context.- Parameters:
name
- name of the Vulkan function
-
glWaitVkSemaphoreNV
public static void glWaitVkSemaphoreNV(long vkSemaphore)
Causes the GL server to block until the VulkanVkSemaphore
is signalled. No GL commands after this command are executed by the server until the semaphore is signaled.- Parameters:
vkSemaphore
- a valid VulkanVkSemaphore
non-dispatchable handle otherwise the operation is undefined
-
glSignalVkSemaphoreNV
public static void glSignalVkSemaphoreNV(long vkSemaphore)
Causes the GL server to signal the VulkanVkSemaphore
when it executes this command. The semaphore is not signalled by GL until all commands issued before this have completed execution on the GL server.- Parameters:
vkSemaphore
- a valid VulkanVkSemaphore
non-dispatchable handle otherwise the operation is undefined
-
glSignalVkFenceNV
public static void glSignalVkFenceNV(long vkFence)
Causes the GL server to signal the VulkanVkFence
object when it executes this command. The fence is not signalled by the GL until all commands issued before this have completed execution on the GL server.- Parameters:
vkFence
- a valid Vulkan VkFence non-dispatcable handle otherwise the operation is undefined
-
-