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.
This commit is contained in:
Mike Erwin
2016-01-23 01:13:36 -05:00
parent e25ba162c0
commit 705e6d76fb

View File

@@ -633,10 +633,10 @@ static void draw_view_axis(RegionView3D *rv3d, rcti *rect)
if (fabsf(dx) > toll || fabsf(dy) > toll) { 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_ascii(startx + dx + 2, starty + dy + ydisp + 2, 0.0f, axis_text, 1);
}
/* BLF_draw_default disables blending */ /* BLF_draw_default disables blending */
glEnable(GL_BLEND); glEnable(GL_BLEND);
}
} }
glDisable(GL_BLEND); glDisable(GL_BLEND);