From: Tim R. <ti...@us...> - 2004-08-01 13:26:50
|
Update of /cvsroot/csdopenglnet/csdOpenGL/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29602/samples Modified Files: gtkAdvanced.cs Log Message: added a property for each glEnabled-flag Index: gtkAdvanced.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/samples/gtkAdvanced.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gtkAdvanced.cs 31 Jul 2004 18:00:40 -0000 1.8 --- gtkAdvanced.cs 1 Aug 2004 13:26:42 -0000 1.9 *************** *** 129,133 **** bool p = animate; animate = false; ! Debug.WriteLine( "Setting speed" ); try { --- 129,133 ---- bool p = animate; animate = false; ! Debug.WriteLine( "Setting speed" ); try { *************** *** 322,335 **** Debug.WriteLine( "Entering GtkAdvanced.OnConfigure( object, ConfigureEventArgs )" ); ! if (glarea.MakeCurrent()) { glViewport(0, 0, glarea.Allocation.Width, glarea.Allocation.Height); - glMatrixMode( GL_PROJECTION ); glLoadIdentity(); ! float h = (float) glarea.Allocation.Height / (float) (glarea.Allocation.Width); ! glFrustum( -1.0f, 1.0f, -h, h, 5.0f, 5.0f ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); - glEnd(); } else Debug.WriteLine( "MakeCurrent() failed" ); --- 322,334 ---- Debug.WriteLine( "Entering GtkAdvanced.OnConfigure( object, ConfigureEventArgs )" ); ! if (glarea.MakeCurrent()) { glViewport(0, 0, glarea.Allocation.Width, glarea.Allocation.Height); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); ! double h = (double) glarea.Allocation.Height / (double) (glarea.Allocation.Width); ! glFrustum( -1.0, 1.0, -h, h, 5.0f, 5.0 ); ! Console.WriteLine( glGetError() ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); } else Debug.WriteLine( "MakeCurrent() failed" ); *************** *** 346,350 **** glClearColor( 0.0f, 0.0f, 0.0f, 0.5f ); glClearDepth( 1.0f ); ! glEnable( GL_DEPTH_TEST ); glDepthFunc( GL_LEQUAL ); glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); --- 345,350 ---- glClearColor( 0.0f, 0.0f, 0.0f, 0.5f ); glClearDepth( 1.0f ); ! //glEnable( GL_DEPTH_TEST ); ! DepthTest = true; glDepthFunc( GL_LEQUAL ); glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); |