summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2012-09-30 02:37:44 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2012-10-01 18:35:38 +0100
commitf9c8fc5c209aaa366bdd40d8ef660a6a357af947 (patch)
tree90b0007de5a1106f1f3f54d89b67b9496c669a2a
parenteaef6d774a4fd305ce35abebe9d9a350993c23b4 (diff)
downloadcogl-f9c8fc5c209aaa366bdd40d8ef660a6a357af947.tar.gz
cogl: Don't expose longs in the API (2/2)
This time, it's the clear and discard methods on framebuffers that wanted an unsigned long to describe the list of buffers to act on. Let's replace the unsigned long by the dedicated enum, CoglBufferBit. Reviewed-by: Robert Bragg <robert@linux.intel.com>
-rw-r--r--cogl/cogl-framebuffer-private.h2
-rw-r--r--cogl/cogl-framebuffer.c8
-rw-r--r--cogl/cogl-framebuffer.h6
-rw-r--r--cogl/cogl-types.h6
4 files changed, 11 insertions, 11 deletions
diff --git a/cogl/cogl-framebuffer-private.h b/cogl/cogl-framebuffer-private.h
index d2c2c36e..429ed384 100644
--- a/cogl/cogl-framebuffer-private.h
+++ b/cogl/cogl-framebuffer-private.h
@@ -217,7 +217,7 @@ _cogl_framebuffer_get_winsys (CoglFramebuffer *framebuffer);
void
_cogl_framebuffer_clear_without_flush4f (CoglFramebuffer *framebuffer,
- unsigned long buffers,
+ CoglBufferBit buffers,
float red,
float green,
float blue,
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index 8e4f6f31..6798d02c 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -198,7 +198,7 @@ _cogl_framebuffer_get_winsys (CoglFramebuffer *framebuffer)
* the journal */
void
_cogl_framebuffer_clear_without_flush4f (CoglFramebuffer *framebuffer,
- unsigned long buffers,
+ CoglBufferBit buffers,
float red,
float green,
float blue,
@@ -232,7 +232,7 @@ _cogl_framebuffer_dirty (CoglFramebuffer *framebuffer)
void
cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer,
- unsigned long buffers,
+ CoglBufferBit buffers,
float red,
float green,
float blue,
@@ -391,7 +391,7 @@ cleared:
*/
void
cogl_framebuffer_clear (CoglFramebuffer *framebuffer,
- unsigned long buffers,
+ CoglBufferBit buffers,
const CoglColor *color)
{
cogl_framebuffer_clear4f (framebuffer, buffers,
@@ -1784,7 +1784,7 @@ _cogl_blit_framebuffer (unsigned int src_x,
void
cogl_framebuffer_discard_buffers (CoglFramebuffer *framebuffer,
- unsigned long buffers)
+ CoglBufferBit buffers)
{
CoglContext *ctx = framebuffer->context;
diff --git a/cogl/cogl-framebuffer.h b/cogl/cogl-framebuffer.h
index a38a2a30..62a02caf 100644
--- a/cogl/cogl-framebuffer.h
+++ b/cogl/cogl-framebuffer.h
@@ -1030,7 +1030,7 @@ cogl_framebuffer_get_context (CoglFramebuffer *framebuffer);
*/
void
cogl_framebuffer_clear (CoglFramebuffer *framebuffer,
- unsigned long buffers,
+ CoglBufferBit buffers,
const CoglColor *color);
/**
@@ -1055,7 +1055,7 @@ cogl_framebuffer_clear (CoglFramebuffer *framebuffer,
*/
void
cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer,
- unsigned long buffers,
+ CoglBufferBit buffers,
float red,
float green,
float blue,
@@ -1629,7 +1629,7 @@ cogl_framebuffer_stroke_path (CoglFramebuffer *framebuffer,
*/
void
cogl_framebuffer_discard_buffers (CoglFramebuffer *framebuffer,
- unsigned long buffers);
+ CoglBufferBit buffers);
/**
* cogl_framebuffer_finish:
diff --git a/cogl/cogl-types.h b/cogl/cogl-types.h
index 3d096cd9..15464f18 100644
--- a/cogl/cogl-types.h
+++ b/cogl/cogl-types.h
@@ -670,9 +670,9 @@ typedef enum
* Since: 1.0
*/
typedef enum {
- COGL_BUFFER_BIT_COLOR = 1L<<0,
- COGL_BUFFER_BIT_DEPTH = 1L<<1,
- COGL_BUFFER_BIT_STENCIL = 1L<<2
+ COGL_BUFFER_BIT_COLOR = 1<<0,
+ COGL_BUFFER_BIT_DEPTH = 1<<1,
+ COGL_BUFFER_BIT_STENCIL = 1<<2
} CoglBufferBit;
/**