Computer Aided Automation

Full Version: Simple way to display texts inside openGL 3d/2d world
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
glRasterPos2i(0, 0);
    std::string s = "Some text";
    void * font = GLUT_BITMAP_9_BY_15;

    for (std::string::iterator i = s.begin(); i != s.end(); ++i)
    {
        char c = *i;
        glutBitmapCharacter(font, c);
    }
    glEnable(GL_TEXTURE_2D);