limitied ammount of viewports?

Hi folks,
i have some problems porting a swing based gui application to jogl and hope you can help me.
The app displays two GLCanvas objects that share the same OpenGL context (GLDrawable).
As soon as i try to initialize/add a third GLCanvas object a “Unable to set pixel format” GLException is thrown.
This always happens at the third GLCanvas i try to add, regardless of the order in which i initialize them. I tried to deactivate some of the gl caps (hw acceleration, dbl buffering…) but without success.
Is this a limitation of jogl?
Or maybe i’ve done something wrong.

Please let me know if you have any ideas
and thanks in advance,
nop nop nop…

You could try one canvas with multiple viewports. Would this suffice to your needs? Then one renderer could render to both viewports, one ather the other.

I’ve noticed that creating another canvas generally reduces framerates wayy low for all canvases, for reasons I’m not completely sure about. Perhaps there is some synchronization issues going on… hmm, I don’t know.

Hi Logic,
thanks for the hint, but i am in need of four GLCanvas objects. Performance is not verry important in this project, so any workaround that allows four GLCanvas objects will be ok.
I wonder if the ‘Unable to set pixel format’ GLException is caused by a driver limitation. (The same code crashed the VM because of an exception in one of the driver dlls before i’ve updated the driver yesterday. Btw,this happens on a radeon 9700 pro)

Thanks again,
nop nop nop…

This should work – there are no deliberate limitations in JOGL’s OpenGL context management code. Do you have a test case? If so, could you file a bug with the Issue Tracker on the JOGL home page?

Hi Ken,
i’ve just written a litte test app that displays a JTabbedPane and a button which (if pushed) adds a tab to the JTabbedPane.
Each tab uses a GLCanvas to simply display a color.
If i add some tabs from within the contructor, everything works well. But as soon as the button is used to add a tab an “Unable to set pixel format” Exception arise. It appears like it is not allowed to create a GLCanvas at any given time. (I’ve noticed a similar behaviour in conjunction with texture creation from outside the GLEventListener functions.) Is this a known behaviour?
Should i still add an entry to the issue tracker?
I’ll try to fix the problem by creating just one GLCanvas which will be passed to every tab. I think this should work (and will most likely be more efficient than the current approach)

Thanks for your help.
nop nop nop…

Hi again,

creating one GLCanvas and adding it to various tabs during runtime leads to the same “Unable to set pixel format” GLException.
Creating various tabs (which share the same GLCanvas) in the constructor works but the GLCanvas is visble only on the last tab added to the JTabbedPane. All other Tabs seem to lose there GLCanvas!?! (GLEventListener.display() will no longer be called! Calling glCanvas.display() leads to a call of GLEventListener.display() but nothing will be displayed…)
Well, well, so what now? Nobody else noticed this problems?!?

By the way, i am using java 1.4.2-beta-b19 and jogl 1.1b05 on a win 2k sp 2 box. Maybe i should i try it on linux…

Please go ahead and file a bug.

Hi Ken,
i’ve just opened a bug report. Thanks for your assistance…