PDA

View Full Version : Text, Fonts, etc



TEWarehouse
12-17-2012, 10:05 AM
I have a program that is displaying with openGL.

Its a graphics program very similar to a Photoshop or Corel type program.

Im also using OpenCV (to do a lot of my image manipulations, and other stuff that OpenCV offers).

I want to allow the users to add Text to the image.... Any advice on how to do this with either OpenCV, or OpenGL? Or if not, any suggestions on how to do it?

it seems that neither one of the two support fonts/texts which is kind of surprising to me.

I want to be able to use OpenCV to do things with the lettering as well which will require some image processing...

tonyo_au
12-17-2012, 03:48 PM
Text is not directly supported in OpenGL = the most common way to render text is to create a bitmap of the text and render it with a quad blit. One way is to use this open source http://www.angelcode.com/products/bmfont/

TEWarehouse
12-18-2012, 08:11 AM
I was assuming i had to do something like that.... If anyone has some simple examples i would love to see them before doing a Google search....

tonyo_au
12-18-2012, 04:05 PM
That link has a full working code for OpenGL about half way down the page