[cogl/wip/cogl-sharp: 44/51] cogl-sharp: Write the full version of the Context constructor
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/cogl-sharp: 44/51] cogl-sharp: Write the full version of the Context constructor
- Date: Sat, 5 Jan 2013 16:51:59 +0000 (UTC)
commit 43b014672021fb4f369da0ca7f92251401208ec1
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]