Hello Guest

Drawing over the Parent Display (Applet)

  • 2 Replies
  • 4848 Views
Drawing over the Parent Display (Applet)
« 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

« Last Edit: March 31, 2011, 01:22:34 by Kilabyte »

Re: Drawing over the Parent Display (Applet)
« Reply #1 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.

*

Offline kappa

  • *****
  • 1314
Re: Drawing over the Parent Display (Applet)
« Reply #2 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.