diff options
author | Neil Roberts <neil@linux.intel.com> | 2011-10-26 18:43:21 +0100 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2011-11-16 16:21:31 +0000 |
commit | dbc31b70cc790833d8926ebad3e03c2d236965ae (patch) | |
tree | b4daad5a83c662bc8b3623fe55083825588ddbd8 /cogl/cogl-attribute.c | |
parent | f4c1ba9ed9f1555f7a6dbd5bbd84f7b936019ead (diff) | |
download | cogl-dbc31b70cc790833d8926ebad3e03c2d236965ae.tar.gz |
cogl-bitmask: Add a return value for the foreach callback
The foreach callback can now return FALSE to stop the iteration.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Diffstat (limited to 'cogl/cogl-attribute.c')
-rw-r--r-- | cogl/cogl-attribute.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cogl/cogl-attribute.c b/cogl/cogl-attribute.c index 348071da..853d9893 100644 --- a/cogl/cogl-attribute.c +++ b/cogl/cogl-attribute.c @@ -428,13 +428,13 @@ validated: return status; } -static void +static gboolean toggle_enabled_cb (int bit_num, void *user_data) { const CoglBitmask *new_values = user_data; gboolean enabled = _cogl_bitmask_get (new_values, bit_num); - _COGL_GET_CONTEXT (ctx, NO_RETVAL); + _COGL_GET_CONTEXT (ctx, FALSE); if (ctx->driver == COGL_DRIVER_GLES2) { @@ -454,6 +454,8 @@ toggle_enabled_cb (int bit_num, void *user_data) GE( ctx, glDisableClientState (GL_TEXTURE_COORD_ARRAY) ); } #endif + + return TRUE; } static void |