Fix #20879: crash when add textures brush in sculpt mode. Drawing

the texture would crash because the VBO was still bound. As I
understand it this is not necessarily against the opengl spec,
but might as well unbind it, the driver bug seems to have been
fixed but has not trickled down everywhere yet.

http://bugs.freedesktop.org/show_bug.cgi?id=23859
This commit is contained in:
Brecht Van Lommel 2010-01-31 15:06:20 +00:00
parent 95069f2909
commit 127b3e6882

@ -672,6 +672,9 @@ void GPU_draw_buffers(void *buffers_v)
glDrawElements(GL_TRIANGLES, buffers->tot_tri * 3, buffers->index_type, 0);
}
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
}