[Bf-blender-cvs] [705e6d7] master: OpenGL: tiny state-change fix

Mike Erwin noreply at git.blender.org
Sat Jan 23 08:30:01 CET 2016


Commit: 705e6d76fbbff2dba12cdfe6b34da61f45f09ed2
Author: Mike Erwin
Date:   Sat Jan 23 01:13:36 2016 -0500
Branches: master
https://developer.blender.org/rB705e6d76fbbff2dba12cdfe6b34da61f45f09ed2

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.

===================================================================

M	source/blender/editors/space_view3d/view3d_draw.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 3803b7b..cb9e0d1 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);




More information about the Bf-blender-cvs mailing list