Update of /cvsroot/plib/plib/examples/src/pui
In directory usw-pr-cvs1:/tmp/cvs-serv25822/examples/src/pui
Modified Files:
simple.cxx
Log Message:
Minor optimizations
Index: simple.cxx
===================================================================
RCS file: /cvsroot/plib/plib/examples/src/pui/simple.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- simple.cxx 14 Mar 2002 15:45:53 -0000 1.6
+++ simple.cxx 20 Jun 2002 20:07:55 -0000 1.7
@@ -13,19 +13,19 @@
//#define VOODOO 1
-void motionfn ( int x, int y )
+static void motionfn ( int x, int y )
{
puMouse ( x, y ) ;
glutPostRedisplay () ;
}
-void mousefn ( int button, int updown, int x, int y )
+static void mousefn ( int button, int updown, int x, int y )
{
puMouse ( button, updown, x, y ) ;
glutPostRedisplay () ;
}
-void displayfn ( void )
+static void displayfn ( void )
{
glClearColor ( 0.1f, 0.4f, 0.1f, 1.0f ) ;
glClear ( GL_COLOR_BUFFER_BIT ) ;
@@ -41,13 +41,13 @@
than creating user interface widgets, you normally do want to
redraw your scenery as often as possible for smooth animation. */
- glutPostRedisplay () ;
+ //glutPostRedisplay () ;
}
-void button_cb ( puObject * )
+/*static void button_cb ( puObject * )
{
fprintf ( stderr, "Hello World.\n" ) ;
-}
+}*/
int main ( int argc, char **argv )
@@ -67,27 +67,23 @@
can write their applications upon this example code without running
into problems. */
- glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ) ;
+ glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE /*| GLUT_DEPTH*/ ) ;
glutCreateWindow ( "PUI Application" ) ;
glutDisplayFunc ( displayfn ) ;
glutMouseFunc ( mousefn ) ;
glutMotionFunc ( motionfn ) ;
+ glutPassiveMotionFunc ( motionfn ) ;
-#ifdef VOODOO
+/*#ifdef VOODOO
glutPassiveMotionFunc ( motionfn ) ;
-#endif
+#endif*/
puInit () ;
#ifdef VOODOO
puShowCursor () ;
#endif
-
- puOneShot *b = new puOneShot ( 50, 50, 200, 80 ) ;
-
- b -> setLegend ( "Say Hello" ) ;
- b -> setCallback ( button_cb ) ;
glutMainLoop () ;
|