Incorrect context on GLCanvas drawable

classic Classic list List threaded Threaded
44 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect context on GLCanvas drawable

lucas.gandel
Hello,

We confirm the Java wrapping of VTK is also impacted by this behavior.
We reproduce the problem described in this post with all the Windows+Nvidia configurations we tried.
Here is our findings in case it helps:

The best workaround we have so far is to turn on the nopixfmt option: sun.awt.nopixfmt=true.
This way we always get a single configuration returned and the expected OpenGL version is used.

Looking at the Win32GraphicsDevice source code, the number of configurations returned as well as the value of the default configuration depends on the default pixel format id.

Maybe using nopixfmt has influence on the default pixel format ID and results in the expected configuration being picked?
Or maybe it has influence on the isDefaultDevice check at the start of getConfigurations()?

Hope this helps,

Best,
Lucas Gandel
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect context on GLCanvas drawable

Martin
Thanks Lucas, I confirm this works.
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect context on GLCanvas drawable

MarcoNL
Yes,

this workaround works for me as well, but in my opinion it would be in any case important to understand why JOGL is creating the incorrect GLContext in GLCanvas when multiple DisplayConfiguration's are returned and GraphicsDevice.getConfigurations() is called.

If there is indeed a defect in JOGL, I believe it would be preferable to fix it rather than relying on a workaround, which by the way may not be viable for everyone (e.g., for applications which indeed need the multiple "separate" GraphicsConfigurations).

Regards and thanks for your time investigating on this issue.

Marco
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect context on GLCanvas drawable

gouessej
Administrator
I'll see what I can do in the little spare time I have.

I thank Lucas for his suggestion.
Julien Gouesse | Personal blog | Website
123