summaryrefslogtreecommitdiff
path: root/cogl/cogl-primitives.c
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2012-02-06 17:08:58 +0000
committerRobert Bragg <robert@linux.intel.com>2012-02-09 14:28:02 +0000
commit3ea6acc072d9f15fd651953f183d66a92a155ee0 (patch)
treed0540ecdeb02a1cc02d27cfd05013e5a9c34090d /cogl/cogl-primitives.c
parent269878217f6b2bfdd2b59425f2a9d3e0b6ce4c42 (diff)
downloadcogl-3ea6acc072d9f15fd651953f183d66a92a155ee0.tar.gz
buffer: explicitly relate buffers to a context
All CoglBuffer constructors now take an explicit CoglContext constructor. This is part of the on going effort to adapt to Cogl API so it no longer depends on a global, default context. Reviewed-by: Neil Roberts <neil@linux.intel.com>
Diffstat (limited to 'cogl/cogl-primitives.c')
-rw-r--r--cogl/cogl-primitives.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cogl/cogl-primitives.c b/cogl/cogl-primitives.c
index d8328b0c..3bea1b0f 100644
--- a/cogl/cogl-primitives.c
+++ b/cogl/cogl-primitives.c
@@ -861,7 +861,10 @@ _cogl_rectangle_immediate (CoglFramebuffer *framebuffer,
CoglAttributeBuffer *attribute_buffer;
CoglAttribute *attributes[1];
- attribute_buffer = cogl_attribute_buffer_new (sizeof (vertices), vertices);
+ _COGL_GET_CONTEXT (ctx, NO_RETVAL);
+
+ attribute_buffer =
+ cogl_attribute_buffer_new (ctx, sizeof (vertices), vertices);
attributes[0] = cogl_attribute_new (attribute_buffer,
"cogl_position_in",
sizeof (float) * 2, /* stride */
@@ -1008,7 +1011,7 @@ cogl_polygon (const CoglTextureVertex *vertices,
g_array_set_size (ctx->polygon_vertices, n_vertices * stride);
attribute_buffer =
- cogl_attribute_buffer_new (n_vertices * stride_bytes, NULL);
+ cogl_attribute_buffer_new (ctx, n_vertices * stride_bytes, NULL);
attributes[0] = cogl_attribute_new (attribute_buffer,
"cogl_position_in",