Summary: | "FBConfig null of 0x0" exception when creating external GL context on CentOS 5.5 inside VMWare Server 2.0 | ||
---|---|---|---|
Product: | [JogAmp] Jogl | Reporter: | Wade Walker <wwalker3> |
Component: | x11 | Assignee: | Wade Walker <wwalker3> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | sgothel |
Priority: | --- | ||
Version: | 2 | ||
Hardware: | pc_x86_64 | ||
OS: | linux | ||
Type: | --- | SCM Refs: | |
Workaround: | --- |
Description
Wade Walker
2011-04-10 17:33:42 CEST
Assigned to me, since I'm checking for fixes. This problem is very similar to the one we had on 32-bit Windows trying to get the HDC of an external context. In this case, we can't get the framebuffer config ID of the external context. Working by analogy with the solution in WindowsExternalWGLContext.create(), I made this change in X11ExternalGLXContext.create(): X11GLXGraphicsConfiguration cfg = null; if(1 != GLX.glXQueryContext(display, ctx, GLX.GLX_FBCONFIG_ID, val, 0)) { // sometimes external contexts don't give us a framebuffer config ID; if not, // create and use a default config GLCapabilities glcapsDefault = new GLCapabilities(GLProfile.getDefault()); cfg = X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(glcapsDefault, glcapsDefault, null, x11Screen); if(DEBUG) { System.err.println("X11ExternalGLXContext invalid FBCONFIG_ID "+val[0]+", using default cfg: " + cfg); } } else { cfg = X11GLXGraphicsConfiguration.create(glp, x11Screen, val[0]); } This makes the SWT OneTriangle test pass. I'll try it on an SWT RCP app next. Confirmed that this works correctly for Eclipse RCP apps. Will try tomorrow on native (non-VMWare) CentOS to make sure this doesn't break the common case. Submitted a fix for this at https://github.com/sgothel/jogl/pull/35 (my branch https://github.com/WadeWalker/jogl/tree/2011-04-12-fix-bug-493). I've tested on native CentOS 5.5 with nvidia Quadro, and guest CentOS 5.5 inside VMWare with Mesa, and it works both ways. All test passed on CentOS, see bug 451, comment 3 |