From: Tim R. <ti...@us...> - 2004-07-13 21:07:14
|
Update of /cvsroot/csdopenglnet/tutorials/lesson04 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12374 Modified Files: lesson04.cs Log Message: example works now correct Index: lesson04.cs =================================================================== RCS file: /cvsroot/csdopenglnet/tutorials/lesson04/lesson04.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lesson04.cs 13 Jul 2004 21:00:33 -0000 1.2 --- lesson04.cs 13 Jul 2004 21:07:05 -0000 1.3 *************** *** 8,12 **** public Lesson04() { ! glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH ); glutInitWindowSize( 640, 480 ); glutCreateWindow("Lesson 04"); --- 8,12 ---- public Lesson04() { ! glutInitDisplayMode( 0 |2 ); //GLUT_RGB | GLUT_DEPTH ); glutInitWindowSize( 640, 480 ); glutCreateWindow("Lesson 04"); *************** *** 20,34 **** protected void visible( int state ) { - Console.Write( state ); if ( state==GLUT_VISIBLE ) { ! glutIdleFunc( new cb0_glutIdleFunc( draw ) ); } else { ! glutIdleFunc( new cb0_glutIdleFunc( idle ) ); } } ! protected void idle() { } ! protected void initGL() { glShadeModel( GL_SMOOTH ); --- 20,36 ---- protected void visible( int state ) { if ( state==GLUT_VISIBLE ) { ! glutIdleFunc( new cb0_glutIdleFunc( drawNew ) ); } else { ! glutIdleFunc( null ); } } ! protected void drawNew() { ! glutPostRedisplay(); ! rotTri += 0.20f; ! rotQua -= 0.15f; } ! protected void initGL() { glShadeModel( GL_SMOOTH ); *************** *** 82,88 **** glutSwapBuffers(); ! ! rotTri += 0.20f; ! rotQua -= 0.15f; } --- 84,88 ---- glutSwapBuffers(); ! } |