Skip to content

Instantly share code, notes, and snippets.

@KAYLukas
Created June 16, 2012 16:35
Show Gist options
  • Save KAYLukas/2941881 to your computer and use it in GitHub Desktop.
Save KAYLukas/2941881 to your computer and use it in GitHub Desktop.
MessageDisplayer met stroking characters
void MessageDisplayer::draw(){
glRasterPos2i(xOffset, yOffset);
//Loop through all messages, starting with the first added one
//up to the last added one
for(int i=0; i < 10; i++){
int ai = (curr+i)%10;
Handle<DisplayMessage> mh = messages[ai];
if(!mh) continue;
DisplayMessage *m = &*mh;
if(!m) continue;
string message = m->toString();
glPushMatrix();
glTranslatef(xOffset, yOffset + (18*i),0.0);
glScalef(0.15,-0.15,0);
for(int count=0; count < message.length(); count++){
glutStrokeCharacter(GLUT_STROKE_ROMAN, message[count]);
}
glPopMatrix();
}
}
@timvdalen
Copy link

Scalen lijkt me niet echt een goede optie. Dan gaan we eerst grote lijnen tekenen en ze vervolgens weer klein maken. Is er geen manier om glutStrokeCharacter kleine lijnen te laten tekeken?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment