Overlaying text

Is it possible to overlay text on a 3d viewport?

For instance if I wanted to show the current angles of all the axis of my robotic arm on screen in the upper left hand corner. Have them update as the angles change.

A 000.000
B 000.000
C 000.000
D 000.000
E 000.000
F 000.000

Take a look at http://nate.scuzzy.net/gltexfont I wrote a library to draw text in OpenGL that will do exactly what you need.

Nate http://nate.scuzzy.net

Thanks Nate. I’ll check it out.

I did find a good thread on the subject right here. I just wasnt using the correct search words

One thing Im worried about is running out of stack space. From what I read in the other thread, I have to Push and Pop a few more times per refresh. I read somewhere on this site that the stack is limited … I think.

Im already Pushing 7 deep to keep the limbs on my bot in sync. But it really surprises me how fluid the motion is, even when the window is maximized. And on an AMD 233 w/ 16meg TNT.

OpenGL is just da spit

I’ll let ya know how things go if I get your stuff workin.

I got your lib up and running in no time. Really nice work you’ve done there. I dont think it could get much easier than this. I havent really tweaked it any. I just slapped the Axis identifiers in with some settings you gave in your example.

I just wish MFC was a simple as OpenGL can be. The toughest thing I encountered was where to put fontLoad() :stuck_out_tongue: I just plopped it in the View::OnCreate() for now. GL had initialized by then so…

Do you think it would be possible to extract TTF and FON params, convert them into formats your routines, or new routines could read?

I vaguely remember bit blitting fonts when I was deep in an Andre Lamonthe book

hmm… think I spelt his name right. been a while since I read it.