Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void mostrarTexto(const char *str, float posX, float posY, float color[4], void *font)
- {
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
- glOrtho(0, m_width, 0, m_heigth, -1.0, 1.0f);
- glPushAttrib(GL_CURRENT_BIT);
- glColor4fv(color);
- glRasterPos2i(posX, posY);
- while (*str)
- {
- glutBitmapCharacter(font, *str);
- ++str;
- }
- glPopAttrib();
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
- }
Advertisement
Add Comment
Please, Sign In to add comment