Login  Register

Re: useful Java2D bridge

Posted by gouessej on Oct 04, 2011; 9:49am
URL: https://forum.jogamp.org/useful-Java2D-bridge-tp3391708p3392624.html

Hi

Thank you so much, it would be a nice temporary solution to port APIs relying on Java2D to JOGL. There were some old projects doing it (Agile2D, GTGE, etc...) but they are no more maintained. I'm going to look at your source code. Thank you for sharing :)

I agree with Sven but it would be fine if your source code could work with plain OpenGL 1.2 too without shaders.

Edit.: Nice source code :)

Edit.2: As there are a lot of dependencies with AWT, it won't work on mobile phones but it could work with NEWT.

Edit.3: Storing the GL instance is not a good idea in my humble opinion. It can be invalidated and using an invalid one is not good..... Maybe you could use the same array in static methods to avoid creating a lot of arrays. GLGraphics2D should be called on the same thread as it depends on OpenGL and making a single OpenGL context current on different threads might not work on some platforms.
Julien Gouesse | Personal blog | Website