Synchronizing graphics with Cacio
Ralf Spathelf
ralf.spathelf at aicas.de
Wed Apr 29 09:05:45 UTC 2015
Hi Mario and Roman,
Thanks for your fast replies!
Yes, it's really tricky. We'll do some more experiments and keep you up to date (if we'll find a good solution).
Note: There are some more changes we've done to Cacio in the past that we want to contribute.
But I think we will post the patches after we've updated to Java 8, then it will be easier to integrate.
Cheers,
Ralf
On 04/22/2015 05:58 PM, Mario Torre wrote:
> 2015-04-22 17:47 GMT+02:00 Roman Kennke <roman at kennke.org>:
> > Hi Ralf,
> >
> > Nice to hear from you :-)
> >
> > Flushing queues is a tricky thing. I don't think that PaintEvents are
> > handled in Cacio, because it comes from Java, not from the backend.
> > handleEvent() only bubbles up events from the backend.
> >
> > Even worse, not all painting comes from PainEvents. It is possible to
> > get a Graphics, and do some rendering directly.
> >
> > A safe (but slow) approach would be to flush after each primitive.
> > What you probably want is to flush after each 'paint job' which is what
> > your event would do. I believe this is only possible using some smart
> > heuristic, like 'flush after N primitives OR after a certain timeout
> > after the last paint primitive'. But this is not trivial.
>
> Thinking about that, syncing with the refresh cycle (or a multiple of
> it) may be the best way to flush the OpenGL queue, especially if your
> Surface data is a texture.
>
> Cheers,
> Mario
>
More information about the caciocavallo-dev
mailing list