diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-31 18:06:20 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-31 18:06:20 +0300 |
commit | 127b3e6882ad92fe562d4e424295253755314bc1 (patch) | |
tree | c679b2e0c2ac27406cb9570f2829d8cd242d4dcc /source/blender/gpu | |
parent | 95069f29099b40055c0a3e4d10f4a7b0c602a1df (diff) |
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
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |