![]() |
![]() |
![]() |
Cogl 2.0 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
GPU synchronisation fencesGPU synchronisation fences — Functions for notification of command completion |
CoglFence; void (*CoglFenceCallback) (CoglFence *fence
,void *user_data
); CoglFenceClosure; void * cogl_fence_closure_get_user_data (CoglFenceClosure *closure
); CoglFenceClosure * cogl_framebuffer_add_fence_callback (CoglFramebuffer *framebuffer
,CoglFenceCallback callback
,void *user_data
); void cogl_framebuffer_cancel_fence_callback (CoglFramebuffer *framebuffer
,CoglFenceClosure *closure
);
Cogl allows notification of GPU command completion; users may mark points in the GPU command stream and receive notification when the GPU has executed to that point.
typedef struct _CoglFence CoglFence;
An opaque object representing a fence. This type is currently unused but in the future may be used to pass extra information about the fence completion.
Since 2.0
Stability Level: Unstable
void (*CoglFenceCallback) (CoglFence *fence
,void *user_data
);
The callback prototype used with
cogl_framebuffer_add_fence_callback()
for notification of GPU
command completion.
|
Unused. In the future this parameter may be used to pass extra information about the fence completion but for now it should be ignored. |
|
The private data passed to cogl_framebuffer_add_fence_callback()
|
Since 2.0
Stability Level: Unstable
typedef struct _CoglFenceClosure CoglFenceClosure;
An opaque type representing one future callback to be made when the GPU command stream has passed a certain point.
Since 2.0
Stability Level: Unstable
void * cogl_fence_closure_get_user_data (CoglFenceClosure *closure
);
CoglFenceClosure * cogl_framebuffer_add_fence_callback (CoglFramebuffer *framebuffer
,CoglFenceCallback callback
,void *user_data
);
Calls the provided callback when all previously-submitted commands have been executed by the GPU.
|
The CoglFramebuffer the commands have been submitted to |
|
A CoglFenceCallback to be called when all commands submitted to Cogl have been executed. [scope notified] |
|
Private data that will be passed to the callback. [closure] |
Returns : |
non-NULL if the fence succeeded, or NULL if it was unable to
be inserted and the callback will never be called. The user does not
need to free the closure; it will be freed automatically when the
callback is called, or cancelled. |
Since 2.0
Stability Level: Unstable
void cogl_framebuffer_cancel_fence_callback (CoglFramebuffer *framebuffer
,CoglFenceClosure *closure
);
Removes a fence previously submitted with
cogl_framebuffer_add_fence_callback()
; the callback will not be
called.
|
The CoglFramebuffer the commands were submitted to |
|
The CoglFenceClosure returned from
cogl_framebuffer_add_fence_callback()
|
Since 2.0
Stability Level: Unstable