JOGL Fullscreen & Excusive

Hello Forum,

is there any way (i’m sure there is) using jogl in an exclusive, fullscreen way like it’s uses by all other games around?

I’ve searched the topics, but did not found anything :frowning: .

I don’t speak english very good due to the lack of using it in Germany so much, sorry hehe. Corrections are welcomed.

Thanx,
Coax

How’s that? Is this the right way? Something’s wrong?

Haven’t used this with Jogl yet…


this.addWindowListener(this);
            this.setSize(CConfiguration.DResolution);
            this.setLocation(DCentre.width-(this.getSize().width/2), DCentre.height-(this.getSize().height/2));
                        
            if (CConfiguration.FULLSCREEN)
            {
                  GEEnvironment=GraphicsEnvironment.getLocalGraphicsEnvironment();
                  GDGraphicsDevice=GEEnvironment.getDefaultScreenDevice();
                  this.setUndecorated(true);
                  if( GDGraphicsDevice.isFullScreenSupported() )
                  {
                        System.out.println("FullScreenSupported :)");
                        GDGraphicsDevice.setFullScreenWindow(this);
                  } 
            }
            this.setVisible(true);
            GLCShow3D=GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); 
            GLCShow3D.addGLEventListener(this.RRenderDevice);

bye, Coax

To use the full screen exclusive mode you must use the method provided by Sun there:
http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html
With Java 1.4

Hope it helps

hey people,
when i have a jfc swing app with jogl and a MenuBar with a file Menu, the system menu pop ups under the file menu if you click on the MenuBar’s border line, in the area where the program icon left of title bar would be. MenuBar’s bottom border line by the way; you pretty much have to just a magnifier for this pixel hunt this bug. does anyone else has this problem? it occurs only in a JFrame undecorated, full screen mode and in windowed mode. i made a number of test cases of dynamically switching between exclusive mode and windowed mode, but i don’t remember if this happen also in a Frame. im using xp/sp1/jdk5/jogl 1.1 beta07 on a sony vaio tr3a.

regards,
AK

Make sure you draw popups and other swing widgets as heavy weight components (there’s a method in the component framework).

Hi,

heavyweight components always draw over lightweight components. Swing is lightweight, AWT is heavyweight. GLCanvas is heavyweight.

ciao torsten

Hi,

I have read the tutorial and as i am running my jogl stuff through an applet i got a security exception that makes me unable to run the full screen mode.

It is said i should grant the fullscreenExclusive permission…

The question is how to? :-[

If it need an applet to be signed (hope not) can someone knows a website where the way to sign an applet is explained simply because it has never been clear to me how to

yes, but you can force swing components to be heavyweight.

as for the problem, we had a similar problem and had to:

  1. create a root window for the entire application, which contains the glcanvas.
  2. make any subwindows (such as one containing the menu bar) jframes (decorated and undecorated), and give the root window as the parent component in the constructor of the jframes. this forces the root window to always be below the jframes, which means you menu bar will always be painted above the canvas.

hope it helps.

Greg.

I always just did .getPopupMenu().setLightWeightPopupEnabled(false);
on the JMenuBar and it works fine.

But the stuff that is covered by the heavy weight component on the GLCanvas is unnecessarily drawn, right?