From 705e6d76fbbff2dba12cdfe6b34da61f45f09ed2 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Sat, 23 Jan 2016 01:13:36 -0500 Subject: [PATCH] OpenGL: tiny state-change fix Only re-enable blending if the function that disables it was actually called. Still not ideal flipping this on & off repeatedly, but now there are fewer flips. --- source/blender/editors/space_view3d/view3d_draw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 3803b7b288f..cb9e0d15984 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -633,10 +633,10 @@ static void draw_view_axis(RegionView3D *rv3d, rcti *rect) if (fabsf(dx) > toll || fabsf(dy) > toll) { BLF_draw_default_ascii(startx + dx + 2, starty + dy + ydisp + 2, 0.0f, axis_text, 1); - } - /* BLF_draw_default disables blending */ - glEnable(GL_BLEND); + /* BLF_draw_default disables blending */ + glEnable(GL_BLEND); + } } glDisable(GL_BLEND);