Login  Register

Re: NEWT blinking on macOS when resizing

Posted by Sven Gothel on Jan 01, 2020; 7:11pm
URL: https://forum.jogamp.org/NEWT-blinking-on-macOS-when-resizing-tp4040200p4040224.html

On 1/1/20 6:20 PM, xor [via jogamp] wrote:
> Thanks for taking a look at this “bug”.
Send me a PM please so I can create a bugzilla account for you.

>
> I think the pausing while resizing is the best trade off giving current
> conditions.
>
> However there are two technical difficulties,
>
> yes we could define pointer press as resize begin, and pointer release as
> resize end, but currently there’s no way in NEWT’s event to know that.
NEWT does know when a resize event comes from the system,
i.e. triggered by the WindowImpl's sizeChanged(..) callback.
Here we could test whether a pointer is pressed and kick-off the
animation timer.
Subsequent sizeChanged(..) callbacks could then reset the timer.

>
> And, when VSync is on, it seems that when the first resize event arrives, the
> rendering context is still owned by the thread blocking on swap buffers, so
> even animation is paused afterwards, it will experience a short flickering
> during the first resize event.
Yes.