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:
authorCampbell Barton <ideasman42@gmail.com>2013-07-23 03:20:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-23 03:20:48 +0400
commit04ea8c0ee87e7a110d323e92116faaff20070854 (patch)
treecd3c44364ef759bb98a961d575b5e4a6343bdd28 /source/blender/gpu
parentb7bf20d9504127ec7c3d52bc8a1448d4a2bdc3bf (diff)
remove the pointer from BLI_bitmap's typedef,
hides that an arg passed is really an array which may be modified by other functions.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 4d52afbde93..11cf64b0995 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -1266,7 +1266,7 @@ struct GPU_Buffers {
CCGKey gridkey;
CCGElem **grids;
const DMFlagMat *grid_flag_mats;
- const BLI_bitmap *grid_hidden;
+ BLI_bitmap * const *grid_hidden;
int *grid_indices;
int totgrid;
int has_hidden;
@@ -1686,7 +1686,7 @@ void GPU_update_grid_buffers(GPU_Buffers *buffers, CCGElem **grids,
}
/* Returns the number of visible quads in the nodes' grids. */
-static int gpu_count_grid_quads(BLI_bitmap *grid_hidden,
+static int gpu_count_grid_quads(BLI_bitmap **grid_hidden,
int *grid_indices, int totgrid,
int gridsize)
{
@@ -1697,7 +1697,7 @@ static int gpu_count_grid_quads(BLI_bitmap *grid_hidden,
* visibility */
for (i = 0, totquad = 0; i < totgrid; i++) {
- const BLI_bitmap gh = grid_hidden[grid_indices[i]];
+ const BLI_bitmap *gh = grid_hidden[grid_indices[i]];
if (gh) {
/* grid hidden are present, have to check each element */
@@ -1732,7 +1732,7 @@ static int gpu_count_grid_quads(BLI_bitmap *grid_hidden,
GL_WRITE_ONLY_ARB); \
if (quad_data) { \
for (i = 0; i < totgrid; ++i) { \
- BLI_bitmap gh = NULL; \
+ BLI_bitmap *gh = NULL; \
if (grid_hidden) \
gh = grid_hidden[(grid_indices)[i]]; \
\
@@ -1770,7 +1770,7 @@ static GLuint gpu_get_grid_buffer(int gridsize, GLenum *index_type, unsigned *to
static unsigned prev_totquad;
/* used in the FILL_QUAD_BUFFER macro */
- const BLI_bitmap *grid_hidden = NULL;
+ BLI_bitmap * const *grid_hidden = NULL;
int *grid_indices = NULL;
int totgrid = 1;
@@ -1815,7 +1815,7 @@ static GLuint gpu_get_grid_buffer(int gridsize, GLenum *index_type, unsigned *to
}
GPU_Buffers *GPU_build_grid_buffers(int *grid_indices, int totgrid,
- BLI_bitmap *grid_hidden, int gridsize)
+ BLI_bitmap **grid_hidden, int gridsize)
{
GPU_Buffers *buffers;
int totquad;
@@ -2200,7 +2200,7 @@ static void gpu_draw_buffers_legacy_grids(GPU_Buffers *buffers)
for (i = 0; i < buffers->totgrid; ++i) {
int g = buffers->grid_indices[i];
CCGElem *grid = buffers->grids[g];
- BLI_bitmap gh = buffers->grid_hidden[g];
+ BLI_bitmap *gh = buffers->grid_hidden[g];
/* TODO: could use strips with hiding as well */