First post, by thp
In a different forum, the question came up if it's possible to measure FPS for Glide API games (like Fraps does for OpenGL and Direct3D games). Here's my take on the challenge (please let me know if there's already such a tool 😀), it provides a drop-in glide2x.dll and will forward all Glide calls to the "real" glide2x.dll which should be renamed to glide2y.dll. I tested this on Windows 98 SE with the Wing Commander Prophecy 3Dfx Test and dgVoodoo, but it should work with any Glide 2.x game and a real Voodoo (but I haven't tested it).
What the modified glide2x.dll will do is forward all calls to glide2y.dll, except for grBufferSwap(), which will first count FPS, and every second write a new line to "fps.txt" with the current FPS, and then call the "real" grBufferSwap() to update the screen. So after running a game, it's possible to look what the FPS were by opening fps.txt.
In the future, it would be possible to also render the FPS on-screen, but it needs some tracking of the Glide state machine (in a test, I was already able to render something, but it requires forcing the Glide state, disabling rendering features such as depth testing, blending, fog and chroma keying).