added entry callback to one demo

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1358 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2012-07-22 10:03:36 +00:00
parent 662a168536
commit 7cdcd49c93

View File

@ -174,6 +174,13 @@ void SampleIdle( void )
} }
} }
void SampleEntry(int state)
{
int window = glutGetWindow () ;
printf ( "Window %d Entry Callback: %d\n", window, state ) ;
glutPostRedisplay () ;
}
/* /*
* The reshape function * The reshape function
*/ */
@ -302,6 +309,7 @@ int main( int argc, char** argv )
glutKeyboardFunc( SampleKeyboard ); glutKeyboardFunc( SampleKeyboard );
glutSpecialFunc( SampleSpecial ); glutSpecialFunc( SampleSpecial );
glutIdleFunc( SampleIdle ); glutIdleFunc( SampleIdle );
glutEntryFunc( SampleEntry );
glutAttachMenu( GLUT_LEFT_BUTTON ); glutAttachMenu( GLUT_LEFT_BUTTON );
glutInitWindowPosition( 200, 200 ); glutInitWindowPosition( 200, 200 );