Login  Register

Re: Can JOGL be used without requiring GLAutoDrawable instances?

Posted by jmaasing on Jul 23, 2015; 6:32am
URL: https://forum.jogamp.org/Can-JOGL-be-used-without-requiring-GLAutoDrawable-instances-tp4034953p4034954.html

So, you are writing a wrapper around a library and that library uses callbacks, then you ofc need to wrap the callbacks also. That means that your library needs to wrap the window/frame/whatever drawable. It should also wrap the input handling. Then the client code register with the your library to get your library to call the client when it is time to draw or get keyboard input et c. That callback from your library to the client will expose only your library classes, these classes in turn can be wrappers around whatever native-bridge library you use.

You can look at the source code for the OSS projects like: LibGDX, Ardour3D, jMonkeyEngine to see how they do it. All of them hide the JOGL implementation by having their own 'render' interface.