diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-09 23:08:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-09 23:09:11 +0300 |
commit | efd547f3da10a247fdcff66e74f9b98ec3abdd39 (patch) | |
tree | ef4a5d2b3fc8cc7c03eeefc00dfa87a4a0bb238e /source/blender/editors/interface/interface_draw.c | |
parent | 6798809c7ec8388509f541a64359b3d107e6fd3f (diff) |
GPU: avoid multiple bind calls in GPU_draw_pbvh_buffers
Also add utility functions: GPU_basic_shader_bind_enable/disable
so we don't have to get the previous state every time and manipulate it
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index d78b41820b4..3afea54bc0a 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -1205,8 +1205,7 @@ void ui_draw_but_UNITVEC(uiBut *but, uiWidgetColors *wcol, const rcti *rect) qobj = gluNewQuadric(); gluQuadricDrawStyle(qobj, GLU_FILL); - int bound_options = GPU_basic_shader_bound_options(); - GPU_basic_shader_bind(bound_options); + GPU_basic_shader_bind(GPU_basic_shader_bound_options()); gluSphere(qobj, 100.0, 32, 24); gluDeleteQuadric(qobj); |