LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: oXineteX on October 14, 2005, 23:18:56

Title: Swing and OpenGl
Post by: oXineteX on October 14, 2005, 23:18:56
Hello,
im realy new in OpenGL Development for Java (and Graphic Devel. self). I ask me, if it is possible to create a OpenGL Plane in a Swing Enviroment.

Or if there are Classes for "Buttons, Select Boxes..." in lwjgl.
Maybe a class to build a "HUD".

oXineteX
Title: Swing and OpenGl
Post by: oXineteX on October 15, 2005, 00:36:22
ok for the swing... i don't think of it - i should only use a second Frame..
:lol:

Ok but the HUD Question are already there.
Title: Swing and OpenGl
Post by: CaseyB on October 16, 2005, 03:03:47
There are examples that use an AWTGLCanvas in the lwjgl sourceforge area.
Title: AWTGLCanvas and HUD
Post by: rainforest on October 19, 2005, 18:46:04
Dear All

I wonder if u can please tell me exactly which example is describing AWTGLCanvas or HUD on sourceforge or in LWJGL home demo pages?

I would be glad to know.  :D

rainforest.
Title: Swing and OpenGl
Post by: Matzon on October 19, 2005, 20:10:00
it's in the source distribution
Title: Swing and OpenGl
Post by: Nop on December 09, 2005, 17:07:24
I am also looking for an example on how to use AWTGLCanvas.

I have searched through the Source distribution, there is no example there, only the sparsely documented class itself.

My problem is: The overridden paintGL function is called, the gl Functions are executed, but nothing appears in the canvas. What do I have to do to make the AWTGLCanvas acutally draw something?
Title: Swing and OpenGl
Post by: CaseyB on December 09, 2005, 17:22:25
Did you call swapBuffers() at the end of the paintGL() method?
Title: Swing and OpenGl
Post by: Nop on December 10, 2005, 14:40:22
Yeah, that was one third of the problem. :-)

I found the example now. swapBuffers() and makeCurrent() were both missing.