public class KHRGLSharing
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CL_CGL_SHAREGROUP_KHR
Accepted as an attribute name in the
properties argument of CreateContext and CreateContextFromType. |
static int |
CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR
Accepted as the
param_name argument of GetGLContextInfoKHR. |
static int |
CL_DEVICES_FOR_GL_CONTEXT_KHR
Accepted as the
param_name argument of GetGLContextInfoKHR. |
static int |
CL_EGL_DISPLAY_KHR
Accepted as an attribute name in the
properties argument of CreateContext and CreateContextFromType. |
static int |
CL_GL_CONTEXT_KHR
Accepted as an attribute name in the
properties argument of CreateContext and CreateContextFromType. |
static int |
CL_GLX_DISPLAY_KHR
Accepted as an attribute name in the
properties argument of CreateContext and CreateContextFromType. |
static int |
CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR
Returned by
CreateContext, CreateContextFromType, and GetGLContextInfoKHR when an invalid OpenGL context or share group object handle is
specified in properties. |
static int |
CL_WGL_HDC_KHR
Accepted as an attribute name in the
properties argument of CreateContext and CreateContextFromType. |
| Modifier and Type | Method and Description |
|---|---|
static int |
clGetGLContextInfoKHR(org.lwjgl.PointerBuffer properties,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Queries the OpenCL device currently corresponding to an OpenGL context.
|
static int |
clGetGLContextInfoKHR(org.lwjgl.PointerBuffer properties,
int param_name,
org.lwjgl.PointerBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Queries the OpenCL device currently corresponding to an OpenGL context.
|
static int |
nclGetGLContextInfoKHR(long properties,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetGLContextInfoKHR |
public static final int CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR
CreateContext, CreateContextFromType, and GetGLContextInfoKHR when an invalid OpenGL context or share group object handle is
specified in properties.public static final int CL_DEVICES_FOR_GL_CONTEXT_KHR
param_name argument of GetGLContextInfoKHR. Returns a list of all CL devices which may be associated with the specified
OpenGL context.public static final int CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR
param_name argument of GetGLContextInfoKHR. Returns the CL device currently associated with the specified OpenGL context.public static final int CL_GL_CONTEXT_KHR
properties argument of CreateContext and CreateContextFromType.public static final int CL_EGL_DISPLAY_KHR
properties argument of CreateContext and CreateContextFromType.public static final int CL_GLX_DISPLAY_KHR
properties argument of CreateContext and CreateContextFromType.public static final int CL_WGL_HDC_KHR
properties argument of CreateContext and CreateContextFromType.public static final int CL_CGL_SHAREGROUP_KHR
properties argument of CreateContext and CreateContextFromType.public static int nclGetGLContextInfoKHR(long properties,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetGLContextInfoKHRparam_value_size - the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type. If param_value is NULL, it is ignored.public static int clGetGLContextInfoKHR(org.lwjgl.PointerBuffer properties,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
Such a device may not always exist (for example, if an OpenGL context is specified on a GPU not supporting OpenCL command queues, but which does support shared CL/GL objects), and if it does exist, may change over time. When such a device does exist, acquiring and releasing shared CL/GL objects may be faster on a command queue corresponding to this device than on command queues corresponding to other devices available to an OpenCL context.
properties - points to an attribute list whose format and valid contents are identical to the {code properties} argument of CreateContext.
properties must identify a single valid GL context or GL share group object.param_name - a constant that specifies the GL context information to query. One of:DEVICES_FOR_GL_CONTEXT_KHR | CURRENT_DEVICE_FOR_GL_CONTEXT_KHR |
param_value - a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.param_value_size_ret - the actual size in bytes of data being queried by param_value. If NULL, it is ignored.SUCCESS if the function is executed successfully. If no device(s) exist corresponding to param_name, the call will not fail, but the value of
param_value_size_ret will be zero.
Returns INVALID_GL_SHAREGROUP_REFERENCE_KHR if a context was specified by any of the following means:
GL_CONTEXT_KHR and EGL_DISPLAY_KHR.GL_CONTEXT_KHR and GLX_DISPLAY_KHR.GL_CONTEXT_KHR and WGL_HDC_KHR.and any of the following conditions hold:
Returns INVALID_GL_SHAREGROUP_REFERENCE_KHR if a share group was specified for a CGL-based OpenGL implementation by setting the attribute
CGL_SHAREGROUP_KHR, and the specified share group does not identify a valid CGL share group object.
Returns INVALID_OPERATION if a context was specified as described above and any of the following conditions hold:
CGL_SHAREGROUP_KHR, EGL_DISPLAY_KHR, GLX_DISPLAY_KHR, and
WGL_HDC_KHR is set to a non-default value.CGL_SHAREGROUP_KHR and GL_CONTEXT_KHR are set to non-default values.devices argument cannot support OpenCL objects which share the data store of an OpenGL object.Returns INVALID_VALUE if an invalid attribute name is specified in properties.
Additionally, returns INVALID_VALUE if param_name is invalid, or if the size in bytes specified by param_value_size is less than the
size of the return type and param_value is not a NULL value, OUT_OF_RESOURCES if there is a failure to allocate resources required by the
OpenCL implementation on the device, or OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the
host.
public static int clGetGLContextInfoKHR(org.lwjgl.PointerBuffer properties,
int param_name,
@Nullable
org.lwjgl.PointerBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
Such a device may not always exist (for example, if an OpenGL context is specified on a GPU not supporting OpenCL command queues, but which does support shared CL/GL objects), and if it does exist, may change over time. When such a device does exist, acquiring and releasing shared CL/GL objects may be faster on a command queue corresponding to this device than on command queues corresponding to other devices available to an OpenCL context.
properties - points to an attribute list whose format and valid contents are identical to the {code properties} argument of CreateContext.
properties must identify a single valid GL context or GL share group object.param_name - a constant that specifies the GL context information to query. One of:DEVICES_FOR_GL_CONTEXT_KHR | CURRENT_DEVICE_FOR_GL_CONTEXT_KHR |
param_value - a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.param_value_size_ret - the actual size in bytes of data being queried by param_value. If NULL, it is ignored.SUCCESS if the function is executed successfully. If no device(s) exist corresponding to param_name, the call will not fail, but the value of
param_value_size_ret will be zero.
Returns INVALID_GL_SHAREGROUP_REFERENCE_KHR if a context was specified by any of the following means:
GL_CONTEXT_KHR and EGL_DISPLAY_KHR.GL_CONTEXT_KHR and GLX_DISPLAY_KHR.GL_CONTEXT_KHR and WGL_HDC_KHR.and any of the following conditions hold:
Returns INVALID_GL_SHAREGROUP_REFERENCE_KHR if a share group was specified for a CGL-based OpenGL implementation by setting the attribute
CGL_SHAREGROUP_KHR, and the specified share group does not identify a valid CGL share group object.
Returns INVALID_OPERATION if a context was specified as described above and any of the following conditions hold:
CGL_SHAREGROUP_KHR, EGL_DISPLAY_KHR, GLX_DISPLAY_KHR, and
WGL_HDC_KHR is set to a non-default value.CGL_SHAREGROUP_KHR and GL_CONTEXT_KHR are set to non-default values.devices argument cannot support OpenCL objects which share the data store of an OpenGL object.Returns INVALID_VALUE if an invalid attribute name is specified in properties.
Additionally, returns INVALID_VALUE if param_name is invalid, or if the size in bytes specified by param_value_size is less than the
size of the return type and param_value is not a NULL value, OUT_OF_RESOURCES if there is a failure to allocate resources required by the
OpenCL implementation on the device, or OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the
host.
Copyright LWJGL. All Rights Reserved. License terms.