Login  Register

Re: Getting GL context

Posted by Sven Gothel on May 24, 2012; 8:27am
URL: https://forum.jogamp.org/Getting-GL-context-tp4013086p4013106.html

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