[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26473] trunk/blender/source/blender/gpu/ intern/gpu_buffers.c: Fix #20879: crash when add textures brush in sculpt mode.

Brecht Van Lommel brecht at blender.org
Sun Jan 31 16:06:20 CET 2010


Revision: 26473
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26473
Author:   blendix
Date:     2010-01-31 16:06:20 +0100 (Sun, 31 Jan 2010)

Log Message:
-----------
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

Modified Paths:
--------------
    trunk/blender/source/blender/gpu/intern/gpu_buffers.c

Modified: trunk/blender/source/blender/gpu/intern/gpu_buffers.c
===================================================================
--- trunk/blender/source/blender/gpu/intern/gpu_buffers.c	2010-01-31 14:46:28 UTC (rev 26472)
+++ trunk/blender/source/blender/gpu/intern/gpu_buffers.c	2010-01-31 15:06:20 UTC (rev 26473)
@@ -672,6 +672,9 @@
 			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);
 	}





More information about the Bf-blender-cvs mailing list