Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

12046 Posts in 1593 Topics- by 596 Members - Latest Member: anntonioo

20. May 2013, 08:04:01 am
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)Windowed Frame / non-swing GpenGLLayers
Pages: [1]
Print
Author Topic: Windowed Frame / non-swing GpenGLLayers  (Read 433 times)
jeffhoye
developers
Enjoying the stay
***
Offline Offline

Posts: 32


View Profile Email
« on: 27. January 2012, 02:51:55 pm »

Is there a standard way to make modifications to the frame when running in windowed mode?  I've been using Canvas3DPanel, but I've been running into some thread safety / stability issues: While most calls on the xith3D render thread, some calls seem to be made on the Swing Render Thread.  I recall reading that Canvas3DPanel has worse performance than some other GpenGL Layers. 

Is there a standard way to manipulate the window that wraps the Canvas3D component?

I'd like to do the following:
Set the icon of the window (rather than the default lwjgl icon or the java icon in the case of jogl)
Make the "x" actually do something (such as close the window or end the program)
Make the window resizable (Canvas3D.setSize() works great, but isn't done through the standard way of dragging the window)

I tried calling canvas3D.getPeer().getWindow().  It is null for all the modes I tried other than JOGL_AWT. 

In JOGL_AWT, I can set the window as resizable, but it doesn't properly resize the canvas.  I can probably do some work to get this to work, but is there a more OpenGLLayer-independent way to do this?

Should I expect better performance using lwjgl than JOGL_AWT? 

Am I correct that Canvas3DPanel is often slower than other methods?

Is one OpenGLLayer more platform independent than others?  I'd like for this to work on Windows, Apple, Linux.

Thanks!
-Jeff
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #1 on: 27. January 2012, 05:05:20 pm »

You can use canvas.setSize() to set the canvas' and its Window's size. Use canvas.setIcon() to set the icon. Use addWindowClosingListener() to react on X-clicks. Specially notice the WindowClosingRenderLoopEnder implementation.

Dragging the Window's borders to resize the Window and canvas is not intended. You'd have to wrap a Canvas3DPanel as you did before.

For me LWJGL used tobe faster. But it seems to depend on the system. A few people reported better performace for JOGL_AWT.

You shouldn't see a difference in performance using JOGL_AWT or Canvas3DPanel. JOGL_AWT doesn't do anything else than wrapping the canvas with an AWT Frame.

I think, JOGL supports the most platforms. Though I haven't followed its developement in recent time, nor taht of LWJGL. But LWJGL always used to support these three platforms, that you mentioned.
Logged
Julien Gouesse
Enjoying the stay
*
Offline Offline

Posts: 29



View Profile WWW
« Reply #2 on: 22. February 2012, 04:10:35 pm »

For me LWJGL used tobe faster. But it seems to depend on the system. A few people reported better performace for JOGL_AWT.
LWJGL was faster than JOGL 1.1.1a on some machines, slower on others. However, JOGL 2.0 with NEWT is at least as fast as LWJGL.

I think, JOGL supports the most platforms. Though I haven't followed its developement in recent time, nor taht of LWJGL. But LWJGL always used to support these three platforms, that you mentioned.
JOGL 2.0 supports Windows, Mac OS X, Unix (Solaris, OpenIndiana), GNU Linux and Android. Its native windowing system works very well and allows to work around AWT bugs  Grin
Logged

http://tuer.sourceforge.net (first person shooter written in Java by Julien Gouesse)
http://gouessej.wordpress.com (personal blog)
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #3 on: 22. February 2012, 06:36:35 pm »

JOGL has a native windowing system? That's news to me. Don't we have to wrap it into an AWT Frame anymore?
Logged
Julien Gouesse
Enjoying the stay
*
Offline Offline

Posts: 29



View Profile WWW
« Reply #4 on: 23. February 2012, 12:15:52 pm »

JOGL has a native windowing system? That's news to me. Don't we have to wrap it into an AWT Frame anymore?
Lol JOGL has evolved a lot since 2007  Cheesy

Yes, you can directly use a GLWindow without any AWT frame which is very useful for Android as it has no AWT support.
Logged

http://tuer.sourceforge.net (first person shooter written in Java by Julien Gouesse)
http://gouessej.wordpress.com (personal blog)
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic