diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-04-06 17:31:22 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-04-06 17:51:48 +0300 |
commit | 60d873bd22121a089101fe6058e0e6aba0467234 (patch) | |
tree | 6f645f7cf25bb2debf0c4c9ac36371f6929a7870 /source/blender/gpu/GPU_batch_presets.h | |
parent | 71b1ee940bb0b8e159700e53137883b6995859ce (diff) |
GPU: Panel Drag Widget Drawing Performance
The 10g Intel/Win driver doesn't work well with our emulated
intermediate mode. This patch alters the drawing of the drag widget of
the panels to reduce unneeded drawing.
The previous method would draw 16 boxes per widget. This new way would
cache this drawing in a GPU batch and just move the matrix around.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D7345
Diffstat (limited to 'source/blender/gpu/GPU_batch_presets.h')
-rw-r--r-- | source/blender/gpu/GPU_batch_presets.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_batch_presets.h b/source/blender/gpu/GPU_batch_presets.h index ba8ad3c4990..eb803333d98 100644 --- a/source/blender/gpu/GPU_batch_presets.h +++ b/source/blender/gpu/GPU_batch_presets.h @@ -39,6 +39,10 @@ extern "C" { /* Replacement for gluSphere */ struct GPUBatch *GPU_batch_preset_sphere(int lod) ATTR_WARN_UNUSED_RESULT; struct GPUBatch *GPU_batch_preset_sphere_wire(int lod) ATTR_WARN_UNUSED_RESULT; +struct GPUBatch *GPU_batch_preset_panel_drag_widget(const float pixelsize, + const float col_high[4], + const float col_dark[4], + const float width) ATTR_WARN_UNUSED_RESULT; void gpu_batch_presets_init(void); void gpu_batch_presets_register(struct GPUBatch *preset_batch); |