Login  Register

Re: GLCanvas/GLJPanel problems

Posted by Sven Gothel on Nov 20, 2012; 4:13pm
URL: https://forum.jogamp.org/GLCanvas-GLJPanel-problems-tp4026923p4027081.html

On 11/20/2012 04:45 PM, mikaelhc [via jogamp] wrote:

> I still get the "Unable to create temp OpenGL context for device context" errors.
>
> I wrap everything in an 'invokeLater' call, and, as I understand it, the
> OpenGL thread should invoke methods on the EDT thread, right?
>
> For instance, the following code crashes when moving the splitter:
>
> public class JoglTest extends JFrame {
> private static final long serialVersionUID = 1L;
>
> public static void main(String[] args) {
> SwingUtilities.invokeLater(new Runnable() {
>    public void run() {
>     new JoglTest();
>    }
> });
> }
>
> public JoglTest() {
> Container contentPane = getContentPane();
>
> JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
> splitPane.setResizeWeight(0.5d);
>
> GLCanvas gc = new GLCanvas(new GLCapabilities(GLProfile.getDefault()));
> splitPane.setLeftComponent(gc);
> splitPane.setRightComponent(new JPanel());
> contentPane.add(splitPane, BorderLayout.CENTER);
>
> FPSAnimator animator = new FPSAnimator(gc, 100);
> animator.start();
>
> pack();
> setVisible(true);
> setSize(new java.awt.Dimension(824,568));
> }
> }
>
>
> The code works on Mac, and earlier versions of JOGL.
>
> Isn't this a JOGL bug? Or am I missing something?
>
Please create a bug report and attach your test code to it,
I will have a look at it.

Thank you.

~Sven



signature.asc (909 bytes) Download Attachment