[cogl/wip/cogl-sharp: 18/35] cogl-sharp: Expose ColorMask
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/cogl-sharp: 18/35] cogl-sharp: Expose ColorMask
- Date: Mon, 8 Oct 2012 12:56:47 +0000 (UTC)
commit c8ad783ca7e3b3661c6c88ae1003eb5b9ee17ae4
Author: Damien Lespiau <damien lespiau intel com>
Date: Mon Oct 1 20:36:05 2012 +0100
cogl-sharp: Expose ColorMask
This also means the two functions using CoglMask on FrameBuffer.
cogl-sharp/ColorMask.cs | 16 ++++++++++++++++
cogl-sharp/Makefile.am | 1 +
cogl-sharp/_FrameBuffer.cs | 16 ++++++++++++++++
cogl-sharp/parse-gir.py | 3 ++-
4 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/cogl-sharp/ColorMask.cs b/cogl-sharp/ColorMask.cs
new file mode 100644
index 0000000..5bfeab2
--- /dev/null
+++ b/cogl-sharp/ColorMask.cs
@@ -0,0 +1,16 @@
+/* This file has been generated by parse-gir.py, do not hand edit */
+using System;
+
+namespace Cogl
+{
+ [Flags]
+ public enum ColorMask
+ {
+ None = 0,
+ Red = 1,
+ Green = 2,
+ Blue = 4,
+ Alpha = 8,
+ All = 15
+ }
+}
diff --git a/cogl-sharp/Makefile.am b/cogl-sharp/Makefile.am
index 387b97c..926ff26 100644
--- a/cogl-sharp/Makefile.am
+++ b/cogl-sharp/Makefile.am
@@ -11,6 +11,7 @@ pkgconfig_DATA = cogl2-sharp.pc
sources = \
BufferBit.cs \
Color.cs \
+ ColorMask.cs \
Context.cs \
FrameBuffer.cs \
_FrameBuffer.cs \
diff --git a/cogl-sharp/_FrameBuffer.cs b/cogl-sharp/_FrameBuffer.cs
index bdd7907..8a32161 100644
--- a/cogl-sharp/_FrameBuffer.cs
+++ b/cogl-sharp/_FrameBuffer.cs
@@ -63,6 +63,14 @@ namespace Cogl
}
[DllImport("cogl2.dll")]
+ public static extern ColorMask cogl_framebuffer_get_color_mask(IntPtr o);
+
+ public ColorMask GetColorMask()
+ {
+ return cogl_framebuffer_get_color_mask(handle);
+ }
+
+ [DllImport("cogl2.dll")]
public static extern int cogl_framebuffer_get_green_bits(IntPtr o);
public int GetGreenBits()
@@ -255,6 +263,14 @@ namespace Cogl
}
[DllImport("cogl2.dll")]
+ public static extern void cogl_framebuffer_set_color_mask(IntPtr o, ColorMask color_mask);
+
+ public void SetColorMask(ColorMask color_mask)
+ {
+ cogl_framebuffer_set_color_mask(handle, color_mask);
+ }
+
+ [DllImport("cogl2.dll")]
public static extern void cogl_framebuffer_set_modelview_matrix(IntPtr o, ref Matrix matrix);
public void SetModelviewMatrix(ref Matrix matrix)
diff --git a/cogl-sharp/parse-gir.py b/cogl-sharp/parse-gir.py
index 1c05f4d..a806c4b 100755
--- a/cogl-sharp/parse-gir.py
+++ b/cogl-sharp/parse-gir.py
@@ -7,7 +7,8 @@ C_NS = "http://www.gtk.org/introspection/c/1.0"
# enum types to dump (.gir names)
enum_types = (
- "BufferBit"
+ "BufferBit",
+ "ColorMask"
)
# object types to dump (.gir names)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]