From 60319e25f246128f51009c2f3bb731e4218bd008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 22 May 2019 11:31:49 +0200 Subject: GPU: Refactor GPU_batch_draw_range_ex Rename it to GPU_batch_draw_advanced and use base instance when possible. Also add GPU_batch_bind to bind the vao independantly of drawing commands. --- source/blender/draw/intern/draw_manager.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/draw/intern/draw_manager.c') diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 54d6752784a..cabf6849e43 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -365,7 +365,8 @@ void DRW_transform_none(GPUTexture *tex) GPU_batch_uniform_mat4(geom, "ModelViewProjectionMatrix", mat); GPU_batch_program_use_begin(geom); - GPU_batch_draw_range_ex(geom, 0, 0, false); + GPU_batch_bind(geom); + GPU_batch_draw_advanced(geom, 0, 0, 0, 0); GPU_batch_program_use_end(geom); GPU_texture_unbind(tex); @@ -456,7 +457,8 @@ void DRW_multisamples_resolve(GPUTexture *src_depth, GPUTexture *src_color, bool /* avoid gpuMatrix calls */ GPU_batch_program_use_begin(geom); - GPU_batch_draw_range_ex(geom, 0, 0, false); + GPU_batch_bind(geom); + GPU_batch_draw_advanced(geom, 0, 0, 0, 0); GPU_batch_program_use_end(geom); } -- cgit v1.2.3