Re: Can JOGL be used without requiring GLAutoDrawable instances?
Posted by
xghost on
Jul 23, 2015; 11:57am
URL: https://forum.jogamp.org/Can-JOGL-be-used-without-requiring-GLAutoDrawable-instances-tp4034953p4034956.html
jmaasing wrote
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.
Of course I could spend a significant amount of effort wrapping everything... but I think that seems to miss the point of, or not address, what I'm asking. I've checked some, not all, libraries (e.g. a bit of libGDX, a lot of Ogre3D) as I've been working on some things, but I don't think it's immediately practical for me to simply go around chasing every possible library someone can name in a "Check lib ____" comment :)
I'll take a brief look at some of those tomorrow to see if I find something relevant to my question in the meantime, but if you'd like me to clarify something in my original post here or the link provided, please let me know.
I think you may've misunderstood my post. I'm not questioning design decisions in JOGL or anything like that, so a post on why JOGL was designed like this, although interesting, is not too helpful at this point for me.
Please let me know if there's something I should clarify in my original post, etc.
Thanks again,
-x