Top Description Fields Constructors Methods
org.lwjgl.opengl

pack-priv final Class CallbackUtil

extends Object
Class Inheritance
Imports
java.util.HashMap, .Map

Utility class that handles OpenGL API callbacks.
Author
Spasi

Field Summary

Modifier and TypeField and Description
private static final Map<ContextCapabilities, Long>
contextUserParamsAMD

Context -> Long

private static final Map<ContextCapabilities, Long>
contextUserParamsARB

Context -> Long

private static final Map<ContextCapabilities, Long>
contextUserParamsKHR

Context -> Long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static long

Returns:

the GlobalRef memory address or 0 if the Object is null.
createGlobalRef
(final Object
the Object
obj
)

Creates a new global reference to the specified Object.

private static native void
deleteGlobalRef(long
the GlobalRef memory address.
ref
)

Deletes a global reference.

pack-priv static native long

Returns:

the callback function address
getDebugCallbackKHR
()

Returns the memory address of the native function we pass to glDebugMessageCallback.

pack-priv static native long

Returns:

the callback function address
getDebugOutputCallbackAMD
()

Returns the memory address of the native function we pass to glDebugMessageCallbackAMD.

pack-priv static native long

Returns:

the callback function address
getDebugOutputCallbackARB
()

Returns the memory address of the native function we pass to glDebugMessageCallbackARB.

private static native long

Returns:

the GlobalRef memory address.
ncreateGlobalRef
(Object
the Object
obj
)

Creates a new global reference to the specified Object.

private static void
registerContextCallback(final long
the global reference pointer
userParam
,
final Map<ContextCapabilities, Long> contextUserData)

Associates the current OpenGL context with the specified global reference.

pack-priv static void
registerContextCallbackAMD(final long
the global reference pointer
userParam
)

Associates the current OpenGL context with the specified global reference.

pack-priv static void
registerContextCallbackARB(final long
the global reference pointer
userParam
)

Associates the current OpenGL context with the specified global reference.

pack-priv static void
registerContextCallbackKHR(final long
the global reference pointer
userParam
)

Associates the current OpenGL context with the specified global reference.

pack-priv static void
unregisterCallbacks(final Object
the Context to unregister
context
)

Releases references to any callbacks associated with the specified GL context.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextUserParamsAMDback to summary
private static final Map<ContextCapabilities, Long> contextUserParamsAMD

Context -> Long

contextUserParamsARBback to summary
private static final Map<ContextCapabilities, Long> contextUserParamsARB

Context -> Long

contextUserParamsKHRback to summary
private static final Map<ContextCapabilities, Long> contextUserParamsKHR

Context -> Long

Constructor Detail

CallbackUtilback to summary
private CallbackUtil()

Method Detail

createGlobalRefback to summary
pack-priv static long createGlobalRef(final Object obj)

Creates a new global reference to the specified Object.

Parameters
obj:Object

the Object

Returns:long

the GlobalRef memory address or 0 if the Object is null.

deleteGlobalRefback to summary
private static native void deleteGlobalRef(long ref)

Deletes a global reference.

Parameters
ref:long

the GlobalRef memory address.

getDebugCallbackKHRback to summary
pack-priv static native long getDebugCallbackKHR()

Returns the memory address of the native function we pass to glDebugMessageCallback.

Returns:long

the callback function address

getDebugOutputCallbackAMDback to summary
pack-priv static native long getDebugOutputCallbackAMD()

Returns the memory address of the native function we pass to glDebugMessageCallbackAMD.

Returns:long

the callback function address

getDebugOutputCallbackARBback to summary
pack-priv static native long getDebugOutputCallbackARB()

Returns the memory address of the native function we pass to glDebugMessageCallbackARB.

Returns:long

the callback function address

ncreateGlobalRefback to summary
private static native long ncreateGlobalRef(Object obj)

Creates a new global reference to the specified Object.

Parameters
obj:Object

the Object

Returns:long

the GlobalRef memory address.

registerContextCallbackback to summary
private static void registerContextCallback(final long userParam, final Map<ContextCapabilities, Long> contextUserData)

Associates the current OpenGL context with the specified global reference. If there is no context current, the global reference is deleted and an exception is thrown. Any previous callback registrations will be cleared.

Parameters
userParam:long

the global reference pointer

registerContextCallbackAMDback to summary
pack-priv static void registerContextCallbackAMD(final long userParam)

Associates the current OpenGL context with the specified global reference. If there is no context current, the global reference is deleted and an exception is thrown. Any previous callback registrations will be cleared.

Parameters
userParam:long

the global reference pointer

registerContextCallbackARBback to summary
pack-priv static void registerContextCallbackARB(final long userParam)

Associates the current OpenGL context with the specified global reference. If there is no context current, the global reference is deleted and an exception is thrown. Any previous callback registrations will be cleared.

Parameters
userParam:long

the global reference pointer

registerContextCallbackKHRback to summary
pack-priv static void registerContextCallbackKHR(final long userParam)

Associates the current OpenGL context with the specified global reference. If there is no context current, the global reference is deleted and an exception is thrown. Any previous callback registrations will be cleared.

Parameters
userParam:long

the global reference pointer

unregisterCallbacksback to summary
pack-priv static void unregisterCallbacks(final Object context)

Releases references to any callbacks associated with the specified GL context.

Parameters
context:Object

the Context to unregister