Fix for multires VBO drawing in sculpt mode.
authorNicholas Bishop <nicholasbishop@gmail.com>
Fri, 16 Mar 2012 04:11:35 +0000 (04:11 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Fri, 16 Mar 2012 04:11:35 +0000 (04:11 +0000)
Forgot to use return value of function creating the index buffer.

source/blender/gpu/intern/gpu_buffers.c

index 92b14409ce7ab1cefca91aa9d9c73187535453bd..aeb2b13d15e83ec42de3b871f6c632745616cc2f 100644 (file)
@@ -1606,7 +1606,7 @@ GPU_Buffers *GPU_build_grid_buffers(int *grid_indices, int totgrid,
        totquad= gpu_count_grid_quads(grid_hidden, grid_indices, totgrid, gridsize);
 
        if(totquad == fully_visible_totquad) {
        totquad= gpu_count_grid_quads(grid_hidden, grid_indices, totgrid, gridsize);
 
        if(totquad == fully_visible_totquad) {
-               gpu_get_grid_buffer(gridsize, &buffers->index_type, &buffers->tot_quad);
+               buffers->index_buf = gpu_get_grid_buffer(gridsize, &buffers->index_type, &buffers->tot_quad);
                buffers->has_hidden = 0;
        }
        else if(GLEW_ARB_vertex_buffer_object && !(U.gameflags & USER_DISABLE_VBO)) {
                buffers->has_hidden = 0;
        }
        else if(GLEW_ARB_vertex_buffer_object && !(U.gameflags & USER_DISABLE_VBO)) {