Loading GL/GLX extensions
Loading GL/GLX extensions
- Subject: Loading GL/GLX extensions
- From: Nicolas Holzschuch <email@hidden>
- Date: Fri, 17 Oct 2003 17:40:17 +0200
Hello,
I haven't completely read the archives, but I have followed the list
for quite some time, and I don't remember seeing this topic arising.
The proper way to check whether a new GL extension is supported is
through glXGetProcAddress. Thus, if I want to call a fragment program,
I am supposed to get the address of the glProgramStringARB function:
glProgramStringARB = (PFNGLPROGRAMSTRINGARBPROC)
glXGetProcAddress((GLubyte*) "glProgramStringARB");
*before* I call this function in my own program:
glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB,
GL_PROGRAM_FORMAT_ASCII_ARB, strlen(pixelCode), pixelCode);
Thus, I can write code that will compile on several platforms, and will
check for the availability of the extensions upon execution. The
advantage, also, is that if I compile on machine A, and launch the
executable on machine A, with display set to machine B, the
glXGetProcAddress function will ask for availability of the Fragment
Program extension on machine B, like it should.
I noticed that there isn't a glXGetProcAddress function in the headers
in /usr/X11R6/include/GL.
So, here is my question:
- how am I supposed to check for the availability of an extension?
(ARB_Fragment_program, NV_occlusion_query, and so on)
--
Greetings,
Nicolas Holzschuch
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.