Bug 542915 - Resizing GLCanvas does not redraw immediately
Summary: Resizing GLCanvas does not redraw immediately
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-12-19 09:17 EST by Charles Huet CLA
Modified: 2019-09-23 09:26 EDT (History)
4 users (show)

See Also:


Attachments
Bug reproducer (1.82 KB, text/x-java)
2018-12-19 09:17 EST, Charles Huet CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Huet CLA 2018-12-19 09:17:52 EST
Created attachment 276961 [details]
Bug reproducer

Using the attached reproducer, make the window fullscreen by clicking the window decoration fullscreen button.

Only a portion of the fullscreen window is drawn in orange, while the whole window should be drawn orange.
This can also be reproduced by resizing the window very fast, a small portion of the window is not drawn with the correct color.

This bug does not happen on windows.

Adding a call to redraw() in display() works around the issue.

My guess is that only the previous size of the window is marked as dirty and redrawn by SWT.
Comment 1 Morgan Mathiaut CLA 2019-03-05 02:59:41 EST
Hi,

I have the same bug. Do you have any workaround or fix ?

Regards
Comment 2 Morgan Mathiaut CLA 2019-03-05 02:59:55 EST
Hi,

I have the same bug. Do you have any workaround or fix ?

Regards
Comment 3 Philippe Laval CLA 2019-09-06 08:23:10 EDT
Hello,

Any news about this issue ? Please, could you help us with a fix.

Thank you.
Comment 4 Eric Williams CLA 2019-09-06 09:07:03 EDT
What needs to be imported in order to run the snippet? I'm having trouble getting it to run.
Comment 5 Paul Pazderski CLA 2019-09-06 09:19:11 EDT
(In reply to Eric Williams from comment #4)
> I'm having trouble getting it to run.

Me too. But atm more from bug 529151 given me following exception for the snippet
Exception in thread "main" java.lang.ExceptionInInitializerError
	at com.jogamp.opengl.swt.GLCanvas.<init>(GLCanvas.java:321)
	at OpenGLTest.<init>(OpenGLTest.java:35)
	at OpenGLTest.main(OpenGLTest.java:24)
Caused by: javax.media.nativewindow.NativeWindowException: java.lang.NoSuchFieldException: GTK_VERSION
	at com.jogamp.nativewindow.swt.SWTAccessor.<clinit>(SWTAccessor.java:202)
	... 3 more
Caused by: java.lang.NoSuchFieldException: GTK_VERSION
	at java.lang.Class.getField(Class.java:1703)
	at com.jogamp.nativewindow.swt.SWTAccessor.<clinit>(SWTAccessor.java:182)
	... 3 more
Comment 6 Eric Williams CLA 2019-09-06 09:26:16 EDT
(In reply to Paul Pazderski from comment #5)
> (In reply to Eric Williams from comment #4)
> > I'm having trouble getting it to run.
> 
> Me too. But atm more from bug 529151 given me following exception for the
> snippet
> Exception in thread "main" java.lang.ExceptionInInitializerError
> 	at com.jogamp.opengl.swt.GLCanvas.<init>(GLCanvas.java:321)
> 	at OpenGLTest.<init>(OpenGLTest.java:35)
> 	at OpenGLTest.main(OpenGLTest.java:24)
> Caused by: javax.media.nativewindow.NativeWindowException:
> java.lang.NoSuchFieldException: GTK_VERSION
> 	at com.jogamp.nativewindow.swt.SWTAccessor.<clinit>(SWTAccessor.java:202)
> 	... 3 more
> Caused by: java.lang.NoSuchFieldException: GTK_VERSION
> 	at java.lang.Class.getField(Class.java:1703)
> 	at com.jogamp.nativewindow.swt.SWTAccessor.<clinit>(SWTAccessor.java:182)
> 	... 3 more

Which GLCanvas class is that? GLCanvas.java in SWT doesn't have a line 321.
Comment 7 Paul Pazderski CLA 2019-09-06 09:51:12 EDT
com.jogamp.opengl.swt.GLCanvas as used in the snippet.
Comment 8 Eric Williams CLA 2019-09-06 14:07:01 EDT
(In reply to Paul Pazderski from comment #7)
> com.jogamp.opengl.swt.GLCanvas as used in the snippet.

This isn't from SWT, sounds like an issue with the JogAmp library.
Comment 9 Morgan Mathiaut CLA 2019-09-17 05:08:18 EDT
Hi,

Can I help in something ?

Thanks
Comment 10 Eric Williams CLA 2019-09-17 08:30:05 EDT
(In reply to Morgan Mathiaut from comment #9)
> Hi,
> 
> Can I help in something ?
> 
> Thanks

Can provide a snippet that reproduces the issue using only SWT? The snippet from OP has other libraries in it and I can't get it to run.
Comment 11 Morgan Mathiaut CLA 2019-09-23 06:17:56 EDT
Hi,

Sorry but we wan't reproduce the issue without JOGL.
To run the snippet you need to import JOGL-all.jar and gluegen-rt.jar.

Regards
Comment 12 Eric Williams CLA 2019-09-23 09:26:39 EDT
(In reply to Morgan Mathiaut from comment #11)
> Hi,
> 
> Sorry but we wan't reproduce the issue without JOGL.
> To run the snippet you need to import JOGL-all.jar and gluegen-rt.jar.
> 
> Regards

If the issue does not reproduce using only SWT, then the bug is likely somewhere in JOGL and not SWT. Some cursory research tells me that JOGL is using its own SWT Canvas/GLCanvas implementation, and the bug lies somewhere in there.