Top Description Fields Constructors Methods
org.lwjgl.opencl

public Class APPLEGLSharing

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

Native bindings to the APPLE_gl_sharing extension.

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE

This enumerated value can be specified as part of the properties argument passed to CreateContext to allow OpenCL compliant devices in an existing CGL share group to be used as the devices in the newly created CL context.

public static final int
CL_INVALID_GL_CONTEXT_APPLE

Error code returned by GetGLContextInfoAPPLE if an invalid platform_gl_ctx is provided.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
clGetGLContextInfoAPPLE(long
the context being queried
context
,
long
the OpenGL context handle
platform_gl_ctx
,
int
a constant that specifies the GL context information to query. One of:
CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLE
CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLE
param_name
,
ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
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.

public static int
clGetGLContextInfoAPPLE(long
the context being queried
context
,
long
the OpenGL context handle
platform_gl_ctx
,
int
a constant that specifies the GL context information to query. One of:
CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLE
CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLE
param_name
,
PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
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.

public static int
nclGetGLContextInfoAPPLE(long context, long platform_gl_ctx, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetGLContextInfoAPPLE

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CL_CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLEback to summary
public static final int CL_CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLE

Accepted as the param_name argument of GetGLContextInfoAPPLE. Returns a cl_device_id for the CL device associated with the virtual screen for the specified CGL context.

CL_CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLEback to summary
public static final int CL_CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLE

Accepted as the param_name argument of GetGLContextInfoAPPLE. Returns an array of cl_device_ids for the CL device(s) corresponding to the virtual screen(s) for the specified CGL context.

CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLEback to summary
public static final int CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE

This enumerated value can be specified as part of the properties argument passed to CreateContext to 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.

CL_INVALID_GL_CONTEXT_APPLEback to summary
public static final int CL_INVALID_GL_CONTEXT_APPLE

Error code returned by GetGLContextInfoAPPLE if an invalid platform_gl_ctx is provided.

Constructor Detail

APPLEGLSharingback to summary
protected APPLEGLSharing()

Method Detail

clGetGLContextInfoAPPLEback to summary
public static int clGetGLContextInfoAPPLE(long context, long platform_gl_ctx, int param_name, ByteBuffer param_value, 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:long

the context being queried

platform_gl_ctx:long

the OpenGL context handle

param_name:int

a constant that specifies the GL context information to query. One of:

CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLE
CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLE
param_value:ByteBuffer

a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.

param_value_size_ret:PointerBuffer

the actual size in bytes of data being queried by param_value. If NULL, it is ignored.

Annotations
@NativeType:cl_int
clGetGLContextInfoAPPLEback to summary
public static int clGetGLContextInfoAPPLE(long context, long platform_gl_ctx, int param_name, PointerBuffer param_value, 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:long

the context being queried

platform_gl_ctx:long

the OpenGL context handle

param_name:int

a constant that specifies the GL context information to query. One of:

CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLE
CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLE
param_value:PointerBuffer

a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.

param_value_size_ret:PointerBuffer

the actual size in bytes of data being queried by param_value. If NULL, it is ignored.

Annotations
@NativeType:cl_int
nclGetGLContextInfoAPPLEback to summary
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:long

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.