Fix for drawing meshes with VBOs disabled in sculpt mode

* This is another fix for r51118. Was drawing flat-shaded GPU buffers
  with VBOs even when VBOs were disabled in the preferences.
This commit is contained in:
Nicholas Bishop
2012-10-20 00:45:44 +00:00
parent 2256c8e25f
commit 3a52a876b6

View File

@@ -1562,7 +1562,7 @@ GPU_Buffers *GPU_build_mesh_buffers(int (*face_vert_indices)[4],
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
}
if (buffers->index_buf || !buffers->smooth)
if (gpu_vbo_enabled() && (buffers->index_buf || !buffers->smooth))
glGenBuffersARB(1, &buffers->vert_buf);
buffers->tot_tri = tottri;