Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void menu::render(){
- glDisable(GL_LIGHTING);
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
- gluOrtho2D(0.0, 0, 0.0, 0);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
- // Napisy
- string s1="Chuj do dupy!";
- DrawString(-0.8,0.8,s1,1,0,0);
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glEnable(GL_LIGHTING);
- }
- void menu::DrawString( GLfloat x, GLfloat y, string string, float c1, float c2, float c3 )
- {
- //kolor
- glColor4f(c1,c2,c3,1);
- // położenie napisu
- glRasterPos2f( x, y );
- // wyświetlenie napisu
- for( int i = 0; i < string.length(); i++ ){
- //cout<<string[i];
- glutBitmapCharacter( GLUT_BITMAP_TIMES_ROMAN_24, string[ i ] );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement