From: Tim R. <ti...@us...> - 2004-11-05 15:45:57
|
Update of /cvsroot/csdopenglnet/csdOpenGL/platform/mono In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20295/platform/mono Modified Files: gtkArea.cs gtkContext.cs Log Message: Kai forced me to remove the Debug-calls Index: gtkContext.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/platform/mono/gtkContext.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gtkContext.cs 11 Sep 2004 08:10:42 -0000 1.1 --- gtkContext.cs 5 Nov 2004 15:45:37 -0000 1.2 *************** *** 5,9 **** using Gdk; using System; - using System.Diagnostics; using System.Runtime.InteropServices; --- 5,8 ---- *************** *** 60,139 **** public GdkGLContext() : this ( stdInitializer ) { - Debug.Indent(); - Debug.WriteLine( "Entering GdkGLContext()" ); - - Debug.WriteLine( "Exiting GdkGLContext()" ); - Debug.Unindent(); } public GdkGLContext( uint[] attributeList ) { - Debug.Indent(); - Debug.WriteLine( "Entering GdkGLContext(uint[])" ); // choose the visual based on attribute list - Debug.WriteLine( "gdk_x11_get_default_xdisplay" ); - Debug.Write( "preX11get: " ); - Debug.WriteLine( xdisplay.ToString() ); xdisplay = gdk_x11_get_default_xdisplay(); if (xdisplay==IntPtr.Zero) throw new NoXDisplayException(); - Debug.Write( "postX11get: " ); - Debug.WriteLine( xdisplay.ToString() ); - Debug.WriteLine( "glXChooseVisual" ); - IntPtr visualInfo = glXChooseVisual( xdisplay, gdk_x11_get_default_screen(), attributeList ); if (visualInfo==IntPtr.Zero) throw new NoGLContextException(); try { - Debug.WriteLine( "glXCreateContext" ); - Debug.Write( "preCreate: " ); - Debug.WriteLine( glxcontext.ToString() ); glxcontext = glXCreateContext( xdisplay, visualInfo, IntPtr.Zero, true ); - Debug.Write( "postCreate: " ); - Debug.WriteLine( glxcontext.ToString() ); } catch (Exception e) { ! Debug.Write( "==> " ); ! Debug.WriteLine( e.ToString() ); } finally { - Debug.WriteLine( "XFree" ); XFree( visualInfo ); } - - Debug.WriteLine( "Exiting GdkGLContext(uint[])" ); - Debug.Unindent(); } ~GdkGLContext() { - Debug.Indent(); - Debug.WriteLine( "Entering ~GdkGLContext(uint[])" ); - if (glxcontext==glXGetCurrentContext()) { - Debug.WriteLine( "glXMakeCurrent" ); glXMakeCurrent( xdisplay, 0, IntPtr.Zero ); } - - Debug.WriteLine( "glXDestroyContext" ); glXDestroyContext( xdisplay, glxcontext ); - - Debug.WriteLine( "Exiting ~GdkGLContext()" ); - Debug.Unindent(); } public bool MakeCurrent( Window window ) { - Debug.Indent(); - Debug.WriteLine( "Entering GdkGLContext.MakeCurrent(Window)" ); bool result = false; if (window==null) { - Debug.WriteLine( "window not initialized" ); result = false; } else { - Debug.WriteLine( "gdk_x11_drawable_get_xid" ); int id = gdk_x11_drawable_get_xid( window.Handle ); - Debug.WriteLine( "glXMakeCurrent" ); result = glXMakeCurrent( xdisplay, id, glxcontext ); - - Debug.WriteLine( "Exiting GdkGLContext.MakeCurrent(Window)*" ); - Debug.Indent(); } --- 59,98 ---- public GdkGLContext() : this ( stdInitializer ) { } public GdkGLContext( uint[] attributeList ) { // choose the visual based on attribute list xdisplay = gdk_x11_get_default_xdisplay(); if (xdisplay==IntPtr.Zero) throw new NoXDisplayException(); IntPtr visualInfo = glXChooseVisual( xdisplay, gdk_x11_get_default_screen(), attributeList ); if (visualInfo==IntPtr.Zero) throw new NoGLContextException(); try { glxcontext = glXCreateContext( xdisplay, visualInfo, IntPtr.Zero, true ); } catch (Exception e) { ! Console.Write( "GdkGlCopntext.GdkGLContext() #74: " ); ! Console.WriteLine( e.ToString() ); } finally { XFree( visualInfo ); } } ~GdkGLContext() { if (glxcontext==glXGetCurrentContext()) { glXMakeCurrent( xdisplay, 0, IntPtr.Zero ); } glXDestroyContext( xdisplay, glxcontext ); } public bool MakeCurrent( Window window ) { bool result = false; if (window==null) { result = false; } else { int id = gdk_x11_drawable_get_xid( window.Handle ); result = glXMakeCurrent( xdisplay, id, glxcontext ); } *************** *** 150,167 **** public void SwapBuffers( Window window ) { - Debug.Indent(); - Debug.WriteLine( "Entering GdkGLContext.SwapBuffers(Window)" ); - if (window==null) { - Debug.WriteLine( "window not initialized" ); } else { - Debug.WriteLine( "gdk_x11_drawable_get_xid" ); int id = gdk_x11_drawable_get_xid( window.Handle ); - Debug.WriteLine( "glXSwapBuffers" ); glXSwapBuffers( xdisplay, id ); } - - Debug.WriteLine( "Exiting GdkGLContext.SwapBuffers(Window)" ); - Debug.Unindent(); } } --- 109,117 ---- Index: gtkArea.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/platform/mono/gtkArea.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gtkArea.cs 11 Sep 2004 08:10:42 -0000 1.1 --- gtkArea.cs 5 Nov 2004 15:45:37 -0000 1.2 *************** *** 6,10 **** using Gtk; using System; - using System.Diagnostics; /** \brief OpenGL-widget --- 6,9 ---- *************** *** 25,37 **** */ public GtkGLArea() : base(type) { - Debug.Indent(); - Debug.WriteLine( "Entering GtkGLArea()" ); - DoubleBuffered = false; - Debug.WriteLine( "Init context" ); context = new GdkGLContext(); - - Debug.WriteLine( "Exiting GtkGLArea()" ); - Debug.Unindent(); } --- 24,29 ---- *************** *** 41,53 **** */ public GtkGLArea( uint[] attr) : base(type) { - Debug.Indent(); - Debug.WriteLine( "Entering GtkGLArea(uint[])" ); - DoubleBuffered = false; - Debug.WriteLine( "Init context" ); context = new GdkGLContext( attr ); - - Debug.WriteLine( "Entering GtkGLArea(uint[])" ); - Debug.Unindent(); } --- 33,38 ---- *************** *** 58,69 **** */ public bool MakeCurrent() { - Debug.Indent(); - Debug.WriteLine( "Entering GtkGLArea.MakeCurrent()" ); - bool result = context.MakeCurrent( GdkWindow ); - - Debug.WriteLine( "Entering GtkGLArea.MakeCurrent()*" ); - Debug.Unindent(); - return result; } --- 43,47 ---- *************** *** 82,92 **** */ public void SwapBuffers() { - Debug.Indent(); - Debug.WriteLine( "Entering GtkGLArea.SwapBuffers()" ); - context.SwapBuffers( GdkWindow ); - - Debug.WriteLine( "Entering GtkGLArea.SwapBuffers()" ); - Debug.Unindent(); } } --- 60,64 ---- |