Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2012-03-14 11:37:47 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-03-14 11:37:47 +0400
commit4d3f11c66f3fce8d04f01283ab3f61b231df9fee (patch)
tree7dbf64d4a8e26acf64b3ab92441c8191eb0eb8e1 /source/blender/gpu
parent7454d939c5ac94b114b1754e899e1395d2473dc9 (diff)
Fix some errors in partial visibility drawing.
Also changed show-in-border key to SHIFT+H as suggested by Daniel Salazar.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 65eefe6bc1e..92b14409ce7 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -1479,7 +1479,7 @@ static int gpu_count_grid_quads(BLI_bitmap *grid_hidden,
/* grid hidden are present, have to check each element */
for(y = 0; y < gridsize-1; y++) {
for(x = 0; x < gridsize-1; x++) {
- if(paint_is_grid_face_hidden(gh, gridsize, x, y))
+ if(!paint_is_grid_face_hidden(gh, gridsize, x, y))
totquad++;
}
}
@@ -1595,7 +1595,7 @@ GPU_Buffers *GPU_build_grid_buffers(int *grid_indices, int totgrid,
{
GPU_Buffers *buffers;
int totquad;
- int fully_visible_totquad = (gridsize-1) * (gridsize-1);
+ int fully_visible_totquad = (gridsize-1) * (gridsize-1) * totgrid;
buffers = MEM_callocN(sizeof(GPU_Buffers), "GPU_Buffers");
buffers->grid_hidden = grid_hidden;
@@ -1609,7 +1609,7 @@ GPU_Buffers *GPU_build_grid_buffers(int *grid_indices, int totgrid,
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)) {
+ else if(GLEW_ARB_vertex_buffer_object && !(U.gameflags & USER_DISABLE_VBO)) {
/* Build new VBO */
glGenBuffersARB(1, &buffers->index_buf);
if(buffers->index_buf) {