comparison src/video/x11/SDL_x11gl.c @ 566:d6e7d7006062

Enable the glXGetProcAddressARB code (fixes problems with NVidia drivers)
author Sam Lantinga <slouken@libsdl.org>
date Mon, 20 Jan 2003 00:25:28 +0000
parents 8a43e0cbf02f
children b0108e9dea53
comparison
equal deleted inserted replaced
565:7d7e19b59866 566:d6e7d7006062
412 static char procname[1024]; 412 static char procname[1024];
413 void* handle; 413 void* handle;
414 void* retval; 414 void* retval;
415 415
416 handle = this->gl_config.dll_handle; 416 handle = this->gl_config.dll_handle;
417 #if 0 /* This doesn't work correctly yet */
418 if ( this->gl_data->glXGetProcAddress ) { 417 if ( this->gl_data->glXGetProcAddress ) {
419 void *func, *func2; 418 return this->gl_data->glXGetProcAddress(proc);
420 func = this->gl_data->glXGetProcAddress(proc); 419 }
421 func2 = dlsym(handle, proc);
422 if ( func != func2 ) {
423 fprintf(stderr, "glXGetProcAddress returned %p and dlsym returned %p for %s\n", func, func2, proc);
424 }
425 return this->gl_data->glXGetProcAddress(proc);
426 }
427 #endif
428 #if defined(__OpenBSD__) && !defined(__ELF__) 420 #if defined(__OpenBSD__) && !defined(__ELF__)
429 #undef dlsym(x,y); 421 #undef dlsym(x,y);
430 #endif 422 #endif
431 retval = dlsym(handle, proc); 423 retval = dlsym(handle, proc);
432 if (!retval && strlen(proc) <= 1022) { 424 if (!retval && strlen(proc) <= 1022) {