GLAPI/glDeleteSync: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
m (Renaming category: 'API Reference 4' to 'Core API Reference'.)
m (Bot: Adding better formatting.)
 
(3 intermediate revisions by the same user not shown)
Line 9: Line 9:
== Function Definition ==
== Function Definition ==


   void '''glDeleteSync'''(GLsync ''sync'');
   void '''glDeleteSync'''(GLsync {{param|sync}});


; sync
; sync
Line 16: Line 16:
== Description ==
== Description ==


'''glDeleteSync''' deletes the sync object specified by ''sync''. If the fence command corresponding to the specified sync object has completed, or if no [[GLAPI/glWaitSync|glWaitSync]] or [[GLAPI/glClientWaitSync|glClientWaitSync]] commands are blocking on ''sync'', the object is deleted immediately. Otherwise, ''sync'' is flagged for deletion and will be deleted when it is no longer associated with any fence command and is no longer blocking any [[GLAPI/glWaitSync|glWaitSync]] or [[GLAPI/glClientWaitSync|glClientWaitSync]] command. In either case, after '''glDeleteSync''' returns, the name ''sync'' is invalid and can no longer be used to refer to the sync object.
'''glDeleteSync''' deletes the sync object specified by {{param|sync}}. If the fence command corresponding to the specified sync object has completed, or if no {{apifunc|glWaitSync}} or {{apifunc|glClientWaitSync}} commands are blocking on {{param|sync}}, the object is deleted immediately. Otherwise, {{param|sync}} is flagged for deletion and will be deleted when it is no longer associated with any fence command and is no longer blocking any {{apifunc|glWaitSync}} or {{apifunc|glClientWaitSync}} command. In either case, after '''glDeleteSync''' returns, the name {{param|sync}} is invalid and can no longer be used to refer to the sync object.


'''glDeleteSync''' will silently ignore a ''sync'' value of zero.
'''glDeleteSync''' will silently ignore a {{param|sync}} value of zero.


== Notes ==
== Notes ==
Line 26: Line 26:
== Errors ==
== Errors ==


{{code|GL_INVALID_VALUE}} is generated if ''sync'' is neither zero or the name of a sync object.
{{enum|GL_INVALID_VALUE}} is generated if {{param|sync}} is neither zero or the name of a sync object.


== See Also ==
== See Also ==


[[GLAPI/glFenceSync|glFenceSync]], [[GLAPI/glWaitSync|glWaitSync]], [[GLAPI/glClientWaitSync|glClientWaitSync]]
{{apifunc|glFenceSync}}, {{apifunc|glIsSync}}


== Copyright ==
== Copyright ==
Line 36: Line 36:
Copyright © 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. [http://opencontent.org/openpub/ http://opencontent.org/openpub/].
Copyright © 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. [http://opencontent.org/openpub/ http://opencontent.org/openpub/].


[[Category:GL 4 API Synchronization|DeleteSync]]
[[Category:Core API Reference|DeleteSync]]
[[Category:Core API Reference|DeleteSync]]
[[Category:Core API Ref Synchronization|DeleteSync]]

Latest revision as of 19:33, 27 September 2012

glDeleteSync
Core in version 4.6
Core since version 3.2
Core ARB extension ARB_sync

glDeleteSync: delete a sync object

Function Definition

 void glDeleteSync(GLsync sync​);
sync
The sync object to be deleted.

Description

glDeleteSync deletes the sync object specified by sync​. If the fence command corresponding to the specified sync object has completed, or if no glWaitSync or glClientWaitSync commands are blocking on sync​, the object is deleted immediately. Otherwise, sync​ is flagged for deletion and will be deleted when it is no longer associated with any fence command and is no longer blocking any glWaitSync or glClientWaitSync command. In either case, after glDeleteSync returns, the name sync​ is invalid and can no longer be used to refer to the sync object.

glDeleteSync will silently ignore a sync​ value of zero.

Notes

glSync is only supported if the GL version is 3.2 or greater, or if the ARB_sync extension is supported.

Errors

GL_INVALID_VALUE is generated if sync​ is neither zero or the name of a sync object.

See Also

glFenceSync, glIsSync

Copyright

Copyright © 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.