Bug 1361 - Remove Flickering when resizing a Newt Window
Summary: Remove Flickering when resizing a Newt Window
Alias: None
Product: Newt
Classification: JogAmp
Component: core (show other bugs)
Version: 3.0.0
Hardware: All all
: P4 normal
Assignee: Sven Gothel
Depends on:
Reported: 2019-01-30 16:01 CET by Charles Huet
Modified: 2023-07-12 01:57 CEST (History)
2 users (show)

See Also:
SCM Refs:
Workaround: ---

Reproducer for the flickering (2.20 KB, text/x-java)
2019-01-30 16:01 CET, Charles Huet
Reproducer with correct Animator (2.19 KB, text/x-java)
2019-02-01 15:30 CET, Charles Huet

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Huet 2019-01-30 16:01:44 CET
Created attachment 800 [details]
Reproducer for the flickering

When resizing, the whole rendering flickers at each resize (verified on Linux (GTX1070) and Windows (AMD WX7100) ). 

Attached is a simple reproducer.
Comment 1 Julien Gouesse 2019-02-01 13:58:23 CET
Your reproducer is wrong, please look at my example:

You shouldn't create the animator inside the GLEventListener and you don't even start your animator, it can't work.
Comment 2 Charles Huet 2019-02-01 15:30:06 CET
Created attachment 801 [details]
Reproducer with correct Animator
Comment 3 Charles Huet 2019-02-01 15:30:52 CET
Sorry, I commented it out to check the difference, and forgot to re-enable it before submitting, my bad.

I uploaded a new reproducer that creates the Animator in the main, and the problem is still reproduced.
Comment 4 Charles Huet 2019-03-07 11:26:58 CET

is the reproducer up to snuff now ?
Can I do anything else to help you reproduce this issue ?
Comment 5 Julien Gouesse 2019-03-07 12:39:29 CET
The reproducer seems to be correct now.

I've not investigated yet but maybe it can't be fixed within JOGL, especially if the root cause comes from AWT.

I assume that the problem doesn't occur when using a pure NEWT GLWindow without AWT.
Comment 6 Sven Gothel 2019-03-27 04:51:27 CET

This resize flickering is also visible (more or less) with 
- com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT
- com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT

Animator doesn't make a difference, nor v-sync.

Looks like our delayed off-thread resize operation creates this visual artifact
while in process, i.e. the blanking (clear buffer) is dominant.

Not sure whether I should spend time on this cosmetic..
Comment 7 Sven Gothel 2019-03-27 04:52:59 CET
Moving product to Newt, component core.
AWT (parent window) detail is unrelated here.
Comment 8 Sven Gothel 2019-04-04 16:01:28 CEST
Removing flickering is now a feature.
We have to see whether this can be done at all, 
considering our current delayed resize implementation 
and for which version.

Putting this on 2.5.0 for now.