void
bufferSubData(GLsizeiptr offset, GLsizeiptr length, const void *new_data) {
if (offset >= 0 && offset < size && length > 0 && offset + length <= size && new_data) {
- memcpy((uint8_t *)data + offset, new_data, length);
+ memcpy((GLubyte *)data + offset, new_data, length);
}
}
void
getSubData(GLsizeiptr offset, GLsizeiptr length, void *out_data) {
if (offset >= 0 && offset < size && length > 0 && offset + length <= size && out_data) {
- memcpy(out_data, (uint8_t *)data + offset, length);
+ memcpy(out_data, (GLubyte *)data + offset, length);
}
}
};
bool user_arrays_nv;
unsigned retain_count;
+ // Whether it has been bound before
+ bool bound;
+
// TODO: This will fail for buffers shared by multiple contexts.
std::map <GLuint, Buffer> buffers;
user_arrays(false),
user_arrays_arb(false),
user_arrays_nv(false),
- retain_count(0)
+ retain_count(0),
+ bound(false)
{ }
inline bool