jogl applications

I’m curious as to what sort of applications people have been able to build using jogl. Jogl forces one to use an awt canvas to do the rendering, so one must then also use all awt widgets or some swing widgets provided they are made not-lightweight. Do people find this limiting? Or have people found that it provides for most of their gui needs?

Sean

You don’t have to use solely heavyweight components, you just have to be careful of overlapping anything with the jogl canvas. Everything here is a Swing component and I don’t have any problems (although I do force pop-up menus to be heavyweight).

You’ll only really have problems if you’re using things like Swing splitter panes or internal frames.

Right. I wasn’t clear that I was talking about the overlap restriction when combining jogl and swing.

Hmmm…so it might not be as limiting as I thought. Thanks for the response.

Sean

I quite happily mix the hardware accelerated Canvas with Swing components. I tend not to use popup menus, but Swing JMenus from the surrounding JFrame that overlap the Canvas don’t appear to cause any problems. This used to cause problems when I used GL4Java, but with JOGL, things seem fine.

To see my application, which allows landscape models to be viewed in 3D, see http://www.landserf.org

Jo.

an other verry annoying thing is that glcanvas does not play well with gltabbedpane. I was not yet able to either use one glcanvas on various tabs nor creating a glcanvas for every tab. Well, if you create the tabs in the constructor, only the last created glcanvas will be displayed, but if you try to create the tabs dynamically, you’ll see your application crashing…
An other strange thing i’ve noticed was that it is not allowed to create a texture at any given time. It works well if you create the textures in any of the gleventlistener functions, but if you try to create a texture because of a user interaction (outisde the gleventlisterner functions) , you’ll get a lot of GL_INVALID_OPERATION errors. Needless to say that the texture will not be created. But thats an easy one to work around.
The splitpane troubles has already been mentioned.
By the way, Jo, you may try the following two lines in case some of the menues get overdrawn by the glcanvas:
JPopupMenu popup = new JPopupMenu();
popup.setDefaultLightWeightPopupEnabled(false);

To be honest, i do not consider jogl useful for (complex) gui apps (yet).
Just my 2 cents,
nop nop nop…

what I suggest you is to use an approach similar to GIMP ;D : a frame for Canvas, a frame for toolbar …

D.

[quote]what I suggest you is to use an approach similar to GIMP ;D : a frame for Canvas, a frame for toolbar …

D.
[/quote]
Thats an abomination, especially in window-managers where each separate window requires an extra click to gain focus. It means everything takes twice as much effort to achieve.

CAD Applications are not Games : if you have a VALID suggestion to mix together JTabbedPane, Docking Panels and Toolbars please give me an hand !!!

D.

Those are the only valid suggestions possible. Quite simply, given the way that Swing is constructed, it’s not possible to do what you want. Just as the other people have said - you’re going to have to change the way you’ve organised your screen layout.

It is possible to mix GLCanvas, JTabbedPane and Dockable Toolbars (also floating Toolbars), its just not as easy as it should be. But I’ve done it so it can’t be all that hard.

I’ve included a screen shot…
http://localhost/Screenshot.jpg

I did it in same way, too. What about DOCKING PANELS ? Where is your sceen shot ?

D.

Is it possible to use JOGL w/ a JScrollPane? I’m putting a GLCanvas inside of a JPanel, which is then inserted inside a JScrollPane. However, the GLCanvas is drawn on top of the scroll bars. Any easy way around this?

Sorry about the missing screenshot. Does any body know how to include an image in a postinf without a URL reference. An attachments of sorts?

John