From 127b3e6882ad92fe562d4e424295253755314bc1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 31 Jan 2010 15:06:20 +0000 Subject: 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 --- source/blender/gpu/intern/gpu_buffers.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 6590d838b90..ac79322dd20 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -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); } -- cgit v1.2.3