[Bf-blender-cvs] [6a3dd21edd] blender2.8: OpenGL: remove obsolete GL_POINT_SMOOTH

Mike Erwin noreply at git.blender.org
Tue Feb 28 10:39:58 CET 2017


Commit: 6a3dd21eddcfc6e4352e0246d889f0eee6dfb44a
Author: Mike Erwin
Date:   Tue Feb 28 03:09:44 2017 -0500
Branches: blender2.8
https://developer.blender.org/rB6a3dd21eddcfc6e4352e0246d889f0eee6dfb44a

OpenGL: remove obsolete GL_POINT_SMOOTH

Was only used in one place, to show the 3D mouse rotation center.

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

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 325c81a3fd..a9af383ee1 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1676,8 +1676,6 @@ static void draw_rotation_guide(RegionView3D *rv3d)
 
 	glEnable(GL_BLEND);
 	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-	glPointSize(5.0f);
-	glEnable(GL_POINT_SMOOTH);
 	glDepthMask(GL_FALSE);  /* don't overwrite zbuf */
 
 	VertexFormat *format = immVertexFormat();
@@ -1756,7 +1754,11 @@ static void draw_rotation_guide(RegionView3D *rv3d)
 	else
 		color[3] = 127;  /* see-through dot */
 
+	immUnbindProgram();
+
 	/* -- draw rotation center -- */
+	immBindBuiltinProgram(GPU_SHADER_3D_POINT_FIXED_SIZE_VARYING_COLOR);
+	glPointSize(5.0f);
 	immBegin(GL_POINTS, 1);
 	immAttrib4ubv(col, color);
 	immVertex3fv(pos, o);
@@ -1771,7 +1773,6 @@ static void draw_rotation_guide(RegionView3D *rv3d)
 #endif
 
 	glDisable(GL_BLEND);
-	glDisable(GL_POINT_SMOOTH);
 	glDepthMask(GL_TRUE);
 }
 #endif /* WITH_INPUT_NDOF */




More information about the Bf-blender-cvs mailing list