From: Kai R. <kre...@us...> - 2004-07-27 12:56:57
|
Update of /cvsroot/csdopenglnet/csdOpenGL/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20273/generator Modified Files: gtkContext.cs Log Message: another try Index: gtkContext.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/gtkContext.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gtkContext.cs 27 Jul 2004 12:21:51 -0000 1.3 --- gtkContext.cs 27 Jul 2004 12:56:49 -0000 1.4 *************** *** 29,32 **** --- 29,35 ---- [ DllImport( "GL" ) ] + public static extern IntPtr glXGetCurrentContext(); + + [ DllImport( "GL" ) ] public static extern void glXDestroyContext( IntPtr display, IntPtr context ); *************** *** 95,98 **** --- 98,104 ---- Debug.WriteLine( "glXDestroyContext" ); + if (glxcontext==glXGetCurrentContext()) { + glXMakeCurrent( xdisplay, 0, IntPtr.Zero ); + } glXDestroyContext( xdisplay, glxcontext ); |