I was wondering how to implement stroke text. I know how to do glRasterPosition() and the code to put raster text on the screen, but I need to use stroke text and am unsure about how to implement it. Thanks
jackhollow
11-26-2003, 02:54 AM
Stroke text is pretty simple to use.
Something like:
// the text
char scrtext[64]= "hello";
// choose a colour
glColor3f(.7, .7, .3);
glPushMatrix();
// where we want it written
glTranslatef(x, y, z);
// how big we want it
glScalef(.1, .1, .1);
for (int c=0; scrtext[c] != 0; ++c)
glutStrokeCharacter(GLUT_STROKE_ROMAN, scrtext[c]);
glPopMatrix();
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.