Am Freitag, 4. März 2005 04:39 schrieb Malte Cornils:
LD_PRELOAD should do it. I happen to have an existing library that
could be trivially modified for testing this. Grab libglfps v0.1 from
http://www.dakotacom.net/~donut/programs/libglfps_s.html and edit
src/glfps.c, insert the glFinish() before the call to
real_glXSwapBuffers and you should be good to go. (You could comment
out the update_fps call if you want, although leaving it in would be an
easy way to verify that the library is actually being used.)
Way cool - it works. Great!
BTW, I tested with a different app (TacOps for Linux) and the libglfps trick
does not work. This seems to be a generic issue with LD_PRELOAD for that
game, since the frame counter does not display at all. Also, a rage3d user
reported that she/he was not able to force quake3 to use glfps either.
-Malte