Bug 129 - GLJPanel throws a GLException while GLCanvas works.
Summary: GLJPanel throws a GLException while GLCanvas works.
Status: VERIFIED DUPLICATE of bug 41
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All all
: P3 normal
Assignee: Sven Gothel
Depends on:
Reported: 2005-01-11 08:07 CET by Sven Gothel
Modified: 2010-03-24 07:47 CET (History)
0 users

See Also:
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2010-03-24 07:47:16 CET

---- Reported by snagy 2005-01-11 20:07:01 ----

Doing the following with a GLJPanel I get the GLException that can be found
below.  I actually thought it was a problem with my driver but using a GLCanvas
everything works fine.  I tried with jdk1.5.0,1.5.0_01, 1.4.2_05.
GLCapabilities capabilities = new GLCapabilities();
   JPanel panel = GLDrawableFactory.getFactory().createGLJPanel(capabilities);
   JFrame frame = new JFrame("OpenGL Test");
Exception in thread "main" net.java.games.jogl.GLException: Unable to set pixel
 at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCr
 at net.java.games.jogl.impl.windows.WindowsOffscreenGLContext.create(Window
 at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLC
 at net.java.games.jogl.impl.windows.WindowsOffscreenGLContext.makeCurrent(W
 at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:250)
 at net.java.games.jogl.GLJPanel.reshape(GLJPanel.java:131)
 at java.awt.Component.setBounds(Component.java:1847)
 at java.awt.BorderLayout.layoutContainer(BorderLayout.java:809)
 at java.awt.Container.layout(Container.java:1401)
 at java.awt.Container.doLayout(Container.java:1390)
 at java.awt.Container.validateTree(Container.java:1473)
 at java.awt.Container.validateTree(Container.java:1480)
 at java.awt.Container.validateTree(Container.java:1480)
 at java.awt.Container.validateTree(Container.java:1480)
 at java.awt.Container.validate(Container.java:144Cool
 at java.awt.Window.show(Window.java:507)
 at java.awt.Component.show(Component.java:1300)
 at java.awt.Component.setVisible(Component.java:1253)

---- Additional Comments From kbr 2005-01-18 16:08:30 ----

A workaround appears to be to call


on the GLCapabilities object passed to GLDrawableFactory.createGLJPanel(). This
should be done automatically by the JOGL library if necessary.

---- Additional Comments From kbr 2005-01-31 01:39:05 ----

We've added a workaround which disables the double-buffering flag in the
GLCapabilities for offscreen surfaces in the fix for Issue 41, so I'm marking
this  as a duplicate of that bug. The fix will be present in JOGL 1.1 b08.
Please reopen this bug or open a new bug if problems persist.

*** This issue has been marked as a duplicate of 41 ***

--- Bug imported by sgothel@jausoft.com 2010-03-24 07:47 EDT  ---

This bug was previously known as _bug_ 129 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=129