Drawing over the Parent Display (Applet)

Started by Kilabyte, March 31, 2011, 01:20:30

Previous topic - Next topic

Kilabyte

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


CodeBunny

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.

kappa

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.