Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / space_view3d / drawarmature.c
index f7c1e2ee9818901207e584ccfd0090bb65b1439c..f41712218163dd90cff4426968bd459f423e87e7 100644 (file)
@@ -431,10 +431,9 @@ static void draw_bonevert_solid(void)
                glNewList(displist, GL_COMPILE);
                
                qobj = gluNewQuadric();
-               gluQuadricDrawStyle(qobj, GLU_FILL); 
-               glShadeModel(GL_SMOOTH);
+               gluQuadricDrawStyle(qobj, GLU_FILL);
+               // Draw tips of a bone
                gluSphere(qobj, 0.05, 8, 5);
-               glShadeModel(GL_FLAT);
                gluDeleteQuadric(qobj);  
                
                glEndList();
@@ -890,7 +889,6 @@ static void draw_sphere_bone(const short dt, int armflag, int boneflag, short co
                GPU_basic_shader_bind(GPU_SHADER_LIGHTING | GPU_SHADER_USE_COLOR);
                
                gluQuadricDrawStyle(qobj, GLU_FILL); 
-               glShadeModel(GL_SMOOTH);
        }
        else {
                gluQuadricDrawStyle(qobj, GLU_SILHOUETTE); 
@@ -968,7 +966,6 @@ static void draw_sphere_bone(const short dt, int armflag, int boneflag, short co
        
        /* restore */
        if (dt == OB_SOLID) {
-               glShadeModel(GL_FLAT);
                GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
        }
        
@@ -1769,7 +1766,6 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
                /* and draw blended distances */
                if (arm->flag & ARM_POSEMODE) {
                        glEnable(GL_BLEND);
-                       //glShadeModel(GL_SMOOTH);
                        
                        if (v3d->zbuf) glDisable(GL_DEPTH_TEST);
                        
@@ -1792,7 +1788,6 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
                        
                        if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
                        glDisable(GL_BLEND);
-                       //glShadeModel(GL_FLAT);
                }
        }
        
@@ -2216,7 +2211,6 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt)
                
                /* and draw blended distances */
                glEnable(GL_BLEND);
-               //glShadeModel(GL_SMOOTH);
                
                if (v3d->zbuf) glDisable(GL_DEPTH_TEST);
 
@@ -2231,7 +2225,6 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt)
                
                if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
                glDisable(GL_BLEND);
-               //glShadeModel(GL_FLAT);
        }
        
        /* if solid we draw it first */