X11, libglx.so, and GL screen capture programs

Christian Parpart trapni at gentoo.org
Thu Jun 1 08:03:04 PDT 2006


On Thursday 01 June 2006 16:14, Adam Jackson wrote:
> On Thursday 01 June 2006 07:58, Christian Parpart wrote:
> > Hi all,
> >
> > I wanted to write an X11 screen catpure program, while XSHM served well
> > for capturing plain X11 screens, it doesn't so well for GLX apps inside
> > X11. So, I asked around, and got the hint to hook into glXSwapBuffers() -
> > which is located in libglx.so - which means, I've to write my own
> > libglx.so to forward all called into the real libglx.so I dlopen myself.
> >
> > That sounds cool, however, I now can't find a real GLX app being linked
> > against libglx.so to test my lib on it. Neither cedega, nor glxgears or
> > even glxinfo is linked against it.
>
> That's because libglx.so is loaded by the server at runtime.  libGL.so is
> the client-side library.

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 :)

Thanks in advance,
Christian Parpart.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20060601/5e1a82aa/attachment.pgp>


More information about the xorg mailing list