glxChooseVisual() returning null

hi,

i’m running solaris 8 (sorry for the non-linux, platform, but this seemed the best place to post) on basically as brand-new sun box with the pre-installed sun openGL implementation and i’m trying to grapple with GLX to open a window.

i’m having the problem that calling glxChooseVisual() with the following set of attributes:

{GLX_DEPTH_SIZE, 16, GLX_DOUBLEBUFFER, None}

is returning null, and hence my program exits at this point. I don’t seem to have glxinfo installed and so can’t provide the output from there. does anyone have any suggestions?

many thanks,

s.

From the man page: “If no conforming visual exists,
NULL is returned.” I suspect that the implementation
does not work well with what are default values for
the attributes you have not specified… Does this
make sense?

Try providing other attributes and see if you get
any visual back… I use various linux OGL implem.,
nVidia, DRI-MESA/Voodoo, DRI-MESA/ATi, and there
seems to be no problem with the following:

int glx_attr[] ={ GLX_RGBA,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DOUBLEBUFFER,
GLX_DEPTH_SIZE, 1,
None };

And to state the obvious, please make sure you are
provding the right display, screen, etc

thanks a lot, that’s woking now :slight_smile:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.