gl4java guy needs JOGL tips ...

gl4java guy needs JOGL tips …

Sorry for such a basic title.

I was using gl4java with netbeans and was able to to a bait and switch from a awt Canvas to a gl4java canvas just by inheritance. The window I had drawn now would re-paint itself using my GLCanvas methods rather than the regular awt Canvas methods.

I can’t seem to get starting doing similar with JOGL.

What is the proper way to use JOGL GLCanvas with Netbeans’ screen painter ? Do I need to install some bean so GLCanvas would such up as a component ?

I moved to JOGL because gl4java didn’t seem to honor my glReadPixels call … and aside from that … a friend said JOGL would be a better move.

I know I’m asking a lot of questions. Someone please give me a beating. Thanks.

The JoGL canvas is final : you can’t extend it. But since the source is open, you can copy the source of the GLCanvas class and put it into your application’s package, then modify the methods you need for use with netbeans, and use this class from your application. The class will still be compatible with JoGL. The only problem is that you have to stay in sync with the changes the JoGL developement team makes to their the JoGL GLCanvas class so your implementation doesn’t get outdated.

I have done this succesfully with OmCanvas for OpenMind which used to extend GLAnimCanvas from gl4java.

Good luck

Alban