Login  Register

Porting java.awt stuff to jogl.

Posted by sarevok on Apr 28, 2012; 6:00pm
URL: https://forum.jogamp.org/Porting-java-awt-stuff-to-jogl-tp3947157.html

Hello,

I'm porting java application to Android.
This app is using JOGL a lot in connection with awt. Since AWT is not available on Android I need to get rid of it. (But the best thing will be if all stuff will be as much crossplatform as possible)

So first thing I made was replace all AWT events with NAWT equivalents then porting main AWT frame creating main window with NAWT GLWindow.

Now I have some things like:
java.awt.Graphics2D
java.awt.Graphics
java.awt.image.BufferedImage
java.awt.Font

That needs to be replaced with JOGL equivalents (if there is any).

Propably JOGL has some kind of textrenderer class to handle all stuff related to text rendering, could anyone point me to any documentation? (I will be able to replace java.awt.Font and all text rendering stuff with it propably)

What with Graphics*? It is possible to replace them simple way by NAWT somehow?
What with BufferedImage? I need to display image in my app. There's android.graphics.Bitmap that could be used as BufferedImage  equivalent but it's not cross-platform solution and maybe JOGL has some classes for image manipulation, hm?

Any tip will be helpful :)
Im just an beginner in JOGL world and this is my first post, hello! :)