X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=progs%2Fdemos%2FOne%2Fone.c;h=627630e637dd143540f04b7706c22bb0e93681c0;hb=0c26580b96f8e2f431489049be61077bd24dd21d;hp=20349dff2a482380f424db733b2ccf3c21373300;hpb=f40369c118b216090e4475bf86a60d0db9017b80;p=freeglut diff --git a/progs/demos/One/one.c b/progs/demos/One/one.c index 20349df..627630e 100644 --- a/progs/demos/One/one.c +++ b/progs/demos/One/one.c @@ -35,6 +35,7 @@ void PrintText( int nX, int nY, char* pszText ) /* * Prepare the OpenGL state */ + glDisable( GL_LIGHTING ); glDisable( GL_DEPTH_TEST ); glMatrixMode( GL_PROJECTION ); glPushMatrix(); @@ -56,14 +57,14 @@ void PrintText( int nX, int nY, char* pszText ) glLoadIdentity(); /* - * Now the main text + * Now the main text */ glColor3ub( 0, 0, 0 ); glRasterPos2i( nX, nY ); for( p=pszText, lines=0; *p; p++ ) { - if( *p == '\n' ) + if( *p == '\n' ) { lines++; glRasterPos2i( nX, nY-(lines*18) ); @@ -71,7 +72,7 @@ void PrintText( int nX, int nY, char* pszText ) glutBitmapCharacter( GLUT_BITMAP_HELVETICA_18, *p ); } - + /* * Revert to the old matrix modes */ @@ -86,6 +87,7 @@ void PrintText( int nX, int nY, char* pszText ) */ glColor4f( 1.0f, 1.0f, 1.0f, 1.0f ); glEnable( GL_DEPTH_TEST ); + glEnable( GL_LIGHTING ); } /* @@ -250,12 +252,12 @@ int main( int argc, char** argv ) { int menuID, subMenuA, subMenuB; - glutInit( &argc, argv ); - glutInitDisplayString( "stencil~2 rgb double depth>=16 samples" ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); glutInitWindowPosition( 100, 100 ); + glutInit( &argc, argv ); + subMenuA = glutCreateMenu( SampleMenu ); glutAddMenuEntry( "Sub menu A1 (01)", 1 ); glutAddMenuEntry( "Sub menu A2 (02)", 2 ); @@ -311,7 +313,7 @@ int main( int argc, char** argv ) printf( "current window is %ix%i+%i+%i", glutGet( GLUT_WINDOW_X ), glutGet( GLUT_WINDOW_Y ), glutGet( GLUT_WINDOW_WIDTH ), glutGet( GLUT_WINDOW_HEIGHT ) - ); + ); /* * Enter the main FreeGLUT processing loop