[cogl/wip/cogl-sharp: 23/35] cogl-sharp: Translate guints



commit 72e70352ad0d4667cceac8cac7f76c10c1b1d915
Author: Damien Lespiau <damien lespiau intel com>
Date:   Wed Oct 3 00:10:48 2012 +0100

    cogl-sharp: Translate guints

 cogl-sharp/_FrameBuffer.cs |    8 ++++++++
 cogl-sharp/_Texture.cs     |   16 ++++++++++++++++
 cogl-sharp/parse-gir.py    |    3 ++-
 3 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/cogl-sharp/_FrameBuffer.cs b/cogl-sharp/_FrameBuffer.cs
index 241415a..63e637e 100644
--- a/cogl-sharp/_FrameBuffer.cs
+++ b/cogl-sharp/_FrameBuffer.cs
@@ -55,6 +55,14 @@ namespace Cogl
         }
 
         [DllImport("cogl2.dll")]
+        public static extern void cogl_framebuffer_draw_textured_rectangles(IntPtr o, IntPtr pipeline, float coordinates, uint n_rectangles);
+
+        public void DrawTexturedRectangles(Pipeline pipeline, float coordinates, uint n_rectangles)
+        {
+            cogl_framebuffer_draw_textured_rectangles(handle, pipeline.Handle, coordinates, n_rectangles);
+        }
+
+        [DllImport("cogl2.dll")]
         public static extern void cogl_framebuffer_finish(IntPtr o);
 
         public void Finish()
diff --git a/cogl-sharp/_Texture.cs b/cogl-sharp/_Texture.cs
index 0f9b76b..47f7aa3 100644
--- a/cogl-sharp/_Texture.cs
+++ b/cogl-sharp/_Texture.cs
@@ -23,6 +23,14 @@ namespace Cogl
         }
 
         [DllImport("cogl2.dll")]
+        public static extern uint cogl_texture_get_height(IntPtr o);
+
+        public uint GetHeight()
+        {
+            return cogl_texture_get_height(handle);
+        }
+
+        [DllImport("cogl2.dll")]
         public static extern int cogl_texture_get_max_waste(IntPtr o);
 
         public int GetMaxWaste()
@@ -31,6 +39,14 @@ namespace Cogl
         }
 
         [DllImport("cogl2.dll")]
+        public static extern uint cogl_texture_get_width(IntPtr o);
+
+        public uint GetWidth()
+        {
+            return cogl_texture_get_width(handle);
+        }
+
+        [DllImport("cogl2.dll")]
         public static extern bool cogl_texture_is_sliced(IntPtr o);
 
         public bool IsSliced()
diff --git a/cogl-sharp/parse-gir.py b/cogl-sharp/parse-gir.py
index 5a8897c..3153e40 100755
--- a/cogl-sharp/parse-gir.py
+++ b/cogl-sharp/parse-gir.py
@@ -39,7 +39,7 @@ name_overrides = {
             'clear4f', 'clear'
         },
         'blacklist': (
-            'vdraw_attributes',
+            'vdraw_attributes', 'draw_rectangles'
         )
     },
     'Onscreen': {
@@ -61,6 +61,7 @@ name_overrides = {
 basic_types_map = {
     'gfloat': 'float',
     'gint': 'int',
+    'guint': 'uint',
     'Bool': 'bool', # CoglBool is 4 bytes, which the the default marshalling
                     # for C#'s bool (which itself is 1 byte).
 }



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