From: John O. <Jo...@md...> - 2000-04-26 20:12:50
|
Hi, I am new to GL4Java so I am having a few problems with GLAnimCanvas among others. You see I have a Panel which contains the start screen and a panel which contains the GLAnimCanvas plus others. When I press a button on the Start Panel it calls calls removeAll() and adds the panel which contains GLAnimCanvas(game Panel) then I start it running. This works. Now when I press another button it does the same thing except swapping the game Panel for the start Panel. This works however if I then try to repeat that process from then on the GLAnimCanvas isn't displayed, any ideas. My System is Windows 2000 with a Creative TNT2 Ultra using JDK 1.2.2 and Swing when I am developing or MS VM when not. Live Long and Prosper ICQ - 45835769 |
From: Virgil W. <vir...@ra...> - 2000-04-26 21:37:58
|
> Hi, I am new to GL4Java so I am having a few problems with GLAnimCanvas > among others. > > You see I have a Panel which contains the start screen and a panel which > contains the GLAnimCanvas plus others. > > When I press a button on the Start Panel it calls calls removeAll() and adds > the panel which contains GLAnimCanvas(game Panel) then I start it running. > This works. Now when I press another button it does the same thing except > swapping the game Panel for the start Panel. This works however if I then > try to repeat that process from then on the GLAnimCanvas isn't displayed, > any ideas. I'm totally guessing here, but I'll bet the native window handle might go invalid when you remove your game panel. You might instead try using a cardlayout layoutmanager to toggle between your game and start panel. I've never tried to put an AWT heavy-weight component on top of a GLCanvas, so I'm not even sure if this would work. Btw, I use windows 2000 with a leadtek geForce but don't seem to experience the system restarts (under any vm). > > > My System is Windows 2000 with a Creative TNT2 Ultra using JDK 1.2.2 and > Swing when I am developing or MS VM when not. > > Live Long and Prosper > ICQ - 45835769 > > > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > http://lists.sourceforge.net/mailman/listinfo/gl4java-usergroup > |
From: Max G. <gi...@li...> - 2000-04-29 12:44:14
|
Virgil Wall wrote: > I've > never tried to put an AWT heavy-weight component on top of a GLCanvas, so > I'm not even sure if this would work. According to my tests, GLCanvas is always at the top (no matter if is is Swing, or Swing with lightweight flag set to off or AWT). You may of course create another window and then it can be layered. Max -- Max Gilead (gi...@li...) http://3d.linart.krakow.pl/OfficinaArtificialis ----------------------------------------------------------------------------- |
From: Pontus L. <po...@ly...> - 2000-05-03 09:41:08
|
On Sat, 29 Apr 2000, Max Gilead wrote: > > Virgil Wall wrote: > > > I've > > never tried to put an AWT heavy-weight component on top of a GLCanvas, so > > I'm not even sure if this would work. > > According to my tests, GLCanvas is always at the top (no matter if is is Swing, > or Swing with lightweight flag set to off or AWT). You may of course create > another window and then it can be layered. I've managed to show popup menus on top of a GLCanvas, using JPopupMenu.setDefaultLightweightPopupEnabled(false) which is supposed to turn popup menus into heavyweight (awt?) components. I've had success on Linux/Blackdown JDK 1.2.2 with MesaSoft, and on Windows NT with GeForce256 and JBuilder. That I've had luck with this and you not, does it indicate that it may be a OpenGL version/driver issue? Regards, Pontus -- Pontus Lidman, po...@ma..., Software Engineer No matter how cynical you get, it's impossible to keep up. Scene: www.dc-s.com | MUD: tyme.envy.com 6969 | irc: irc.quakenet.eu.org |
From: Max G. <gi...@li...> - 2000-05-06 00:17:28
|
Pontus Lidman wrote: > I've managed to show popup menus on top of a GLCanvas, using > JPopupMenu.setDefaultLightweightPopupEnabled(false) which is supposed to > turn popup menus into heavyweight (awt?) components. I've had success on > Linux/Blackdown JDK 1.2.2 with MesaSoft, and on Windows NT with GeForce256 > and JBuilder. > > That I've had luck with this and you not, does it indicate that it may be > a OpenGL version/driver issue? I think so. And/or JDK version. I've tried exactly the same trick a while ago IIRC with Mesa 3.0 and JDK 1.1.6 and it didn't worked. Send me your example code so I can see if it works here... I think about starting section named 'GL4Java usability examples' or similar. What do you think? Would you use it or think other people would? Your font example would fit well into this... People sometimes send mails in two copies: one to mailing list and the other to me personally. I don't do this if recipient is subscribed to the list - am I rude or this is only a matter of taste? :-) Bye, Max -- Max Gilead (gi...@li...) http://3d.linart.krakow.pl/OfficinaArtificialis ----------------------------------------------------------------------------- -- Why is it that all of the instruments seeking intelligent life in the -- -- universe are pointed away from Earth? -- |
From: Max G. <gi...@li...> - 2000-04-27 21:14:13
|
John Owens wrote: > if I then > try to repeat that process from then on the GLAnimCanvas isn't displayed, > any ideas. If you're not doing this, you need to destroy OpenGL context before removing its component from the screen. Humanly-speaking :-) you must call cvsDispose and then init component again when it gets displayed again. Max -- Max Gilead (gi...@li...) http://3d.linart.krakow.pl/OfficinaArtificialis ----------------------------------------------------------------------------- |