Could anyone please pointer me how to replace TextOut with OpenGL in 2D, I want to change the font name, font height, font orientation, also the Text ouput change with scale.
Thanks
Could anyone please pointer me how to replace TextOut with OpenGL in 2D, I want to change the font name, font height, font orientation, also the Text ouput change with scale.
Thanks
Thanks for your reply. I did try both Bitmap Font and Outline Font, the Bitmap font can not scale with windows, and the Outline Font seems a little slow compared with GDI TextOut and Bitmap Font, any other better way to do this? I mean almost the same function like GDI TextOut function.
Thanks
Does GDI textout scale with scale?
Use Bitmapfonts but create a new set when the windowsize changes ( it shouldnt change that often)
Yes, TextOut does not scale with scale, the font size need to be calculated.
But I can not get the Bitmapfonts rotate, the CreateFont(…) does not work, could anyone help to rotate Bitmapfonts ?
Thanks
For arbitrary rotation and simple scaling of fonts, use font textures and render textured quads.
Here’s an official GLUT example: http://www.opengl.org/resources/code/samples/glut_examples/texfont/texfont.html
There are font libraries using OpenGL on the web as well, GLTT, FTGL, etc. (not used myself though).