Posted by
Sven Gothel on
Aug 21, 2015; 12:52pm
URL: https://forum.jogamp.org/Can-JOGL-be-used-without-requiring-GLAutoDrawable-instances-tp4034953p4035093.html
On 08/21/2015 11:24 AM, xghost [via jogamp] wrote:
> gouessej wrote
> Look at ExampleBase, JoglAwtCanvas, JoglSwingCanvas, ... Keep in mind that
> I had to avoid using any animator in this engine because of an early
> design decision (not mine). Therefore, a few complicated things are
> totally useless when you simply use an animator, especially those related
> to AWT.
>
> Hi gouessej, et. al.,
>
> I've been working on this on-and-off (had to take care of a few other things).
> I've gone through the files and a few other classes they collaborate with,
> etc. Unfortunately, I can't say that I'm getting any closer to what I'm trying
> to achieve --as described in my original post.
Just to make this long story maybe shorter:
It is 'just' about *work*.
Using the assisted API, i.e. GLAutoDrawable/GLEventListener
allows you to rely on our OpenGL + resources lifecycle support
and certain 'quirks' required to allow seamless operation on all
platforms, e.g. Android and OSX/AWT special cases.
The assisted model also supports certain features like:
- Suspend an GLContext (make offscreen, destroy drawable -> re-animate).
- Swap On- offscreen drawable
- ..
If you control GLDrawable/GLContext yourself,
you operate on a much lower level.
This gives you more freedom, but also implies a much
higher responsibility, since you can crash things more easily.
Everything is available for this low level hacking
and you can of course copy/paste our code pieces from
GLAutoDrawable, GLCanvas etc. However, maintenance might become
your burden here.
This approach may also end up in just reinventing the wheel :)
In case you dislike the assisted path b/c of a missing
but essential feature, we can discuss it and add it together.
That said go for it .. whatever you choose!
Hope that helps a bit ..
~Sven