summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2012-11-04 00:20:24 +0000
committerDamien Lespiau <damien.lespiau@intel.com>2013-01-04 20:29:36 +0000
commit402b79e3b5640415366893a634d0404c28a1ffc8 (patch)
tree274bacdb38a847f1db512e3dae64dc576b0d0f48
parent42226a3d1da5d65c9b42d7f175482bf9acbd9b84 (diff)
downloadcogl-402b79e3b5640415366893a634d0404c28a1ffc8.tar.gz
cogl-sharp: Expose OnScreenTemplate
-rw-r--r--cogl-sharp/Makefile.am2
-rw-r--r--cogl-sharp/OnScreenTemplate.cs48
-rw-r--r--cogl-sharp/_OnScreenTemplate.cs26
-rwxr-xr-xcogl-sharp/parse-gir.py4
4 files changed, 80 insertions, 0 deletions
diff --git a/cogl-sharp/Makefile.am b/cogl-sharp/Makefile.am
index fb14622b..499a2299 100644
--- a/cogl-sharp/Makefile.am
+++ b/cogl-sharp/Makefile.am
@@ -22,6 +22,8 @@ sources = \
Object.cs \
OnScreen.cs \
_OnScreen.cs \
+ OnScreenTemplate.cs \
+ _OnScreenTemplate.cs \
Pipeline.cs \
_Pipeline.cs \
PipelineAlphaFunc.cs \
diff --git a/cogl-sharp/OnScreenTemplate.cs b/cogl-sharp/OnScreenTemplate.cs
new file mode 100644
index 00000000..04b3f75c
--- /dev/null
+++ b/cogl-sharp/OnScreenTemplate.cs
@@ -0,0 +1,48 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2012 Intel Corporation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Damien Lespiau <damien.lespiau@intel.com>
+ */
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace Cogl
+{
+ public sealed partial class OnScreenTemplate : Object
+ {
+ public OnScreenTemplate(IntPtr h) : base(h) {}
+
+ [DllImport("cogl2.dll")]
+ private static extern IntPtr cogl_onscreen_template_new(IntPtr swap);
+
+ public OnScreenTemplate()
+ {
+ handle = cogl_onscreen_template_new(IntPtr.Zero);
+ }
+
+ public OnScreenTemplate(SwapChain swap_chain)
+ {
+ handle = cogl_onscreen_template_new(swap_chain.Handle);
+ }
+ }
+}
diff --git a/cogl-sharp/_OnScreenTemplate.cs b/cogl-sharp/_OnScreenTemplate.cs
new file mode 100644
index 00000000..708038f0
--- /dev/null
+++ b/cogl-sharp/_OnScreenTemplate.cs
@@ -0,0 +1,26 @@
+/* This file has been generated by parse-gir.py, do not hand edit */
+using System;
+using System.Runtime.InteropServices;
+
+namespace Cogl
+{
+ public partial class OnScreenTemplate
+ {
+ [DllImport("cogl2.dll")]
+ public static extern void cogl_onscreen_template_set_samples_per_pixel(IntPtr o, int n);
+
+ public void SetSamplesPerPixel(int n)
+ {
+ cogl_onscreen_template_set_samples_per_pixel(handle, n);
+ }
+
+ [DllImport("cogl2.dll")]
+ public static extern void cogl_onscreen_template_set_swap_throttled(IntPtr o, bool throttled);
+
+ public void SetSwapThrottled(bool throttled)
+ {
+ cogl_onscreen_template_set_swap_throttled(handle, throttled);
+ }
+
+ }
+}
diff --git a/cogl-sharp/parse-gir.py b/cogl-sharp/parse-gir.py
index 97229753..f231175f 100755
--- a/cogl-sharp/parse-gir.py
+++ b/cogl-sharp/parse-gir.py
@@ -26,6 +26,7 @@ enum_types = (
object_types = (
"Framebuffer",
"Onscreen",
+ "OnscreenTemplate",
"Pipeline",
"SwapChain",
"Texture",
@@ -62,6 +63,9 @@ name_overrides = {
'swap_region',
)
},
+ 'OnscreenTemplate': {
+ 'class': 'OnScreenTemplate',
+ },
'Offscreen': {
'class': 'OffScreen'
},