added one more child window (child-of-child) to one demo for testing
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1360 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
4c8096c90c
commit
77ae3c4f4c
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
int g_LeaveGameMode = 0;
|
int g_LeaveGameMode = 0;
|
||||||
int g_InGameMode = 0;
|
int g_InGameMode = 0;
|
||||||
int g_mainwin, g_sw1;
|
int g_mainwin, g_sw1, g_sw2;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Call this function to have some text drawn at given coordinates
|
* Call this function to have some text drawn at given coordinates
|
||||||
@ -109,6 +109,15 @@ void SampleDisplay( void )
|
|||||||
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||||
glutPostWindowRedisplay(g_mainwin);
|
glutPostWindowRedisplay(g_mainwin);
|
||||||
}
|
}
|
||||||
|
else if (win==g_sw2)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Clear the screen
|
||||||
|
*/
|
||||||
|
glClearColor(0.3f,0.3f,0.3f,1);
|
||||||
|
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||||
|
glutPostWindowRedisplay(g_mainwin);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -328,6 +337,11 @@ int main( int argc, char** argv )
|
|||||||
glutSetMenu(subMenuB);
|
glutSetMenu(subMenuB);
|
||||||
glutAttachMenu( GLUT_LEFT_BUTTON);
|
glutAttachMenu( GLUT_LEFT_BUTTON);
|
||||||
|
|
||||||
|
g_sw2=glutCreateSubWindow(g_sw1,50,0,50,50);
|
||||||
|
glutDisplayFunc( SampleDisplay );
|
||||||
|
glutSetMenu(menuID);
|
||||||
|
glutAttachMenu( GLUT_RIGHT_BUTTON );
|
||||||
|
|
||||||
printf( "Testing game mode string parsing, don't panic!\n" );
|
printf( "Testing game mode string parsing, don't panic!\n" );
|
||||||
glutGameModeString( "320x240:32@100" );
|
glutGameModeString( "320x240:32@100" );
|
||||||
glutGameModeString( "640x480:16@72" );
|
glutGameModeString( "640x480:16@72" );
|
||||||
|
Reference in New Issue
Block a user