Login  Register

Re: Hello! and Error: ...incorrectly used with a different GLContext...

Posted by LordSmoke on Aug 12, 2016; 4:18pm
URL: https://forum.jogamp.org/Hello-and-Error-incorrectly-used-with-a-different-GLContext-tp4036820p4037056.html

Hmm, problem solved?

I tried writing a SSCCE program using some simple rotating triangle code from the internet inserted into tabbed pane panels, but it worked! In comparing the code sections (the internet and mine), the following line (where gl is a static variable) in my "display" function made the problem go away:

    @Override
    public void display(GLAutoDrawable drawable) {    
        gl = drawable.getGL().getGL3();
        ...  

The code worked without this line for a single glcanvas window, but switching between tabbed windows generated the error.

Does this make sense?