Get rid of last deprecated OpenGL calls in arrow_manipulator.c
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 11 Apr 2017 10:47:38 +0000 (12:47 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 11 Apr 2017 10:47:38 +0000 (12:47 +0200)
Hope that makes sense...

source/blender/windowmanager/manipulators/intern/manipulator_library/arrow_manipulator.c

index 8775b37374864baa0e491eb045ce9b82f04ca3e5..3cb67259e03793a5fc48461d1640a410b6b8d890 100644 (file)
@@ -169,15 +169,12 @@ static void arrow_draw_geom(const ArrowManipulator *arrow, const bool select, co
                        gpuTranslate3f(0.0f, 0.0f, arrow->len);
 
                        if (use_lighting) {
-                               glShadeModel(GL_SMOOTH);
+                               immUnbindProgram();
+                               immBindBuiltinProgram(GPU_SHADER_3D_SMOOTH_COLOR);
                        }
 
                        imm_draw_circle_fill_3d(pos, 0.0, 0.0, width, 8);
                        imm_draw_cylinder_fill_3d(pos, width, 0.0, len, 8, 1);
-
-                       if (use_lighting) {
-                               glShadeModel(GL_FLAT);
-                       }
                }
 
                gpuPopMatrix();