Re: Can JOGL be used without requiring GLAutoDrawable instances?
Posted by
xghost on
Jul 27, 2015; 11:48pm
URL: https://forum.jogamp.org/Can-JOGL-be-used-without-requiring-GLAutoDrawable-instances-tp4034953p4034981.html
gouessej wrote
...I don't the benefit of not using our assisted API in a trivial case, I don't see any gain.
Hi gouessej,
I'll try to simplify.
1. I have a requirement to decouple the client code using my library from the detail/fact that my library is (internally) using JOGL itself.
2. Using the assisted API (e.g. client code implementing GLEventListener) will cause clients to be 'aware' of JOGL's existence inside my library, breaking the JOGL encapsulation requirement (e.g. anything that makes GL instances directly visible/accessible to clients).
3. Client needs to work with shaders directly (e.g. set shader program input values, etc), hence my shader interfaces, as per the above code snippets.
A bit of background: I've started a project that will be used in the long-term, but mostly for teaching purposes. It's not a trivial library, but it also won't be aiming to be a triple-A thing. We want to keep it "simple" enough to be understood within a single semester, but as complicated as needed to support students in game development projects, if that makes sense. We're in the process of replacing an older version of the same framework that has been in use for several years.
gouessej wrote
It might be a problem anyway...
Now, I hear there're problems, though I'm not sure what (specifically) those problems are supposed to be and how to avoid the pitfalls, other than what Sven and the javadocs already mentioned re GLContext.
Could you please expand on these? What recommendation would you make that would help avoid the problems you're thinking about (would appreciate additional info on what they are) and also meet the basic requirements I summarized above?
Please let me know if there's something you think I should clarify.
Thanks in advance,
-x