Actually copy existing buffer data to temporary memory region in VBO::map().

This commit is contained in:
vrld
2012-03-07 23:33:27 +01:00
parent 6dee041a9d
commit 39e1c59989
+2 -1
View File
@@ -131,13 +131,14 @@ namespace opengl
mapped = malloc(getSize());
if (!mapped)
throw love::Exception("Out of memory (oh the humanity!)");
glGetBufferSubDataARB(getTarget(), 0, getSize(), mapped);
return mapped;
}
void VBO::unmap()
{
glBufferSubDataARB(getTarget(), 0, getSize(), (void*)mapped);
glBufferSubDataARB(getTarget(), 0, getSize(), mapped);
free(mapped);
mapped = 0;
}