Top Description Constructors Methods
org.lwjgl.opengles

public Class NVDrawVulkanImage

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

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 Vulkan VkImage 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 and SignalVkFenceNV. 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.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static native void
glDrawVkImageNV(long
the Vulkan image handle
vkImage
,
int
an optional sampler object
sampler
,
float
the rectangle left window coordinate
x0
,
float
the rectangle bottom window coordinate
y0
,
float
the rectangle right window coordinate
x1
,
float
the rectangle top window coordinate
y1
,
float
the Z window coordinate
z
,
float
the left texture coordinate
s0
,
float
the bottom texture coordinate
t0
,
float
the right texture coordinate
s1
,
float
the top texture coordinate
t1
)

Draws a screen-aligned rectangle displaying a portion of the contents of the Vulkan VkImage.

public static long
glGetVkProcAddrNV(ByteBuffer
name of the Vulkan function
name
)

Queries the Vulkan function entry points from within an OpenGL context.

public static long
glGetVkProcAddrNV(CharSequence
name of the Vulkan function
name
)

Queries the Vulkan function entry points from within an OpenGL context.

public static native void
glSignalVkFenceNV(long
a valid Vulkan VkFence non-dispatcable handle otherwise the operation is undefined
vkFence
)

Causes the GL server to signal the Vulkan VkFence object when it executes this command.

public static native void
glSignalVkSemaphoreNV(long
a valid Vulkan VkSemaphore non-dispatchable handle otherwise the operation is undefined
vkSemaphore
)

Causes the GL server to signal the Vulkan VkSemaphore when it executes this command.

public static native void
glWaitVkSemaphoreNV(long
a valid Vulkan VkSemaphore non-dispatchable handle otherwise the operation is undefined
vkSemaphore
)

Causes the GL server to block until the Vulkan VkSemaphore is signalled.

public static native long
nglGetVkProcAddrNV(long name)

Unsafe version of: GetVkProcAddrNV

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NVDrawVulkanImageback to summary
protected NVDrawVulkanImage()

Method Detail

glDrawVkImageNVback to summary
public static native 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 Vulkan VkImage.

Parameters
vkImage:long

the Vulkan image handle

sampler:int

an optional sampler object

x0:float

the rectangle left window coordinate

y0:float

the rectangle bottom window coordinate

x1:float

the rectangle right window coordinate

y1:float

the rectangle top window coordinate

z:float

the Z window coordinate

s0:float

the left texture coordinate

t0:float

the bottom texture coordinate

s1:float

the right texture coordinate

t1:float

the top texture coordinate

glGetVkProcAddrNVback to summary
public static long glGetVkProcAddrNV(ByteBuffer name)

Queries the Vulkan function entry points from within an OpenGL context.

Parameters
name:ByteBuffer

name of the Vulkan function

Annotations
@NativeType:VULKANPROCNV
glGetVkProcAddrNVback to summary
public static long glGetVkProcAddrNV(CharSequence name)

Queries the Vulkan function entry points from within an OpenGL context.

Parameters
name:CharSequence

name of the Vulkan function

Annotations
@NativeType:VULKANPROCNV
glSignalVkFenceNVback to summary
public static native void glSignalVkFenceNV(long vkFence)

Causes the GL server to signal the Vulkan VkFence 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:long

a valid Vulkan VkFence non-dispatcable handle otherwise the operation is undefined

glSignalVkSemaphoreNVback to summary
public static native void glSignalVkSemaphoreNV(long vkSemaphore)

Causes the GL server to signal the Vulkan VkSemaphore 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:long

a valid Vulkan VkSemaphore non-dispatchable handle otherwise the operation is undefined

glWaitVkSemaphoreNVback to summary
public static native void glWaitVkSemaphoreNV(long vkSemaphore)

Causes the GL server to block until the Vulkan VkSemaphore is signalled. No GL commands after this command are executed by the server until the semaphore is signaled.

Parameters
vkSemaphore:long

a valid Vulkan VkSemaphore non-dispatchable handle otherwise the operation is undefined

nglGetVkProcAddrNVback to summary
public static native long nglGetVkProcAddrNV(long name)

Unsafe version of: GetVkProcAddrNV