GLException

Hi

I’m creating an app which involves creating many GLJPanels (around seventy), all children of a JComponent. Somewhere around the fiftieth I suddenly get a GLException, and after that the panels in the app refuse to draw lines.

Turning on debugging I find an error message in the exception:

pbuffer creation error: wglCreatePbufferARB() failed: tried 9 pixel formats, last error was: (Unknown error code 0)

Running on a PC with Windows XP and an ATI video card.

Any suggestions for what the message means?

I don’t really know, but I could imagine, that there might be a limitation on the amount of pbuffers that can be created or you are just out of vram and the driver does not provide a meaningful error message.

Nevertheless, creating 70 GLJPanels seem to be a vast waste of resources. Why do you need so many?

I have seventy drawings that need to be done with JOGL. Is there an alternative approach?

Thanks to your suggestions I may be on to something. A pair of apps, each containing half the plots in the big app, don’t fail, so the issue is almost certainly due to
a resource limitation.

I also think I have an actual bug. The GLException is thrown in GLDrawableFactory.createGLPbuffer() and caught in GLJPanel.initialize(). GLJPanel.initialize() sets the flag ‘hardwareAccelerationDisabled’ true (meaning that software rendering will be used from now on) and initializes the variables ‘offscreenDrawable’ and ‘offscreenContext’, which are needed for software rendering.

The trouble is that ‘hardwareAccelerationDisabled’ is static while ‘offscreenDrawable’ and ‘offscreenContext’ are not. This means that other instances of GLJPanel are forced to do software rendering but without the variables being initialised. This results in null pointers and seems to be the cause of many of my problems.

Is there a place where I can report this to someone who might know how to fix it?

You can report bugs here: https://jogl.dev.java.net/servlets/ProjectIssues
You have to be Observer for the project before you are allowed to do this.

If they don’t need to be on screen the same time, just clear the scene and advance to the next drawing. If they need to be on screen at the same time, try drawing all of them in one big panel and translate each to the right positions before drawing.

Thanks for the bug report place.

The panels in question are all children of the same scrollable component, so while they are not technically all on the screen at one I’m reluctant to start switching GJLPanel positions as part of a scroll operation for fear of performance problems. However I might try that if nothing else seems to arise to cure this.

Thanks for your help. If you have any more suggestions I’d be glad to hear them.