X11, libglx.so, and GL screen capture programs

Ian Romanick idr at us.ibm.com
Thu Jun 1 09:32:34 PDT 2006

Hash: SHA1

Christian Parpart wrote:

> um, okay, so I have to wrap all 1121 exported functions from libGL.so to trap 
> me into the drawing mechanism.
> Well, is it still possible in just wrapping that (server-side) libglx.so to 
> get what I want? May I assume, that libGL's invokations to glXSwapBuffers 
> (and alike) are send to the X server and this one invokes libXSwapBuffers 
> from the libglx.so (which I have trapped me in to)?
> So, are the GLX functions sematically equivalent between client-side libGL.so 
> and server-side libglx.so?
> If so, I guess sticking with libglx.so to hook me in is a slightly more 
> effecient way to go :)

Hooking libglx.so on most applications will do you no good.  Direct
rendering applications render directly without going to the server.  So,
when most people run Quake, the server never sees the glXSwapBuffers calls.

There should be a way to make a fake libGL that just dlopen's the system
libGL and replaces glXSwapBuffers.

I'm not sure that's good enough, though.  The problem is that when an
app calls glXSwapBuffers, the swap may not happen immediately.  You'd
have to call the system libGL's glXSwapBuffers then call glFinish.
Version: GnuPG v1.4.2.2 (GNU/Linux)


More information about the xorg mailing list