Some considerations
Marcelo E. Magallon
mmagallo@debian.org
Tue, 6 Jan 2004 14:27:36 -0600
On Tue, Jan 06, 2004 at 04:48:26PM +0100, Martijn Sipkema wrote:
> Well, I meant native X11 rendering. I think from the above definition
> using glFlush() to have the compositing manager update the
> framebuffer for single buffered GLX clients is correct
In theory yes, in practice... there are applications out there which do
calls to glFlush at the weirdest times. And others that don't even
bother.
> but I don't think there's an equivalent to glFlush() in the core X11
> rendering, is there?
From XFlush(3x)
The XFlush function flushes the output buffer. Most client applica-
tions need not use this function because the output buffer is automati-
cally flushed as needed by calls to XPending, XNextEvent, and XWindow-
Event. Events generated by the server may be enqueued into the
library's event queue.
The XSync function flushes the output buffer and then waits until all
requests have been received and processed by the X server. Any errors
generated must be handled by the error handler. For each protocol
error received by Xlib, XSync calls the client application's error han-
dling routine (see section 11.8.2). Any events generated by the server
are enqueued into the library's event queue.
Finally, if you passed False, XSync does not discard the events in the
queue. If you passed True, XSync discards all events in the queue,
including those events that were on the queue before XSync was called.
Client applications seldom need to call XSync.
--
Marcelo