an update on my predicament, for anyone who’s still interested
I have a small program that I cribbed from somewhere, unfortunately I can’t remember where right now …but the important thing is that if I build it on my Radeon equipped PC, with a clean Mandrake8.0 install, it builds fine (I chose the “experimental hardware acceleration option” when I installed). If I try to build it on my nVidia PC, then I get linker errors regarding the GLX functions.
any ideas?
for reference, here’s the small app I’m trying to compile…the semantics are unimportant really, the link error is the main thing…
#include <GL/glx.h>
#include <GL/gl.h>
#include <stdio.h>
#include <stdlib.h>
static Bool WaitForNotify(Display *d, XEvent *e, char *arg)
{
return (e->type == MapNotify) && (e->xmap.window == (Window) arg);
}
static int sAttribList[] = {
GLX_RGBA,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
None };
int main(void)
{
Display *dpy;
XVisualInfo *vi;
XSetWindowAttributes swa;
Window win;
GLXContext cx;
XEvent event;
int swap_flag = GL_FALSE;
dpy = XOpenDisplay(0);
if ((vi = glXChooseVisual(dpy, DefaultScreen(dpy), sAttribList)) == NULL) {
fprintf(stderr, "ERROR: Can't find suitable visual!
");
return 0;
}
cx = glXCreateContext(dpy, vi, 0, GL_TRUE);
swa.colormap = XCreateColormap(dpy, RootWindow(dpy, vi->screen),
vi->visual, AllocNone);
swa.border_pixel = 0;
swa.event_mask = StructureNotifyMask;
win = XCreateWindow(dpy, RootWindow(dpy, vi->screen), 0, 0, 100, 100, 0,
vi->depth, InputOutput,
vi->visual,
CWBorderPixel | CWColormap | CWEventMask,
&swa);
XMapWindow(dpy, win);
XIfEvent(dpy, &event, WaitForNotify, (char *)win);
glXMakeCurrent(dpy, win, cx);
/* ... */
}
thanks for any help
S