This extension introduces the concept of "sync objects". Sync objects are a synchronization primitive - a representation of events whose completion status can be tested or waited upon. One specific type of sync object, the "fence sync object", is supported in this extension, and additional types can easily be added in the future.
Fence sync objects have corresponding fences, which are inserted into the OpenGL command stream at the time the sync object is created. A sync object can be queried for a given condition. The only condition supported for fence sync objects is completion of the corresponding fence command. Fence completion allows applications to request a partial Finish, wherein all commands prior to the fence will be forced to complete before control is returned to the calling process.
These new mechanisms allow for synchronization between the host CPU and the GPU, which may be accessing the same resources (typically memory), as well as between multiple GL contexts bound to multiple threads in the host CPU.
Requires OpenGL 3.. Promoted to core in OpenGL 3..
| Modifier and Type | Field and Description |
|---|---|
| public static final int | GL_ALREADY_SIGNALED
Returned by ClientWaitSync. |
| public static final int | GL_CONDITION_SATISFIED
Returned by ClientWaitSync. |
| public static final int | GL_MAX_SERVER_WAIT_TIMEOUT
Accepted as the |
| public static final int | GL_OBJECT_TYPE
Accepted as the |
| public static final int | GL_SIGNALED
Returned in |
| public static final int | GL_SYNC_CONDITION
Accepted as the |
| public static final int | GL_SYNC_FENCE
Returned in |
| public static final int | GL_SYNC_FLAGS
Accepted as the |
| public static final int | GL_SYNC_FLUSH_COMMANDS_BIT
Accepted in the |
| public static final int | GL_SYNC_GPU_COMMANDS_COMPLETE
Returned in |
| public static final int | GL_SYNC_STATUS
Accepted as the |
| public static final int | GL_TIMEOUT_EXPIRED
Returned by ClientWaitSync. |
| public static final long | GL_TIMEOUT_IGNORED
Accepted in the |
| public static final int | GL_UNSIGNALED
Returned in |
| public static final int | GL_WAIT_FAILED
Returned by ClientWaitSync. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description | ||||
|---|---|---|---|---|---|
| public static int | glClientWaitSync(long
the sync object whose status to wait on sync, int a bitfield controlling the command flushing behavior. One or more of: flags, long
the timeout, specified in nanoseconds, for which the implementation should wait for timeout)sync to become signaledCauses the client to block and wait for a sync object to become signaled. | ||||
| public static void | |||||
| public static long | glFenceSync(int
the condition that must be met to set the sync object's state to signaled. Must be: condition, int
a bitwise combination of flags controlling the behavior of the sync object. No flags are presently defined for this operation and flags)flags must
be zero.Creates a new sync object and inserts it into the GL command stream. | ||||
| public static long | glGetInteger64(int
the parameter value to be returned pname)Returns the 64bit integer value or values of a selected parameter. | ||||
| public static void | glGetInteger64v(int
the parameter value to be returned pname, LongBuffer the value or values of the specified parameter params)Returns the 64bit integer value or values of a selected parameter. | ||||
| public static void | |||||
| public static int | glGetSynci(long
the sync object whose properties to query sync, int the parameter whose value to retrieve from the sync object specified in pname, IntBuffer sync. One of:
the address of an variable to receive the number of integers placed in length)valuesQueries the properties of a sync object. | ||||
| public static void | glGetSynciv(long
the sync object whose properties to query sync, int the parameter whose value to retrieve from the sync object specified in pname, IntBuffer sync. One of:
the address of an variable to receive the number of integers placed in length, IntBuffer valuesthe address of an array to receive the values of the queried parameter values)Queries the properties of a sync object. | ||||
| public static void | |||||
| public static boolean | glIsSync(long
a value that may be the name of a sync object sync)Determines if a name corresponds to a sync object. | ||||
| public static void | glWaitSync(long
the sync object whose status to wait on sync, int a bitfield controlling the command flushing behavior. Must be: flags, long
the timeout that the server should wait before continuing. Must be: timeout)
Causes the GL server to block and wait for a sync object to become signaled. | ||||
| public static int | |||||
| public static void | |||||
| public static void | |||||
| public static void | nglGetSynciv(long sync, int pname, int
the size of the buffer whose address is given in bufSize, long length, long values)valuesUnsafe version of: | ||||
| public static boolean | |||||
| public static void |
| GL_ALREADY_SIGNALED | back to summary |
|---|---|
| public static final int GL_ALREADY_SIGNALED Returned by ClientWaitSync. | |
| GL_CONDITION_SATISFIED | back to summary |
|---|---|
| public static final int GL_CONDITION_SATISFIED Returned by ClientWaitSync. | |
| GL_MAX_SERVER_WAIT_TIMEOUT | back to summary |
|---|---|
| public static final int GL_MAX_SERVER_WAIT_TIMEOUT Accepted as the | |
| GL_OBJECT_TYPE | back to summary |
|---|---|
| public static final int GL_OBJECT_TYPE Accepted as the | |
| GL_SIGNALED | back to summary |
|---|---|
| public static final int GL_SIGNALED Returned in | |
| GL_SYNC_CONDITION | back to summary |
|---|---|
| public static final int GL_SYNC_CONDITION Accepted as the | |
| GL_SYNC_FENCE | back to summary |
|---|---|
| public static final int GL_SYNC_FENCE Returned in | |
| GL_SYNC_FLAGS | back to summary |
|---|---|
| public static final int GL_SYNC_FLAGS Accepted as the | |
| GL_SYNC_FLUSH_COMMANDS_BIT | back to summary |
|---|---|
| public static final int GL_SYNC_FLUSH_COMMANDS_BIT Accepted in the | |
| GL_SYNC_GPU_COMMANDS_COMPLETE | back to summary |
|---|---|
| public static final int GL_SYNC_GPU_COMMANDS_COMPLETE Returned in | |
| GL_SYNC_STATUS | back to summary |
|---|---|
| public static final int GL_SYNC_STATUS Accepted as the | |
| GL_TIMEOUT_EXPIRED | back to summary |
|---|---|
| public static final int GL_TIMEOUT_EXPIRED Returned by ClientWaitSync. | |
| GL_TIMEOUT_IGNORED | back to summary |
|---|---|
| public static final long GL_TIMEOUT_IGNORED Accepted in the | |
| GL_UNSIGNALED | back to summary |
|---|---|
| public static final int GL_UNSIGNALED Returned in | |
| GL_WAIT_FAILED | back to summary |
|---|---|
| public static final int GL_WAIT_FAILED Returned by ClientWaitSync. | |
| ARBSync | back to summary |
|---|---|
| protected ARBSync() | |
| glClientWaitSync | back to summary | ||
|---|---|---|---|
| public static int glClientWaitSync(long sync, int flags, long timeout) Causes the client to block and wait for a sync object to become signaled. If The return value is one of four status values:
| |||
| glDeleteSync | back to summary |
|---|---|
| public static void glDeleteSync(long sync) Deletes a sync object.
| |
| glFenceSync | back to summary | |
|---|---|---|
| public static long glFenceSync(int condition, int flags) Creates a new sync object and inserts it into the GL command stream.
| ||
| glGetInteger64 | back to summary |
|---|---|
| public static long glGetInteger64(int pname) Returns the 64bit integer value or values of a selected parameter.
| |
| glGetInteger64v | back to summary |
|---|---|
| public static void glGetInteger64v(int pname, LongBuffer params) Returns the 64bit integer value or values of a selected parameter.
| |
| glGetInteger64v | back to summary |
|---|---|
| public static void glGetInteger64v(int pname, long[] params) Array version of: | |
| glGetSynci | back to summary | ||||
|---|---|---|---|---|---|
| public static int glGetSynci(long sync, int pname, IntBuffer length) Queries the properties of a sync object.
| |||||
| glGetSynciv | back to summary | ||||
|---|---|---|---|---|---|
| public static void glGetSynciv(long sync, int pname, IntBuffer length, IntBuffer values) Queries the properties of a sync object.
| |||||
| glGetSynciv | back to summary |
|---|---|
| public static void glGetSynciv(long sync, int pname, int[] length, int[] values) Array version of: | |
| glIsSync | back to summary |
|---|---|
| public static boolean glIsSync(long sync) Determines if a name corresponds to a sync object.
| |
| glWaitSync | back to summary | ||
|---|---|---|---|
| public static void glWaitSync(long sync, int flags, long timeout) Causes the GL server to block and wait for a sync object to become signaled.
If an error occurs,
| |||
| nglClientWaitSync | back to summary |
|---|---|
| public static int nglClientWaitSync(long sync, int flags, long timeout) Unsafe version of: | |
| nglDeleteSync | back to summary |
|---|---|
| public static void nglDeleteSync(long sync) Unsafe version of: | |
| nglGetInteger64v | back to summary |
|---|---|
| public static void nglGetInteger64v(int pname, long params) Unsafe version of: | |
| nglGetSynciv | back to summary |
|---|---|
| public static void nglGetSynciv(long sync, int pname, int bufSize, long length, long values) Unsafe version of:
| |
| nglIsSync | back to summary |
|---|---|
| public static boolean nglIsSync(long sync) Unsafe version of: | |
| nglWaitSync | back to summary |
|---|---|
| public static void nglWaitSync(long sync, int flags, long timeout) Unsafe version of: | |