Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple way to display texts inside openGL 3d/2d world
#1
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);
Reply
#1
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);
Reply
CAA


Forum Jump:


Users browsing this thread: 1 Guest(s)