X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=progs%2Fdemos%2FOne%2Fone.c;h=627630e637dd143540f04b7706c22bb0e93681c0;hb=0c26580b96f8e2f431489049be61077bd24dd21d;hp=7a714f4666720970643fda556f613387a381b843;hpb=0647e9f98125009ed8710eb9a9f32793a9a8f0b2;p=freeglut diff --git a/progs/demos/One/one.c b/progs/demos/One/one.c index 7a714f4..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 ); } /* @@ -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