Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi
I'm testing our 3D viewers with the new release version 2.4.0 on Windows 10 with OpenJDK 11 and I have an issue with the com.jogamp.opengl.awt.GLCanvas. The canvas now flickers when resized and sometimes nothing is displayed. This issue is related to the background erase which doesn't seem to be properly disabled now. It can be easily reproduced with the JOGLQuad example (https://jogamp.org/wiki/index.php/Rudimentary_standalone_example_using_the_fixed_pipeline_by_Julien_Gouesse) by removing the line "frame.setResizable(false);" and resizing the canvas. If you remove the animator startup, you will see that sometimes nothing is displayed. ![]() No issue with the com.jogamp.newt.awt.NewtCanvasAWT. I have not tested on Linux platforms yet. Before filing a bug report, I wanted to know if the use of the property "sun.awt.noerasebackground" is now recommended. For your information, you can see below the difference in calling the "disableBackgroundErase" method between 2.3.2 and 2.4.0 ![]() Thanks, Regards |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
In reply to this post by Celine
I'm sorry for the dumb question but are you sure that you didn't have the problem in JOGL 2.3.2? Have you tested JOGL 2.3.2 with exactly the same version of Java? sun.awt.noerasebackground was efficient in the past; now it doesn't always work as expected as far as I remember. I'll try to reproduce your problem under Windows 11 and GNU Linux. Thank you for the reproducer.
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
In reply to this post by Celine
Actually, I'm almost sure that it's not really a bug. When you don't use an animator, you have to call GLAutoDrawable.display().
Call GLAutoDrawable.display() when its container is ready to be displayed the very first time and use a ComponentListener to detect when the canvas is resized and call GLAutoDrawable.display()... or use an animator in order to let JOGL take care of calling GLAutoDrawable.display() for you. It depends on the level of control you need, both options make sense.
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Forget about the animator, just lauch the example after removing the line "frame.setResizable(false);", you will see a flickering when canvas is resized. I did the test on the same machine with the same JDK just switching between JOGL 2.3.2 and 2.4.0.
I did a test on Ubuntu 20.04 with the same OpenJDK 11, the flickering occurs with both 2.3.2 and 2.4.0. So it seems that it's a regression only on Windows platform. In all cases, setting the "sun.awt.noerasebackground" property solves this issue. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Thank you for your feedback. It's a good piece of news that sun.awt.noerasebackground still works, it's better than nothing. I'm going to give it a try under Mageia Linux with OpenJDK 17...
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Thank you both.
If its worth a bug-entry, go ahead. From the stack trace, yes we refactored - but seems like the same toolkit method is being called at roughly the same point. Right? In case we have a 'success matrix' what goes and what not, we can 'hardcode' it .. This would depend on the users as I prefer coding other things right now. Cheers |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Not really... With JOGL 2.3.2, the sun.awt.windows.WToolkit.disableBackgroundErase(Canvas) is called : @Override public void disableBackgroundErase(Canvas canvas) { WCanvasPeer peer = AWTAccessor.getComponentAccessor().getPeer(canvas); if (peer == null) { throw new IllegalStateException("Canvas must have a valid peer"); } peer.disableBackgroundErase(); } With JOGL 2.4.0, the sun.awt.SunToolkit.disableBackgroundErase(Component component) is called : public void disableBackgroundErase(Component component) { disableBackgroundEraseImpl(component); } private void disableBackgroundEraseImpl(Component component) { AWTAccessor.getComponentAccessor().setBackgroundEraseDisabled(component, true); } The regression on Windows platforms may be due to this change. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hello
I did more tests especially with OpenJDK 17. In summary, GLCanvas background flickers when canvas is resized : - on Windows with Java 11 and JOGL 2.4.0 (regression) - on Ubuntu with Java 11 and JOGL 2.3.2 or 2.4.0 - on Windows and Ubuntu with Java 17 and JOGL 2.3.2 or 2.4.0 Setting the "sun.awt.noerasebackground" property to true solves this issue in all cases. I filed a bug report with all the details here : https://jogamp.org/bugzilla/show_bug.cgi?id=1430. Let me know if you need more information. Thanks, Regards |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
EXCELLENT! Thank you .. I will use your findings, i.e. rewinding the change I did 'back then' if possible/working.
Or do you like to do it and let me merge your git patches? (preferably) |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I understand that you would prefer me to try to fix it, but that's not planned at the moment and I guess it won't be soon as there is a simple workaround, sorry.
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
OK, I will try to squeeze it in then.
Thank you for reporting your compatibility tests and analysis. |
Free forum by Nabble | Edit this page |