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:
authorClément Foucault <foucault.clem@gmail.com>2019-05-22 12:31:49 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-22 14:29:05 +0300
commit60319e25f246128f51009c2f3bb731e4218bd008 (patch)
treea1b9b9a9127f09f2e1644fa4ab79e898ae05e6cc /source/blender/draw/intern/draw_manager.c
parent55780d9866ec9ab93f7f25f2ada41ae5d6e9dabb (diff)
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.
Diffstat (limited to 'source/blender/draw/intern/draw_manager.c')
-rw-r--r--source/blender/draw/intern/draw_manager.c6
1 files changed, 4 insertions, 2 deletions
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);
}