[cogl/wip/cogl-sharp] cogl-sharp: Write the full version of the Context constructor



commit e718d4673f617e9beba7f179570fd426974c45f1
Author: Damien Lespiau <damien lespiau intel com>
Date:   Sun Nov 4 01:20:28 2012 +0000

    cogl-sharp: Write the full version of the Context constructor

 cogl-sharp/Context.cs |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/cogl-sharp/Context.cs b/cogl-sharp/Context.cs
index 22c3052..8fee48f 100644
--- a/cogl-sharp/Context.cs
+++ b/cogl-sharp/Context.cs
@@ -45,5 +45,19 @@ namespace Cogl
             if (error != IntPtr.Zero)
                 throw new Cogl.Exception(error);
         }
+
+        public Context(Display renderer)
+        {
+            IntPtr r, error;
+
+            if (renderer == null)
+                r = IntPtr.Zero;
+            else
+                r = renderer.Handle;
+
+            handle = cogl_context_new(r, out error);
+            if (error != IntPtr.Zero)
+                throw new Cogl.Exception(error);
+        }
     }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]