Gawain: fix pointer arithmetic warning
void* + offset = ??? This Mac-only code works, but wasn't strictly correct. clang doesn't warn about this, gcc does.
This commit is contained in:
parent
9a193a28c4
commit
34c808287e
|
@ -222,7 +222,7 @@ void immBegin(PrimitiveType prim_type, unsigned vertex_ct)
|
|||
// printf("mapping %u to %u\n", imm.buffer_offset, imm.buffer_offset + bytes_needed - 1);
|
||||
|
||||
#if APPLE_LEGACY
|
||||
imm.buffer_data = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY) + imm.buffer_offset;
|
||||
imm.buffer_data = (GLubyte*)glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY) + imm.buffer_offset;
|
||||
#else
|
||||
imm.buffer_data = glMapBufferRange(GL_ARRAY_BUFFER, imm.buffer_offset, bytes_needed,
|
||||
GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT | (imm.strict_vertex_ct ? 0 : GL_MAP_FLUSH_EXPLICIT_BIT));
|
||||
|
|
Loading…
Reference in New Issue