Author Topic: Display.Graphics Question  (Read 2114 times)

Offline qcrist

  • byte
  • *
  • Posts: 29
    • View Profile
Display.Graphics Question
« on: September 02, 2011, 11:36:05 pm »
Is there any way to access the graphics pane of the Display class?
« Last Edit: September 02, 2011, 11:41:08 pm by qcrist »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Display.Graphics & Frame buffer Question
« Reply #1 on: September 02, 2011, 11:40:16 pm »
You can use the AWTGL renderer that renders into an AWT canvas...or use jogl-support that does something similar but with jogl instead. I'm not sure what you mean with that graphics pane question...what do you want to do exactly?

Offline qcrist

  • byte
  • *
  • Posts: 29
    • View Profile
Re: Display.Graphics Question
« Reply #2 on: September 02, 2011, 11:41:57 pm »
I want to access the graphics of the display window. Is that possible?

ex:
Graphics g = Display.getGraphics();
g.drawRect(0,0,100,100);

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Display.Graphics Question
« Reply #3 on: September 02, 2011, 11:46:55 pm »
No. It's native GL. There is no Graphics context. There is one for the AWTGL canvas, but i don't think that you can use Java2D methods on that either.

Offline qcrist

  • byte
  • *
  • Posts: 29
    • View Profile
Re: Display.Graphics Question
« Reply #4 on: September 02, 2011, 11:47:31 pm »
k, thanks