Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
glx11.cpp(51) assert "fbc" failed
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mvogt1  
View profile  
 More options Oct 5 2012, 5:05 am
From: mvogt1 <mvo...@gmail.com>
Date: Fri, 5 Oct 2012 02:05:09 -0700 (PDT)
Local: Fri, Oct 5 2012 5:05 am
Subject: [patch] glx11.cpp(51) assert "fbc" failed

Hello,

when using wxWidgets 2.9.4 with the open GL example from:

http://wiki.wxwidgets.org/WxGLCanvas#wxGLCanvas_sample

I get an error:

./src/unix/glx11.cpp(51): assert "fbc" failed in wxGLContext(): invalid
GLXFBConfig for OpenGL

This error only occurs in the indirect rendering case, where the X11 server
runs nvidia 295.71 and the remote/local libGL is Mesa-7.3-3.2
(Suse Linux Enterprise 11)
I have not tested other Mesa implementations.

The function which fails is in glx11.cpp: wxGLCanvasX11::InitXVisualInfo

*pFBC = glXChooseFBConfig(dpy, DefaultScreen(dpy), data, &returned);

The problem here is the attribute list. I have printed the data attributes,
they
contain:

data[0]=5 GLX_DOUBLEBUFFER
data[1]=1
data[2]=12 GLX_DEPTH_SIZE
data[3]=16

I then override it with:

data[0]=0;data[1]=0

but even this call fails in this scenario.
The only thing which seems to work is to pass NULL.

So I came up with this first test ("patch")

*pFBC = glXChooseFBConfig(dpy, DefaultScreen(dpy), data, &returned);
if ( *pFBC == NULL) {
        printf("No Framebuffer. Fallback to NULL as last resort\n");
        *pFBC = glXChooseFBConfig(dpy, DefaultScreen(dpy), NULL, &returned);

}

This completely ignores the given attributes, but works in my
case.
The caller of the function is wxGLCanvasBase::IsDisplaySupported and
wxGLCanvasX11::InitDefaultVisualInfo and this goes back to
the top level in the example:

int args[] = {WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0};

replacing args with NULL does not help, because the pointer data is
replaced with something != NULL in InitXVisualInfo and even
an empty attribute list fails.

Attached is a smaller demo program.

regards,

Martin

  gl.cpp
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[patch] glx11.cpp(51) assert "fbc" failed" by Vadim Zeitlin
Vadim Zeitlin  
View profile  
 More options Oct 5 2012, 8:51 am
From: Vadim Zeitlin <va...@wxwidgets.org>
Date: Fri, 5 Oct 2012 14:51:13 +0200
Local: Fri, Oct 5 2012 8:51 am
Subject: Re: [wx-dev] [patch] glx11.cpp(51) assert "fbc" failed

On Fri, 5 Oct 2012 02:05:09 -0700 (PDT) mvogt1 wrote:

m> when using wxWidgets 2.9.4 with the open GL example from:
m>
m> http://wiki.wxwidgets.org/WxGLCanvas#wxGLCanvas_sample

 Do the OpenGL samples included in wxWidgets, e.g. samples/opengl/cube,
fail for you as well? I expect they do but just to be sure.

m> This error only occurs in the indirect rendering case, where the X11 server
m> runs nvidia 295.71 and the remote/local libGL is Mesa-7.3-3.2
m> (Suse Linux Enterprise 11)
m> I have not tested other Mesa implementations.

 I don't have the possibility to test this case unfortunately...

m> So I came up with this first test ("patch")
m>
m> *pFBC = glXChooseFBConfig(dpy, DefaultScreen(dpy), data, &returned);
m> if ( *pFBC == NULL) {
m>   printf("No Framebuffer. Fallback to NULL as last resort\n");
m>   *pFBC = glXChooseFBConfig(dpy, DefaultScreen(dpy), NULL, &returned);
m> }
m>
m> This completely ignores the given attributes, but works in my
m> case.

 I have trouble believing that this would be the right thing to do...
Completely ignoring the attributes just doesn't seem to be right. And
passing NULL is different from ignoring the attributes too, see
http://www.opengl.org/sdk/docs/man/xhtml/glXChooseFBConfig.xml

 I don't know much about OpenGL and in particular don't know what is
special about this "indirect rendering case" but I still think there must
be some way to specify the attributes even then. If you can find more about
it, please let us know.

 Thanks and good luck,
VZ

  application_pgp-signature_part
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »