projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
size of cuboctahedron in shapes demo now in line with other shapes. and
[freeglut]
/
progs
/
demos
/
One
/
one.c
diff --git
a/progs/demos/One/one.c
b/progs/demos/One/one.c
index
b5d9732
..
464c2bf
100644
(file)
--- a/
progs/demos/One/one.c
+++ b/
progs/demos/One/one.c
@@
-277,13
+277,18
@@
void SampleSpecial( int nSpecial, int nMouseX, int nMouseY )
*/
void SampleMenu( int menuID )
{
*/
void SampleMenu( int menuID )
{
- /*
- * Just print something funny
- */
printf( "SampleMenu() callback executed, menuID is %i\n", menuID );
}
/*
printf( "SampleMenu() callback executed, menuID is %i\n", menuID );
}
/*
+ * A sample menu status callback
+ */
+void SampleMenuStatus( int status, int x, int y )
+{
+ printf ( "SampleMenu() callback executed, MenuStatus is %i at (%i,%i)\n", status, x, y );
+}
+
+/*
* The sample's entry point
*/
int main( int argc, char** argv )
* The sample's entry point
*/
int main( int argc, char** argv )
@@
-325,6
+330,7
@@
int main( int argc, char** argv )
glutSpecialFunc( SampleSpecial );
glutIdleFunc( SampleIdle );
glutEntryFunc( SampleEntry );
glutSpecialFunc( SampleSpecial );
glutIdleFunc( SampleIdle );
glutEntryFunc( SampleEntry );
+ glutMenuStatusFunc( SampleMenuStatus );
glutAttachMenu( GLUT_LEFT_BUTTON );
glutInitWindowPosition( 200, 200 );
glutAttachMenu( GLUT_LEFT_BUTTON );
glutInitWindowPosition( 200, 200 );
@@
-334,6
+340,8
@@
int main( int argc, char** argv )
glutKeyboardFunc( SampleKeyboard );
glutSpecialFunc( SampleSpecial );
glutIdleFunc( SampleIdle );
glutKeyboardFunc( SampleKeyboard );
glutSpecialFunc( SampleSpecial );
glutIdleFunc( SampleIdle );
+ glutEntryFunc( SampleEntry );
+ glutMenuStatusFunc( SampleMenuStatus );
glutAttachMenu( GLUT_LEFT_BUTTON );
glutSetMenu(subMenuA);
glutAttachMenu( GLUT_RIGHT_BUTTON );
glutAttachMenu( GLUT_LEFT_BUTTON );
glutSetMenu(subMenuA);
glutAttachMenu( GLUT_RIGHT_BUTTON );
@@
-367,6
+375,8
@@
int main( int argc, char** argv )
glutReshapeFunc( SampleReshape );
glutKeyboardFunc( SampleGameModeKeyboard );
glutIdleFunc( SampleIdle );
glutReshapeFunc( SampleReshape );
glutKeyboardFunc( SampleGameModeKeyboard );
glutIdleFunc( SampleIdle );
+ glutEntryFunc( SampleEntry );
+ glutMenuStatusFunc( SampleMenuStatus );
glutSetMenu(menuID);
glutAttachMenu( GLUT_LEFT_BUTTON );
glutSetMenu(menuID);
glutAttachMenu( GLUT_LEFT_BUTTON );