On Fri, 28 Feb 2003 22:13:22 -0800 Ian Romanick <[EMAIL PROTECTED]> wrote:
Felix K�hling wrote:
Hello,
I just started working on a revision of the DRI Configuration design doc based on the feedback I received. As Brian suggested I want to implement the functionality for acquiring available configuration options in libGL. I had a look at xc/lib/GL/dri and it looks as if dri_glx.[ch] would be the right place. Is that correct?
Actually, you should probably look in xc/lib/GL/glx/glxcmd.c. I would add a new function that returns the options. Programs would get a pointer to this function via glXGetProcAddress. You'd have to add the function to the table in glxcmd.c.
The stuff in xc/lib/GL/dri gets compiled into the client-side driver. The stuff in xc/lib/GL/glx gets compiled into libGL.so.
Good to know ;)
How would the new functions be exported to client applications? They are obviously not declared in any standard header files. An interested client would also have to do some version checking in order to test whether the new functions are really available. And it would have to check if libGL is from DRI in the first place. How would all this work?
Programs would know whether or not the function exists by the return value of glXGetProcAddress. If it returns NULL, it ain't there. :)
We had a discussion before about adding some sort of configuration to GLX. Does an application need a GLX context before it can call glXGetProcAddress?
No. See the GLX_ARB_get_proc_address extension spec.
If it does, then I'd prefer Brian's dlopen/dlsym approach. It basically does the same job as glXGetProcAddress.
If your app is linked with libGL, you could use glXGetProcAddress() to get the internal symbol. While strickly speaking, glXGetProcAdddress() wasn't meant for obtaining internal libGL symbols, I believe we can safely use it that way in this case.
-Brian
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel
