Some code was doing pointer arithmetic on the return value from
cogl_buffer_map which is void* pointer. This is a GCC extension so we
should try to avoid it. This patch adds casts to guint8* where
appropriate.
Based on a patch by Fan, Chun-wei.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2561
CoglAttribute *attribute = attributes[i];
CoglVertexArray *vertex_array;
CoglBuffer *buffer;
- void *base;
+ guint8 *base;
#ifdef HAVE_COGL_GLES2
int attrib_location;
#endif
ValidateLayerState state;
CoglPipeline *source;
CoglBuffer *buffer;
- void *base;
+ guint8 *base;
size_t array_offset;
size_t index_size;
GLenum indices_gl_type = 0;
/* Mapping a buffer for read is probably a really bad thing to
do but this will only happen during debugging so it probably
doesn't matter */
- verts = (cogl_buffer_map (COGL_BUFFER (state->vertex_array),
- COGL_BUFFER_ACCESS_READ, 0) +
+ verts = ((guint8 *) cogl_buffer_map (COGL_BUFFER (state->vertex_array),
+ COGL_BUFFER_ACCESS_READ, 0) +
state->array_offset);
_cogl_journal_dump_quad_batch (verts,