Last active
April 28, 2020 05:53
-
-
Save rajan9519/b8e33d71b04c9b71c8869a8720cd69d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void drawBitmapString(int x,int y,std::string s) | |
| { | |
| glColor3f(1.0f,1.0f,1.0f); // sets color of the text | |
| glRasterPos2f(x, y);// screen coordinate at which text will appear | |
| int length = s.size(); | |
| // writing charater by charater on the screen | |
| for(int i=0;i<length;i++) | |
| { | |
| glutBitmapCharacter( GLUT_BITMAP_HELVETICA_18, s[i]); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment