View Full Version : 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.
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.
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 http://www.opengl.org/discussion_boards/ubb/smile.gif
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 http://www.opengl.org/discussion_boards/ubb/smile.gif
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() :P 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 http://www.opengl.org/discussion_boards/ubb/smile.gif
hmm... think I spelt his name right. been a while since I read it.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.