Make sure all error flags are cleared before calling glBufferDataARB() in VBO::load().

This commit is contained in:
vrld
2012-03-05 20:58:17 +01:00
parent c0ffa5b07e
commit febd7757fc
+3 -1
View File
@@ -194,8 +194,10 @@ namespace opengl
// Copy the old buffer only if 'restore' was requested.
const GLvoid *src = restore ? buffer_copy : 0;
while (GL_NO_ERROR != glGetError())
/* clear error messages */;
// Note that if 'src' is '0', no data will be copied.
glGetError();
glBufferDataARB(getTarget(), getSize(), src, getUsage());
GLenum err = glGetError();