PDA

View Full Version : rotating,translating, and scaling text



drumminj
11-07-2000, 05:46 AM
Howdy all. I'm trying to display text using wglUseFontOutlines. I'm not having any problems actually displaying the text. However, I do need to rotate and/or translate the text as well as scale it. Each text output is at a different location/orientation, and thus right now I must make a call to glScale*() and then to glTranslate*/glRotate*.

What I am looking for is a way to avoid the multiple calls to glScale*(), since all text will be scaled by the same factor. However, if I make one call to glScale*() and then draw all my text, the amount of translation will be skewed by the scaling factors. Thus, I must push the matrix stack, call glTranslate*() then glScale()*, draw the text, then pop the matrix stack. I could of course scale my translation by the scaling factors, but that introduces a lot of division. Perhaps that's the only way, however. Any suggestions?

thanks in advance

J