Click here to Skip to main content
15,844,498 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I want to draw text in my win32 app using opengl without glut. I tried with free type 2 library but i fail to load font file for it.

Please help me to fix this issue.

Thanks.
Posted
Updated 6-Apr-12 3:51am
v2
Comments
JackDingler 6-Apr-12 13:55pm    
Do you get an error code when the load font routine fails?

you can create texture map containing all font characters.. then draw the font by proper texture mapping..
If you don't want fixed font , you can also create a 3d file (like obj or 3ds) containing meshes of characters. then load it and render it..
 
Share this answer
 
We can use wglUseFontBitmaps function to draw text in OpenGL.
MSDN[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900