Hello,

   Attached patch for gtkglarea-sharp adds gtk_gl_area_share_new() to
the list of bindings to allow sharing the GL context. This way one can
share textures and display lists between GL contexts.

Regards,
-- 
Sam.
Index: gtkglarea/GLArea.custom
===================================================================
--- gtkglarea/GLArea.custom	(revision 91086)
+++ gtkglarea/GLArea.custom	(working copy)
@@ -6,3 +6,15 @@
 			// C.J. Was Here.
 			Raw = gtk_gl_area_new(attrList);
 		}
+
+		[DllImport("libgtkglarea-win32-2.0-0.dll")]
+		static extern IntPtr gtk_gl_area_share_new(int[] attrList, IntPtr share);
+
+		/* Create a sharing GL context */
+		public GLArea (System.Int32[] attrList, GLArea share) : base (IntPtr.Zero)
+		{
+			if(share == null)
+				Raw = gtk_gl_area_new(attrList);
+			else
+				Raw = gtk_gl_area_share_new(attrList, share.Handle);
+		}
Index: gtkglarea/generated/GLArea.cs
===================================================================
--- gtkglarea/generated/GLArea.cs	(revision 91086)
+++ gtkglarea/generated/GLArea.cs	(working copy)
@@ -98,6 +93,18 @@
 			Raw = gtk_gl_area_new(attrList);
 		}
 
+		[DllImport("libgtkglarea-win32-2.0-0.dll")]
+		static extern IntPtr gtk_gl_area_share_new(int[] attrList, IntPtr share);
+
+		/* Create a sharing GL context */
+		public GLArea (System.Int32[] attrList, GLArea share) : base (IntPtr.Zero)
+		{
+			if(share == null)
+				Raw = gtk_gl_area_new(attrList);
+			else
+				Raw = gtk_gl_area_share_new(attrList, share.Handle);
+		}
+
 #endregion
 	}
 }
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to