Graphics Reference
In-Depth Information
When a sync object is first created, its status is unsignaled. After the
specified condition is satisfied by the fence command, then its status
becomes signaled. Because sync objects cannot be reused, you must create
one sync object for each synchronization operation.
To delete a sync object, you can call the following function:
GLvoid glDeleteSync (GLsync sync )
specifies the sync object to be deleted
sync
The deletion operation does not occur immediately, as the sync object will
be deleted only when no other operation is waiting for it. Thus you can
call the glDeleteSync command right after waiting for the sync object,
which is described next.
Waiting for and Signaling a Sync Object
You can block the client and wait for a sync object to be signaled with the
following call:
GLenum glClientWaitSync (GLsync sync , GLbitfield flags ,
GLuint64 timeout )
specifies the sync object to wait on for its status
sync
specifies a bitfield controlling the command flushing
behavior; may be GL_SYNC_FLUSH_COMMANDS_BIT
flags
specifies the timeout in nanoseconds to wait for the sync
object to be signaled
timeout
If the sync object is already at a signaled state, the glClientWaitSync
command will return immediately. Otherwise, the call will block and wait
up to timeout nanoseconds for the sync object to be signaled.
 
 
 
Search WWH ::




Custom Search