Original Post
I'm trying to use the point sprite extention for a particle system which works great in windows, but my instructor wants it to be in Linux. (fun fun!) I don't thing I'm loading the functions correctly. This is what I have, forgive me if its horribly wrong. I get a segmentation fault everytime. If anyone knows of any other way to load extensions in linux please let me know. As of right know, I need to figure out why this doesn't work.
#include <dlfcn.h>
int (*glPointParameterfARB)(GLenum, const GLfloat);
int (*glPointParameterfvARB)(GLenum, const GLfloat*);
void *libHandle = dlopen("libgl.so", RTD_LAZY);
glPointParameterfARB)(GLenum, const GLfloat)dlsym(libHandle, "glPointParameterfARB");
glPointParameterfvARB)(GLenum, const GLfloat*)dlsym(libHandle, "glPointParameterfvARB");
then my calls are
float quadric[] = {1.0f, 0.0f, 0.01f};
(*glPointParameterfvARB)(GL_POINT_DISTANCE_ATTENUATION_ARB, quadric);
(*glPointParameterfARB)(GL_POINT_FADE_THRESHOLD_SIZE_ARB, 60.0f);
(*glPointParameterfARB)(GL_POINT_SIZE_MAX_ARB, 5.0f);
(*glPointParameterfARB)(GL_Point_SIZE_MIN_ARB, 1.0f);