diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_batch_presets.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch_presets.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/source/blender/gpu/intern/gpu_batch_presets.c b/source/blender/gpu/intern/gpu_batch_presets.c index d16edab5ac9..3d9b4326c7e 100644 --- a/source/blender/gpu/intern/gpu_batch_presets.c +++ b/source/blender/gpu/intern/gpu_batch_presets.c @@ -129,12 +129,11 @@ GPUBatch *GPU_batch_preset_sphere(int lod) if (lod == 0) { return g_presets_3d.batch.sphere_low; } - else if (lod == 1) { + if (lod == 1) { return g_presets_3d.batch.sphere_med; } - else { - return g_presets_3d.batch.sphere_high; - } + + return g_presets_3d.batch.sphere_high; } GPUBatch *GPU_batch_preset_sphere_wire(int lod) @@ -145,9 +144,8 @@ GPUBatch *GPU_batch_preset_sphere_wire(int lod) if (lod == 0) { return g_presets_3d.batch.sphere_wire_low; } - else { - return g_presets_3d.batch.sphere_wire_med; - } + + return g_presets_3d.batch.sphere_wire_med; } /** \} */ @@ -406,4 +404,17 @@ void gpu_batch_presets_exit(void) BLI_mutex_end(&g_presets_3d.mutex); } +/** + * This function only needs to be accessed externally because + * we are drawing UI batches with the DRW old context. + * + * And now we use it for drawing the entire area. + * + * XXX (Clément) - to cleanup in the upcoming 2.91 refactor. + **/ +void GPU_batch_presets_reset() +{ + gpu_batch_presets_reset(); +} + /** \} */ |