Hello OpenGL professionals,
My OpenGL-based Win32 application is capable of displaying text in OpenGL window using two methods: bitmap fonts (wglUseFontBitmaps and so on) and texture-mapped fonts.
I expected texture-mapped fonts to give better performance on most NVIDIA chipsets starting from RIVA TNT2, especially for large amounts of text drawn.
While it is like that (or at least performance of both text drawing methods is the same) on Win2k SP3 station with PIV 2.4GHz/HT 1 Gb RAM NVIDIA GeForce FX 5600, I have got significant (about two or three times!!!) performance regression using texture-mapped fonts (as compared to bitmap fonts) on WinXP SP2 with PIV 2.4GHz/HT 1 Gb RAM NVIDIA GeForce FX 5500.
Hopefully, one of NVIDIA hardware experts will read this message…I need at least some hint about possible reasons for such results…probably, the world has changed since most classic articles on OpenGL-based text output were written…probably, raster images are currently “well hardware-accelerated”…
Thanks in advance!
Disclaimer: The following is AFAIK.
Originally posted by sansan:
probably, raster images are currently “well hardware-accelerated”…
Quite the opposite. For every iteration of hardware, it pulls away more and more from setting individual pixels “manually”. There has been some advancements in hardware interface to cards recently, from the PCI bus based cards (a decade ago) to APG port to the PCI-<whatever> bus (the confusion in that area always gets me).
Anyway, the gfx cards of today (and yesteryear, back to… GeForce/ATI7000-level?) are usually way more potent ways to render text using quads and a glyph texture, than manually setting gazillions of pixel/second manually.
If you experience a measurable relative performace decrease using quads and a glyph texture; are you perchance not disabling GPU programs while drawing the glyps? Perhaps even more states not needed are enabled?
As a last resort, I will probably dig in enabled/disabled state parameters (at the first glance, they are OK: I enable 2d textures, bkending and alpha test right before drawing a string, and I don’t use shaders - is it that bad?).
What surprises my most is why there is such a noticeable difference in the application behavior between these two more-or-less close stations…Driver settings are all defaults on both…
sansan there are dozens of way to render texture mapped fonts. You should expose us yours so that we could eventually point out where there might be some problem(s).
Also look in here, there are a few recent posts about font rendering.
SeskaPeel, thanks for an idea to look through related posts - I have found something very similar to my problem (even not related directly to text rendering ;-)): http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=013019 (the initial post - I also use 45.23 under WIn2k, while drivers are much newer on WinXP station).
The only thing I has to do now is to decode VBO into human-readable form (( I guess VAR stands for “vertex arrays” or something like that…