/*
* Prepare the OpenGL state
*/
+ glDisable( GL_LIGHTING );
glDisable( GL_DEPTH_TEST );
glMatrixMode( GL_PROJECTION );
glPushMatrix();
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) );
glutBitmapCharacter( GLUT_BITMAP_HELVETICA_18, *p );
}
-
+
/*
* Revert to the old matrix modes
*/
*/
glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
glEnable( GL_DEPTH_TEST );
+ glEnable( GL_LIGHTING );
}
/*
{
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 );
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