fix [#30643] Crasher on entering edit mode with VBOs enabled
authorCampbell Barton <ideasman42@gmail.com>
Fri, 30 Mar 2012 06:11:59 +0000 (06:11 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 30 Mar 2012 06:11:59 +0000 (06:11 +0000)
source/blender/gpu/intern/gpu_buffers.c

index 61d563a54e0a367e33cf3ec49eac8b0a6fb7610b..53555346caf9beb591977952c9978ab713c3ed00 100644 (file)
@@ -895,11 +895,11 @@ static int gpu_buffer_size_from_type(DerivedMesh *dm, GPUBufferType type)
                return sizeof(int)*2*dm->drawObject->totedge;
        case GPU_BUFFER_UVEDGE:
                /* each face gets 3 points, 3 edges per triangle, and
-                  each edge has its own, non-shared coords, so each
-                  tri corner needs minimum of 4 floats, quads used
-                  less so here we can over allocate and assume all
-                  tris. */
-               return sizeof(float) * dm->drawObject->tot_triangle_point;
+                * each edge has its own, non-shared coords, so each
+                * tri corner needs minimum of 4 floats, quads used
+                * less so here we can over allocate and assume all
+                * tris. */
+               return sizeof(float) * 4 * dm->drawObject->tot_triangle_point;
        default:
                return -1;
        }