buffer: make _bind() return base pointer

We now make _cogl_buffer_bind return a base pointer for the bound buffer
which can be used with OpenGL. The pointer will be NULL for GPU based
buffers or may point to an malloc'd buffer. Since OpenGL expects an
offset instead of a pointer when dealing with buffer objects this means
we can handle fallback malloc buffers and GPU buffers in a consistent
way.
This commit is contained in:
Robert Bragg
2010-10-12 13:14:17 +01:00
parent 406d0c4a28
commit 7cc6dedea4
3 changed files with 19 additions and 28 deletions

View File

@ -120,7 +120,7 @@ _cogl_buffer_initialize (CoglBuffer *buffer,
void
_cogl_buffer_fini (CoglBuffer *buffer);
void
void *
_cogl_buffer_bind (CoglBuffer *buffer,
CoglBufferBindTarget target);