13 #ifndef OGLPLUS_SYNC_1107121519_HPP
14 #define OGLPLUS_SYNC_1107121519_HPP
38 #include <oglplus/enums/sync_condition.ipp>
41 #if !OGLPLUS_NO_ENUM_VALUE_NAMES
42 #include <oglplus/enums/sync_condition_names.ipp>
45 #if !OGLPLUS_ENUM_VALUE_RANGES
46 #include <oglplus/enums/sync_condition_range.ipp>
57 #include <oglplus/enums/sync_type.ipp>
60 #if !OGLPLUS_NO_ENUM_VALUE_NAMES
61 #include <oglplus/enums/sync_type_names.ipp>
64 #if !OGLPLUS_ENUM_VALUE_RANGES
65 #include <oglplus/enums/sync_type_range.ipp>
76 #include <oglplus/enums/sync_status.ipp>
79 #if !OGLPLUS_NO_ENUM_VALUE_NAMES
80 #include <oglplus/enums/sync_status_names.ipp>
83 #if !OGLPLUS_ENUM_VALUE_RANGES
84 #include <oglplus/enums/sync_status_range.ipp>
94 #include <oglplus/enums/sync_wait_result.ipp>
97 #if !OGLPLUS_NO_ENUM_VALUE_NAMES
98 #include <oglplus/enums/sync_wait_result_names.ipp>
101 #if !OGLPLUS_ENUM_VALUE_RANGES
102 #include <oglplus/enums/sync_wait_result_range.ipp>
105 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_2 || GL_ARB_sync
142 : _sync(OGLPLUS_GLFUNC(FenceSync)(GLenum(condition), 0))
144 OGLPLUS_CHECK_SIMPLE(FenceSync);
147 #if !OGLPLUS_NO_DELETED_FUNCTIONS
164 if(_sync != 0) OGLPLUS_GLFUNC(DeleteSync)(_sync);
177 OGLPLUS_GLFUNC(GetSynciv)(
184 return result == GL_SIGNALED;
196 OGLPLUS_GLFUNC(GetSynciv)(
215 OGLPLUS_GLFUNC(GetSynciv)(
234 OGLPLUS_GLFUNC(GetSynciv)(
251 GLenum result = OGLPLUS_GLFUNC(ClientWaitSync)(
256 OGLPLUS_VERIFY_SIMPLE(ClientWaitSync);
265 void Wait(GLuint64 timeout = GL_TIMEOUT_IGNORED)
const
267 OGLPLUS_GLFUNC(WaitSync)(_sync, 0, timeout);
268 OGLPLUS_VERIFY_SIMPLE(WaitSync);
276 #endif // include guard
bool Signaled(void) const
Returns true if this Sync object is in signaled status.
Definition: sync.hpp:174
Encapsulates sync object and fence functionality.
Definition: sync.hpp:112
SyncType Type
Synchronization object type.
Definition: sync.hpp:124
SyncType Type(void) const
Returns the type of this Sync object.
Definition: sync.hpp:193
SyncWaitResult
The wait result enumeration.
Definition: sync.hpp:93
SyncStatus Status(void) const
Returns the status of this Sync object.
Definition: sync.hpp:231
SyncWaitResult WaitResult
Synchronization wait result.
Definition: sync.hpp:130
Enumeration-related declarations.
SyncStatus
The synchronization object status enumeration.
Definition: sync.hpp:75
SyncWaitResult ClientWait(GLuint64 timeout) const
Wait for the condition to be satisfied.
Definition: sync.hpp:249
SyncCondition Condition
The synchronization condition.
Definition: sync.hpp:121
SyncCondition
The synchronization condition enumeration.
Definition: sync.hpp:37
Types related to Sync.
Definition: sync.hpp:118
SyncType
The synchronization object type enumeration.
Definition: sync.hpp:56
Sync(SyncCondition condition=SyncCondition::GPUCommandsComplete)
Creates a new sync object for the specified condition.
Definition: sync.hpp:141
Helper macro for optional checking of availability of GL function.
SyncCondition Condition(void) const
Returns the condition of this Sync object.
Definition: sync.hpp:212
Declaration of basic OGLplus' exceptions.
SYNC_GPU_COMMANDS_COMPLETE.
SyncStatus Status
Synchronization object status.
Definition: sync.hpp:127
Sync(Sync &&temp)
Sync objects are moveable.
Definition: sync.hpp:156
void Wait(GLuint64 timeout=GL_TIMEOUT_IGNORED) const
Wait for the condition to be satisfied.
Definition: sync.hpp:265