Package org.lwjgl.opencl
Class APPLEGLSharing
java.lang.Object
org.lwjgl.opencl.APPLEGLSharing
Native bindings to the APPLE_gl_sharing extension.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAccepted as theparam_nameargument ofGetGLContextInfoAPPLE.static final intAccepted as theparam_nameargument ofGetGLContextInfoAPPLE.static final intThis enumerated value can be specified as part of thepropertiesargument passed toCreateContextto allow OpenCL compliant devices in an existing CGL share group to be used as the devices in the newly created CL context.static final intError code returned byGetGLContextInfoAPPLEif an invalidplatform_gl_ctxis provided. -
Method Summary
Modifier and TypeMethodDescriptionstatic intclGetGLContextInfoAPPLE(long context, long platform_gl_ctx, int param_name, @Nullable ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) Provides a query mechanism to retrieve OpenGL context specific information from an OpenCL context to help identify device specific mappings and usage.static intclGetGLContextInfoAPPLE(long context, long platform_gl_ctx, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) Provides a query mechanism to retrieve OpenGL context specific information from an OpenCL context to help identify device specific mappings and usage.static intnclGetGLContextInfoAPPLE(long context, long platform_gl_ctx, int param_name, long param_value_size, long param_value, long param_value_size_ret) Unsafe version of:GetGLContextInfoAPPLE
-
Field Details
-
CL_INVALID_GL_CONTEXT_APPLE
public static final int CL_INVALID_GL_CONTEXT_APPLEError code returned byGetGLContextInfoAPPLEif an invalidplatform_gl_ctxis provided.- See Also:
-
CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE
public static final int CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLEThis enumerated value can be specified as part of thepropertiesargument passed toCreateContextto allow OpenCL compliant devices in an existing CGL share group to be used as the devices in the newly created CL context. GL objects that were allocated in the specified CGL share group can now be shared between CL and GL.- See Also:
-
CL_CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLE
public static final int CL_CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLEAccepted as theparam_nameargument ofGetGLContextInfoAPPLE. Returns an array ofcl_device_idsfor the CL device(s) corresponding to the virtual screen(s) for the specified CGL context.- See Also:
-
CL_CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLE
public static final int CL_CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLEAccepted as theparam_nameargument ofGetGLContextInfoAPPLE. Returns acl_device_idfor the CL device associated with the virtual screen for the specified CGL context.- See Also:
-
-
Method Details
-
nclGetGLContextInfoAPPLE
public static int nclGetGLContextInfoAPPLE(long context, long platform_gl_ctx, int param_name, long param_value_size, long param_value, long param_value_size_ret) Unsafe version of:GetGLContextInfoAPPLE- Parameters:
param_value_size- the size in bytes of memory pointed to byparam_value. This size must be ≥ size of return type. Ifparam_valueisNULL, it is ignored.
-
clGetGLContextInfoAPPLE
public static int clGetGLContextInfoAPPLE(long context, long platform_gl_ctx, int param_name, @Nullable ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) Provides a query mechanism to retrieve OpenGL context specific information from an OpenCL context to help identify device specific mappings and usage.For example, one possible usage would be to allow the client to map a CGL virtual screen index to an appropriate CL device id to insure that the rendering device and the compute device are the same, thus guaranteeing any shared OpenGL memory that is attached o a CL memory object remains resident on the active device.
- Parameters:
context- the context being queriedplatform_gl_ctx- the OpenGL context handleparam_name- a constant that specifies the GL context information to query. One of:CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLECGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLEparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.
-
clGetGLContextInfoAPPLE
public static int clGetGLContextInfoAPPLE(long context, long platform_gl_ctx, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) Provides a query mechanism to retrieve OpenGL context specific information from an OpenCL context to help identify device specific mappings and usage.For example, one possible usage would be to allow the client to map a CGL virtual screen index to an appropriate CL device id to insure that the rendering device and the compute device are the same, thus guaranteeing any shared OpenGL memory that is attached o a CL memory object remains resident on the active device.
- Parameters:
context- the context being queriedplatform_gl_ctx- the OpenGL context handleparam_name- a constant that specifies the GL context information to query. One of:CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLECGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLEparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.
-