[Wine] Tip: Overlay frames per second on fullscreen 3d games
wineforum-user at winehq.org
Tue Jun 14 05:33:06 CDT 2011
It's often handy to be able to see the current frames per second when testing a game under wine as it allows you to pinpoint where frame rate problems occur and how serious they are. It's easy to get the framerate from wine by setting WINEDEBUG=fps. However, it's not easy to track framerate changes as you play when the game runs fullscreen. Fraps is a good solution to this problem under Windows but the FPS measuring functionality does not work under Wine (see bug #23765).
I found it's actually easy to view the current fps by using `osd_cat` to
overlay output from WINEDEBUG=fps on the screen. Just launch your program
WINEDEBUG=fps wine MYAPP.exe 2>&1 | tee /dev/stderr | grep --line-buffered "^trace:fps:" | osd_cat`
osd_cat is provided by xosd-bin on Debian/Ubuntu. Check the man page for ways of configuring it if the defaults aren't too your liking. I tee to /dev/stderr so output is still shown in the terminal. If the trace:fps lines show more information than you want you could use sed to grab just the current fps, and pass --lines=1 to osd_cat to get something more fraps-like.
I haven't observed any cases where the act of overlaying this fps information has a measurable difference on the observed framerate (Nvidia binary drivers on Ubuntu 11.04). Just thought I'd share because I find it to be pretty useful, and am interested any other related tips or ideas for improvement.
More information about the wine-users