Moved glutInit*() functions ahead of glutInit(). (This is proper use of
glutInit() in general, since it allows the user to override settings via {argc, argv} command-line params.) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@338 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
48f65ac54d
commit
4ccdcf6f4e
@ -250,12 +250,12 @@ int main( int argc, char** argv )
|
|||||||
{
|
{
|
||||||
int menuID, subMenuA, subMenuB;
|
int menuID, subMenuA, subMenuB;
|
||||||
|
|
||||||
glutInit( &argc, argv );
|
|
||||||
|
|
||||||
glutInitDisplayString( "stencil~2 rgb double depth>=16 samples" );
|
glutInitDisplayString( "stencil~2 rgb double depth>=16 samples" );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||||
glutInitWindowPosition( 100, 100 );
|
glutInitWindowPosition( 100, 100 );
|
||||||
|
|
||||||
|
glutInit( &argc, argv );
|
||||||
|
|
||||||
subMenuA = glutCreateMenu( SampleMenu );
|
subMenuA = glutCreateMenu( SampleMenu );
|
||||||
glutAddMenuEntry( "Sub menu A1 (01)", 1 );
|
glutAddMenuEntry( "Sub menu A1 (01)", 1 );
|
||||||
glutAddMenuEntry( "Sub menu A2 (02)", 2 );
|
glutAddMenuEntry( "Sub menu A2 (02)", 2 );
|
||||||
|
Reference in New Issue
Block a user