Synchronizing graphics with Cacio
Roman Kennke
roman at kennke.org
Wed Apr 22 15:47:08 UTC 2015
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.
I hope this helps.
Best regards,
Roman
Am Mittwoch, den 22.04.2015, 17:11 +0200 schrieb Ralf Spathelf:
> Hi guys,
>
> We are experimenting with implementing an OpenGL port using Caciocavallo. The OpenGL render queue has to be flushed after repainting, we do this in Toolkit.sync().
>
> Do you have an idea where this could be called in the Cacio code? We tried to do this after a PaintEvent in CacioComponentPeer.handleEvent() but this did not work.
>
> Regards,
> Ralf
>
>
More information about the caciocavallo-dev
mailing list