Getting GL context

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting GL context

sasmaster
Hi All.how can I get GL context without GLCanvas or any other ui element ?
Reply | Threaded
Open this post in threaded view
|

Re: Getting GL context

Sven Gothel
Administrator
On 05/24/2012 10:08 AM, sasmaster [via jogamp] wrote:
> Hi All.how can I get GL context without GLCanvas or any other ui element ?
>

A valid GL context able to become current must be bound to
a so called drawable. The latter is either a visible on-screen
surface (window) or an off-screen surface.

If you like the latter, you can either use NEWT while setting the
capabilities to !onscreen, or you can use the  GLDrawableFractory
and create an offscreen GLDrawable yourself via either createGLPBuffer(..)
or createOffscreenDrawable(..).

Having a GLDrawable allows you to create your GLContext via the
provided createContext(..) method.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Getting GL context

sasmaster
Ok , I see. Can you extend on this one ? :
"
If you like the latter, you can either use NEWT while setting the
capabilities to !onscreen,

"
Thanks.