Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Full Screen Swing with JOGL

I am trying to make a Swing application which renders in full screen, following the description here http://download.oracle.com/javase/tutorial/extra/fullscreen/exclusivemode.html and the source code here http://download.oracle.com/javase/tutorial/extra/fullscreen/example-1dot4/DisplayModeTest.java

This works quite well, however as soon as I drop in a GLCanvas object as one of the components of the frame, all that shows up is a black screen. Exiting full screen, I can see the OpenGL image for a moment at full screen, then it shows up fine again in a window. Even though nothing is being displayed, I can interact with the swing components, like buttons, as if they were.

It seems to me almost like another blank buffer is being drawn above the actual swing app, but I can't figure out why that would be. Alternatively, I wonder if it's not an issue with the full screen being handled by the graphics card which is also handling JOGL?

I don't need the hardware accelerated full screen, though it might be nice - if this is unresolvable, is there some more robust way to implement full screen in a Java app?

like image 954
dimo414 Avatar asked Nov 22 '10 11:11

dimo414


1 Answers

Try disabling -Dsun.java2d.noddraw=true as this FAQ says.

like image 161
dacwe Avatar answered Oct 12 '22 12:10

dacwe