Login  Register

Re: Getting GLAutoDrawable from GL4

Posted by Sven Gothel on Nov 27, 2014; 8:56pm
URL: https://forum.jogamp.org/Getting-GLAutoDrawable-from-GL4-tp4033629p4033662.html

On 11/25/2014 02:18 AM, siddharth.cmdz [via jogamp] wrote:
> hi,
>
> Is there a way to get the GLAutoDrawable from the GL4 object? I see that the
> GLAutoDrawable is essentially the canvas. In my design, i pass the GL4
> instance to places where they can direcctly call gl functions. However, there
> are places where it would be nice to get back the GLAutoDrawable from the GL4
> instance. Is this possible?

Downstream objects as GL <-> GLContext <-> GLDrawable
have no association to an [optional] GLAutoDrawable.

<http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLAutoDrawable.html>

GLAutoDrawable's may have an is_a or an has_a (delegation)
relationship to GLDrawable:

<http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLAutoDrawable.html#getDelegatedDrawable%28%29>

GLAutoDrawable has a association to
its upstream UI toolkit object:

<http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLAutoDrawable.html#getUpstreamWidget%28%29>

I am afraid you would need to pass the GLAutoDrawable instance
to your other methods.

~Sven




signature.asc (828 bytes) Download Attachment