brandonborkholder / glg2d

Graphics2D wrapper for JOGL
77 stars 31 forks source link

Better test cases #5

Closed brandonborkholder closed 11 years ago

brandonborkholder commented 12 years ago

VisualTest tests a pretty small subset of the Graphics2D functionality. Ideally, an automated test suite would draw using Sun's and GLG2D's renderers and then compare.

ghost commented 12 years ago

I would really like an example with a full Swing GUI drawn inside a NEWT window (GLWindow). It is not clear whether it is possible with GLG2D.

brandonborkholder commented 12 years ago

It is certainly possible. I just haven't done enough with NEWT to be able to build a structured application. As long as you can add a GLEventListener to it, you can draw a Swing GUI inside it using glg2d. I'll take a look.

On Fri, Aug 31, 2012 at 5:15 AM, Julien Gouesse notifications@github.comwrote:

I would really like an example with a full Swing GUI drawn inside a NEWT window (GLWindow). It is not clear whether it is possible with GLG2D.

— Reply to this email directly or view it on GitHubhttps://github.com/brandonborkholder/glg2d/issues/5#issuecomment-8186541.

ghost commented 12 years ago

But can I completely render a JTree with GLG2D?

brandonborkholder commented 12 years ago

Can you send me a test case? The short answer is yes, you should be able to. Add the JTree to a G2DGLPanel and it will render all the subcomponents.

brandonborkholder commented 11 years ago

Here is an example of drawing a Swing GUI into a NEWT window https://raw.github.com/brandonborkholder/glg2d/master/src/test/java/org/jogamp/glg2d/examples/NewtExample.java. Mouse event translator included.

ghost commented 11 years ago

Thank you very much for this example.