View Full Version : string text rotation
05-06-2002, 11:51 PM
I need to use a string text rotated, but as I understand from a previuos question in this forum, bitmap can't be used since these are rendered from a raster position horizontally.
Then I tried to use FTGL library (Unix version) but I cannot render the glyph correctly. Is there any place where to find simple examples of OpenGl with FTGL calls?
Is there a better approch ? Since want to render strings from many different fonts I do not want use Glut.
05-07-2002, 12:21 AM
I don't know FTGL but mapping triangles/quad with appropriates texture coordinates seems to be a common way the raster text in OpenGL(use of a bitmap discribing your entire font)
take look to : http://www.gametutorials.com/Tutorials/OpenGL/OpenGL_Pg3.htm
the two font tutorials should help you.
05-07-2002, 04:52 AM
Thanks for your reply.
It is very hard to find something good at that site - only Vc++ and Windows instead of simple c code and Unix -
If I use something like this:
fontInfo = XLoadQueryFont(xdisplay,
id1 = fontInfo->fid;
first1 = fontInfo->min_char_or_byte2;
last1 = fontInfo->max_char_or_byte2;
base1 = glGenLists((GLuint) last1+1);
glXUseXFont(id1, first1, last1-first1+1, base1+first1);
how can I retrieve or use bitmap for texture generation in
glTexImage2D(GL_TEXTURE_2D, 0,/* level */
3,/* components */
0, /* border */
05-10-2002, 07:30 AM
If anyone is interested I found a good example from Mark J. Kilgard see: http://www.niksula.cs.hut.fi/~ti111300/examples/OpenGL/textfun.c
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.