public class WGLNVDXInterop
extends java.lang.Object
This extension allows OpenGL to directly access DirectX buffers and surfaces. A DirectX vertex buffer may be shared as an OpenGL buffer object and a DirectX surface may be shared as an OpenGL texture or renderbuffer object.
Requires OpenGL 2.1.
| Modifier and Type | Field and Description |
|---|---|
static int |
WGL_ACCESS_READ_ONLY_NV
|
static int |
WGL_ACCESS_READ_WRITE_NV
|
static int |
WGL_ACCESS_WRITE_DISCARD_NV
|
| Modifier and Type | Method and Description |
|---|---|
static int |
nwglDXLockObjectsNV(long device,
int count,
long objects)
Unsafe version of:
DXLockObjectsNV |
static int |
nwglDXUnlockObjectsNV(long device,
int count,
long objects)
Unsafe version of:
DXUnlockObjectsNV |
static boolean |
wglDXCloseDeviceNV(long device) |
static boolean |
wglDXLockObjectsNV(long device,
org.lwjgl.PointerBuffer objects)
Before a GL object which is associated with a DirectX resource may be used, it must be locked with this function.
|
static boolean |
wglDXObjectAccessNV(long object,
int access)
Modifies the access mode of an interop object, if a different access mode is required after the object has been registered.
|
static long |
wglDXOpenDeviceNV(long dxDevice)
Prepares a DirectX device for interoperability and returns a handle to a GL/DirectX interop device.
|
static long |
wglDXRegisterObjectNV(long device,
long dxResource,
int name,
int type,
int access)
Prepares a DirectX object for use by the GL and returns a handle to a GL/DirectX interop object.
|
static boolean |
wglDXSetResourceShareHandleNV(long dxObject,
long shareHandle) |
static boolean |
wglDXUnlockObjectsNV(long device,
org.lwjgl.PointerBuffer objects)
Return control of an object to DirectX.
|
static boolean |
wglDXUnregisterObjectNV(long device,
long object) |
public static final int WGL_ACCESS_READ_ONLY_NV
public static final int WGL_ACCESS_READ_WRITE_NV
public static final int WGL_ACCESS_WRITE_DISCARD_NV
public static boolean wglDXSetResourceShareHandleNV(long dxObject,
long shareHandle)
dxObject - a pointer to the DirectX resource that will be sharedshareHandle - the share handle that the OS generated for the resourcepublic static long wglDXOpenDeviceNV(long dxDevice)
dxDevice - a pointer to a supported Direct3D device objectpublic static boolean wglDXCloseDeviceNV(long device)
public static long wglDXRegisterObjectNV(long device,
long dxResource,
int name,
int type,
int access)
device - a GL/DirectX interop device handle, as returned by DXOpenDeviceNVdxResource - a pointer to a DirectX resource to be registered with the GLname - the GL object name to be assigned to the DirectX resource in the namespace of the objects identified by type in the current GL contexttype - the GL object type that will map to the DirectX resource being sharedaccess - indicates the intended usage of the resource in GL. One of:ACCESS_READ_ONLY_NV | ACCESS_READ_WRITE_NV | ACCESS_WRITE_DISCARD_NV |
public static boolean wglDXUnregisterObjectNV(long device,
long object)
public static boolean wglDXObjectAccessNV(long object,
int access)
object - the GL/DirectX interop objectaccess - the new access mode. One of:ACCESS_READ_ONLY_NV | ACCESS_READ_WRITE_NV | ACCESS_WRITE_DISCARD_NV |
public static int nwglDXLockObjectsNV(long device,
int count,
long objects)
DXLockObjectsNVcount - the number of objects to lockpublic static boolean wglDXLockObjectsNV(long device,
org.lwjgl.PointerBuffer objects)
A return value of TRUE indicates that all objects were successfully locked. A return value of FALSE indicates an error. If the function returns FALSE, none of the objects will be locked.
Attempting to access an interop object via GL when the object is not locked, or attempting to access the DirectX resource through the DirectX API when it is locked by GL, will result in undefined behavior and may result in data corruption or program termination. Likewise, passing invalid interop device or object handles to this function has undefined results, including program termination.
device - the GL/DirectX interop device handleobjects - an array of count interop objectspublic static int nwglDXUnlockObjectsNV(long device,
int count,
long objects)
DXUnlockObjectsNVcount - the number of objects to unlockpublic static boolean wglDXUnlockObjectsNV(long device,
org.lwjgl.PointerBuffer objects)
device - the GL/DirectX interop device handleobjects - an array of count interop objectsCopyright LWJGL. All Rights Reserved. License terms.