Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: glXChooseVisual is failing

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2005
    Posts
    3

    glXChooseVisual is failing

    Hi,

    I have an opengl program that a client is reporting fails to run. I wrote him a small program to try and find exactly where the problem is and it looks like the issue is choosing the X visual. I'm using the following attributes as input:
    GLX_RGBA,
    GLX_RED_SIZE,4,
    GLX_GREEN_SIZE,4,
    GLX_BLUE_SIZE,4,
    GLX_DOUBLEBUFFER,

    Presumably one of these is attributes is not supported by his visual; however, when I look at his print out of glxinfo, there is a visual listed which matches this minimal criteria

    0x24 24 tc 0 32 0 r y . 8 8 8 8 4 24 8 16 16 16 16 0 0 None

    Or am I reading the output incorrectly. I'm guessing the next thing I was going to try changing the attributes. But I thought I'd try a post to see if anyone has other suggestions. Or if you need more information please let me know.

    Thanks

    -joe

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,126

    Re: glXChooseVisual is failing

    Quote Originally Posted by jmiller
    I have an opengl program that a client is reporting fails to run. I wrote him a small program to try and find exactly where the problem is and it looks like the issue is choosing the X visual. I'm using the following attributes as input:
    GLX_RGBA,
    GLX_RED_SIZE,4,
    GLX_GREEN_SIZE,4,
    GLX_BLUE_SIZE,4,
    GLX_DOUBLEBUFFER,

    Presumably one of these is attributes is not supported by his visual; however, when I look at his print out of glxinfo, there is a visual listed which matches this minimal criteria

    0x24 24 tc 0 32 0 r y . 8 8 8 8 4 24 8 16 16 16 16 0 0 None

    Or am I reading the output incorrectly.
    No, I think you're reading it fine. That looks like my visual 0x24 in glxinfo here (NVidia card).

    That's the same visual I end up with from glXChooseFBConfig if I don't force multisampling.

    Providing this to glXChooseFBConfig works for me. If it works from you, you can binary-search it from there:

    Code :
      static const int Visual_attribs[] =
        {
          GLX_X_RENDERABLE    , True,
          GLX_DRAWABLE_TYPE   , GLX_WINDOW_BIT,
          GLX_RENDER_TYPE     , GLX_RGBA_BIT,
          GLX_X_VISUAL_TYPE   , GLX_TRUE_COLOR,
          GLX_RED_SIZE        , 8,
          GLX_GREEN_SIZE      , 8,
          GLX_BLUE_SIZE       , 8,
          GLX_ALPHA_SIZE      , 8,
          GLX_DEPTH_SIZE      , 24,
          GLX_STENCIL_SIZE    , 8,
          GLX_DOUBLEBUFFER    , True,
          None
        };

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2005
    Posts
    3

    Re: glXChooseVisual is failing

    Thanks for the suggestion. It turns out that the client has both 64 bit and 32 bit versions of gl on his system. The 32 bit version is not picking up the any visuals while the 64 bit version works fine. He's using FC13 with GeForce 9700M. I'm going to suggest that he use the 64 bit version of the software or trying to re-install the 32 bit nvidia drivers. But I wasn't sure if others had run into this issue and/or had ideas to offer.

    Thanks

  4. #4
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,126

    Re: glXChooseVisual is failing

    Wild guess, but I'll bet the 32-bit libGL on his system is a Mesa GL client lib, not an NVidia GL client lib.

    When installing the NVidia drivers on a 64-bit system, you have to tell it you want to install the 32-bit files too.

    To confirm, tell him to try this:

    > nm -Do /usr/lib/libGL.so | egrep -i 'nv|mesa'
    > nm -Do /usr/lib64/libGL.so | egrep -i 'nv|mesa'

    For a given lib, if he gets a bunch of NV symbols, it's an NVidia lib. If he gets a bunch of MESA symbols, it's a Mesa lib.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •