<div dir="ltr">Up.<div><br></div><div>Nobody know how to fix it?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 1, 2013 at 5:46 PM, Uli Schlachter <span dir="ltr"><<a href="mailto:psychon@znc.in" target="_blank">psychon@znc.in</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 01.12.2013 17:12, Xavier Bigand wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am trying to make the XCB with OpenGL sample work :<br>
<a href="http://xcb.freedesktop.org/opengl/" target="_blank">http://xcb.freedesktop.org/<u></u>opengl/</a><br>
<br>
I am getting the following error :<br>
X Error of failed request:  BadWindow (invalid Window parameter)<br>
   Major opcode of failed request:  154 (GLX)<br>
   Minor opcode of failed request:  31 (X_GLXCreateWindow)<br>
   Resource id in failed request:  0x2e00004<br>
   Serial number of failed request:  26<br>
   Current serial number in output stream:  30<br>
<br>
<br>
I have a Mint 16 with open sources driver and an ATI card.<br>
<br>
Does it come from the sample code or my configuration?<br>
</blockquote>
<br></div></div>
Disclaimer: I have no clue about OpenGL.<br>
<br>
I replaced the following code (line 76 and following):<br>
<br>
        /* Select first framebuffer config and query visualID */<br>
        GLXFBConfig fb_config = fb_configs[0];<br>
        glXGetFBConfigAttrib(display, fb_config, GLX_VISUAL_ID , &visualID);<br>
<br>
with this:<br>
<br>
        /* Select first framebuffer config and query visualID */<br>
        GLXFBConfig fb_config;<br>
        int config = 0;<br>
        for (config = 0; config < num_fb_configs; config++) {<br>
                fb_config = fb_configs[config];<br>
                visualID = 0;<br>
                glXGetFBConfigAttrib(display, fb_config, GLX_VISUAL_ID , &visualID);<br>
                if (visualID != 0)<br>
                        break;<br>
                fprintf(stderr, "config %d of %d failed\n", config, num_fb_configs);<br>
        }<br>
<br>
This gives me the following output (and then opens a blue window):<br>
<br>
config 0 of 24 failed<br>
config 1 of 24 failed<br>
config 2 of 24 failed<br>
config 3 of 24 failed<br>
<br>
Cheers,<br>
Uli<br>
<br>
P.S.: Could someone with more clue look at this and perhaps improve the example in the wiki? There must be a better way to check if glXGetFBConfigAttrib() failed.<br>
P.P.S.: I left the "select the first[...]" comment in place, although it is now wrong.<br>
</blockquote></div><br></div>