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>
This commit is contained in:
Robert Bragg
2012-02-06 17:08:58 +00:00
parent 269878217f
commit 3ea6acc072
26 changed files with 214 additions and 148 deletions

View File

@@ -31,6 +31,8 @@
#ifndef __COGL_ATTRIBUTE_BUFFER_H__
#define __COGL_ATTRIBUTE_BUFFER_H__
#include <cogl/cogl-context.h>
G_BEGIN_DECLS
/**
@@ -45,6 +47,7 @@ typedef struct _CoglAttributeBuffer CoglAttributeBuffer;
/**
* cogl_attribute_buffer_new:
* @context: A #CoglContext
* @bytes: The number of bytes to allocate for vertex attribute data.
* @data: An optional pointer to vertex data to upload immediately.
*
@@ -59,7 +62,9 @@ typedef struct _CoglAttributeBuffer CoglAttributeBuffer;
* Stability: Unstable
*/
CoglAttributeBuffer *
cogl_attribute_buffer_new (gsize bytes, const void *data);
cogl_attribute_buffer_new (CoglContext *context,
gsize bytes,
const void *data);
/**
* cogl_is_attribute_buffer: