diff options
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index ae2e6744160..a3adf65cd84 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -1133,14 +1133,17 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), const rcti sizey_solid = sizey / 4; y1 = rect->ymin; + /* Drawing the checkerboard. + * This could be optimized with a single checkerboard shader, + * instead of drawing twice and using stippling the second time. */ /* layer: background, to show tranparency */ glColor4ub(UI_ALPHA_CHECKER_DARK, UI_ALPHA_CHECKER_DARK, UI_ALPHA_CHECKER_DARK, 255); glRectf(x1, y1, x1 + sizex, rect->ymax); - glEnable(GL_POLYGON_STIPPLE); + GPU_basic_shader_bind(GPU_SHADER_STIPPLE | GPU_SHADER_USE_COLOR); glColor4ub(UI_ALPHA_CHECKER_LIGHT, UI_ALPHA_CHECKER_LIGHT, UI_ALPHA_CHECKER_LIGHT, 255); - glPolygonStipple(stipple_checker_8px); + GPU_basic_shader_stipple(GPU_SHADER_STIPPLE_CHECKER_8PX); glRectf(x1, y1, x1 + sizex, rect->ymax); - glDisable(GL_POLYGON_STIPPLE); + GPU_basic_shader_bind(GPU_SHADER_USE_COLOR); /* layer: color ramp */ glShadeModel(GL_FLAT); |