Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > OpenGL 3D API > Writing rows of...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 4829 of 4976
Post > Topic >>

Writing rows of character strings

by Jonathan Campbell <jg.campbell.ng@[EMAIL PROTECTED] > Jul 9, 2008 at 03:57 PM

I'm able to annotate OpenGL graphics using the following function.

void
drawstr(GLdouble x, GLdouble y, GLdouble z, const char* s,
         GLvoid *font_style){
   const char *p = s;
   glRasterPos3d(x, y, z);
   for (; *p; p++){
     glutBitmapCharacter(font_style, *p);
   }
}

glRasterPos3d appears to position appropriately according to the current
value of MODELVIEW_MATRIX.

But I now want to write three rows of characters (the top three rows of 
the modelview matrix in fact) rather than just one.

Any suggestions as to how to position the second and third rows?

For what it's worth, I'm using:

GLvoid *font_style = GLUT_BITMAP_9_BY_15;

I have read about glWindowPos, but it doesn't seem to help.

TIA,

Jon C.
 




 3 Posts in Topic:
Writing rows of character strings
Jonathan Campbell <jg.  2008-07-09 15:57:14 
Re: Writing rows of character strings
fungus <openglMYSOCKS@  2008-07-09 16:06:10 
Re: Writing rows of character strings
Jonathan Campbell <jg.  2008-07-10 11:12:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 14:54:35 CDT 2008.