GLJPanel maximizing

I have been running my jogl program on a Windows NT labtop and was working fine. I am now working on a Dell with Windows NTand when I maximize a my panel I get this exception stack.


Exception in thread "AWT-EventQueue-0" net.java.games.jogl.GLException: Error releasing pbuffer device context: error code 0
        at net.java.games.jogl.impl.windows.WindowsPbufferGLContext.destroyImpl(WindowsPbufferGLContext.java:440)
        at net.java.games.jogl.impl.GLContext.destroy(GLContext.java:663)
        at net.java.games.jogl.impl.GLPbufferImpl.destroy(GLPbufferImpl.java:207)
        at net.java.games.jogl.GLJPanel$1.run(GLJPanel.java:233)
        at net.java.games.jogl.GLJPanel.reshape(GLJPanel.java:279)
        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.validateTree(Container.java:1480)
        at java.awt.Container.validate(Container.java:1448)
        at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
        at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Please note I was using the jogl.jar from may 11th, both instances and now on this PC I get problems. I tried using new jogl.jar build and I get even more problem with that. Also, note the the prereffered size of my panel is determined using the PC desktop pane, so it reads the PC’s settings. Does anyone know what my problem is?

Let me rephrase this, it is the GLCancav that is not reshaping, when I maximize the GLJPanle it is in.

Does the JGears (note, not the Gears) demo work properly with resizing and maximizing?

Are you really embedding a GLCanvas in a GLJPanel? If so, why?

What graphics card and driver version are you running on your PC? Have you tried upgrading to the latest available driver set? Are you running your program with the system property -Dsun.java2d.noddraw=true?

Could you continue to run all of your tests with the latest JOGL build (1.1 b12) and post stack traces or other problems with that build?

Further to this, I’ve noticed rapid degradation of performance with GLJPanel during resizing. As I resize the panel to various sizes and the context is recreated (and hence reinitialised), each time this occurs the performance degrades quickly down to 1fps.

This is with a GLJPanel inside a JInternalFrame.

JOGL 1.1b12
Java 1.5.0_02
Windows XP
Dell Inspiron 9100 (3.2GHz P4) Radeon Mobility 9700 (I think with the Dell drivers) and also on a Dell Desktop w/ 3.0GHz P4 + NVdia 5260 (or something).

Interestingly I don’t experience the quite same degradation on my Inspiron 9200 (Centrino 2.1GHz) Radeon Mobility 9700 w/ DNA Drivers.

I’ve just discovered that my Inspiron 9200 had 1.1b11 as opposed to the b12 at work. I’ve just upgrade to b12 and now i’m getting the context recreation (that causes a flickering/pause when it occurs) during recreation.

I’ve also just replaced the GLJPanel with a GLCanvas, and the GLCanvas retains the same (high) performance regardless of the size of the canvas whereas the GLJPanel degrades significantly the larger the canvas.

I am very new to program in Java let alone using JOGL. How do I set the system properties as Dsun.java2d.noddraw=true? Also, no it is not a GLCAnvas embedded in a GLJPanel, it is simply a GLJPanel that is extending a JInternalFrame. The video card is a 32MB ATI Rage 128 Ultra and not sure on driver version can anyone tell how I could find that. As of right now I will try the JGears demo and also run the test on the newest build and paste bacl the exception stack.

JGears demo works fine with resizing and maximizing.

Confesor

Now with the new jogl build my program does not even initialize properly, I get expceptions. Here they are:


Exception in thread "AWT-EventQueue-0" net.java.games.jogl.GLException: Initial width and height of pbuffer must be positive (were (0, 512))
        at net.java.games.jogl.impl.windows.WindowsPbufferGLContext.<init>(WindowsPbufferGLContext.java:76)
        at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.createPbufferContext(WindowsOnscreenGLContext.java:111)
        at net.java.games.jogl.GLCanvas.createOffscreenDrawable(GLCanvas.java:205)
        at net.java.games.jogl.GLJPanel.initialize(GLJPanel.java:461)
        at net.java.games.jogl.GLJPanel.access$900(GLJPanel.java:80)
        at net.java.games.jogl.GLJPanel$1.run(GLJPanel.java:267)
        at net.java.games.jogl.GLJPanel.reshape(GLJPanel.java:304)
        at java.awt.Component.setBounds(Component.java:1847)
        at java.awt.Component.resize(Component.java:1781)
        at java.awt.Component.setSize(Component.java:1770)
        at java.awt.BorderLayout.layoutContainer(BorderLayout.java:803)
        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.validateTree(Container.java:1480)
        at java.awt.Container.validateTree(Container.java:1480)
        at java.awt.Container.validate(Container.java:1448)
        at javax.swing.JInternalFrame.reshape(JInternalFrame.java:1388)
        at java.awt.Component.setBounds(Component.java:1847)
        at java.awt.Component.resize(Component.java:1781)
        at java.awt.Component.setSize(Component.java:1770)
        at java.awt.Component.resize(Component.java:1804)
        at java.awt.Component.setSize(Component.java:1795)
        at javax.swing.JInternalFrame.pack(JInternalFrame.java:1606)
        at XYPlot.startXY(XYPlot.java:344)
        at FAA.show_graphs(FAA.java:1275)
        at SelectionForm.plot_ButtonActionPerformed(SelectionForm.java:610)
        at SelectionForm.access$700(SelectionForm.java:26)
        at SelectionForm$8.actionPerformed(SelectionForm.java:300)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
        at java.awt.Component.processMouseEvent(Component.java:5488)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
        at java.awt.Component.processEvent(Component.java:5253)
        at java.awt.Container.processEvent(Container.java:1966)
        at java.awt.Component.dispatchEventImpl(Component.java:3955)
        at java.awt.Container.dispatchEventImpl(Container.java:2024)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
        at java.awt.Container.dispatchEventImpl(Container.java:2010)
        at java.awt.Window.dispatchEventImpl(Window.java:1774)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Hi all I fix my resizing and maximizing prblem that was existing in the may 11 build. WHat I did it change my display settings to high color (16bits) from (32bits). So that problem is solved, now when I update to the most recent build (may 27) my GLJPanels do not even initialize still. I have previously posted the trace stack for that. But please note that my problem with build of may 11 and resizing and maxing was that color setting on WIndows.

Are you doing something strange with your layout that is causing your GLJPanel to have a zero size along one dimension, even for some brief period of time? I think I should probably make that exception non-fatal, but the JGears demo, for example, doesn’t have this problem.

My layout of the GLJPanel is dependent on the area of the computer, whether it is 1024x768 or 800x600. I set calculations to set the size of the GLJPanel with this in mind. It is not a problem in build from may11th and older, just with new one, what could be the problem?

It may be due to how the JDK lays out your components. I’ve put a workaround into the GLJPanel implementation to handle a width or height == 0 more gracefully (along the hardware-accelerated pbuffer path). Could you try a test build for me? It’s under the “Temporary Files” folder of the “Documents and Files” section of the JOGL home page and has your username on it. Thanks.

Hey Ken that test build worked fine.