diff options
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_buffers.h | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index a1ab1451647..7ca1c878448 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -116,7 +116,7 @@ typedef struct GPUDrawObject { /* if there was a failure allocating some buffer, use old * rendering code */ - int legacy; + bool legacy; } GPUDrawObject; /* used for GLSL materials */ @@ -161,7 +161,7 @@ void GPU_buffer_draw_elements(GPUBuffer *elements, unsigned int mode, int start, void GPU_buffer_unbind(void); /* used to check whether to use the old (without buffers) code */ -int GPU_buffer_legacy(struct DerivedMesh *dm); +bool GPU_buffer_legacy(struct DerivedMesh *dm); /* Buffers for non-DerivedMesh drawing */ typedef struct GPU_PBVH_Buffers GPU_PBVH_Buffers; diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 8bbd02ae9c9..194ea2b3b81 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -594,7 +594,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object, int *mat_orig_to_new; int *cur_index_per_mat; int i; - int success; + bool success; GLboolean uploaded; pool = gpu_get_global_buffer_pool(); @@ -1283,13 +1283,13 @@ void GPU_color_switch(int mode) /* return 1 if drawing should be done using old immediate-mode * code, 0 otherwise */ -int GPU_buffer_legacy(DerivedMesh *dm) +bool GPU_buffer_legacy(DerivedMesh *dm) { int test = (U.gameflags & USER_DISABLE_VBO); if (test) return 1; - if (dm->drawObject == 0) + if (dm->drawObject == NULL) dm->drawObject = GPU_drawobject_new(dm); return dm->drawObject->legacy; } |