I am using Red Hat 7.1 ( kernel smp ) with NVidia drivers 29.60. I installed the NVIDIA_GLX-1.0-2960.i386.rpm and NVIDIA_kernel-1.0-2960.rh71smp.i686.rpm.
This is my current crashed code:
static int sngBuf[] = { GLX_RGBA,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DEPTH_SIZE, 12,
None };
static int dblBuf[] = { GLX_USE_GL,
GLX_RGBA,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DEPTH_SIZE, 1,
GLX_DOUBLEBUFFER,
None };
static int defBuf[] = { GLX_RGBA, None };
dpy = XOpenDisplay ( 0 );
if (0==dpy)
{
fatalError(“could not open display”);
}
/* Step 2. Make sure OpenGL's GLX extension is supported. The
glXQueryExtension also returns the GLX extension's error base and event
base. For almost all OpenGL programs, this information is irrelevant;
hence the use of dummy.*/
if(!glXQueryExtension(dpy, &dummy1, &dummy2))
{
fatalError("X server has no OpenGL GLX extension");
}
2 /* Step 3. Find an appropriate OpenGL-capable visual. Look for double
buffering first; if it is not found, settle for a single buffered visual.*/
vi = glXChooseVisual ( dpy, DefaultScreen(dpy), defBuf/dblBuf/);
if ( 0==vi )
{
vi = glXChooseVisual (dpy, DefaultScreen(dpy), sngBuf);
if ( 0==vi )
{
fatalError(“no RGB visual with depth buffer”);
}
doubleBuffer = false;
}