Bug 129

Summary: GLJPanel throws a GLException while GLCanvas works.
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 1   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
Workaround: ---

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");
   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   
   frame.setSize(400,400);
   frame.add(panel);
   frame.setVisible(true);
 
-----------------------------------------------------------------------
 
Exception in thread "main" net.java.games.jogl.GLException: Unable to set pixel
format
 at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCr
eateContext(WindowsGLContext.java:493)
 at net.java.games.jogl.impl.windows.WindowsOffscreenGLContext.create(Window
sOffscreenGLContext.java:181)
 at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLC
ontext.java:135)
 at net.java.games.jogl.impl.windows.WindowsOffscreenGLContext.makeCurrent(W
indowsOffscreenGLContext.java:12Cool
 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

setDoubleBuffered(false)

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