LWJGL Forum

Programming => LWJGL Documentation => Topic started by: Kilabyte on March 31, 2011, 01:20:30

Title: Drawing over the Parent Display (Applet)
Post by: Kilabyte on March 31, 2011, 01:20:30
I'm attempting to use LWJGL in an applet. I have a Canvas as the display parent (Display.setParent(Canvas)). Is there anyway for me to draw images directly onto the canvas? I basically want to be able to draw my GUI to directly over the LWJGL display. I've tried getting the Graphics from the Canvas and drawing on it but it doesn't seem to work.

Thanks in advance,
               -Kilabyte

Title: Re: Drawing over the Parent Display (Applet)
Post by: CodeBunny on March 31, 2011, 16:43:44
I'm pretty sure you'll have to draw your graphics onto the Display via OpenGL using textured quads. It won't be too hard, and you'll get much better performance.
Title: Re: Drawing over the Parent Display (Applet)
Post by: kappa on March 31, 2011, 18:43:24
best not to mix Opengl with AWT too much otherwise you'll run into heavyweight vs lightweight issues like the above. A better solution is to use an OpenGL Gui like TWL (http://twl.l33tlabs.org/).