Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / space_view3d / view3d_draw.c
index 445a4cb..0e012b4 100644 (file)
@@ -657,7 +657,6 @@ static void draw_rotation_guide(RegionView3D *rv3d)
 
        glEnable(GL_BLEND);
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-       glShadeModel(GL_SMOOTH);
        glPointSize(5);
        glEnable(GL_POINT_SMOOTH);
        glDepthMask(0);  /* don't overwrite zbuf */
@@ -1332,11 +1331,6 @@ static void backdrawview3d(Scene *scene, wmWindow *win, ARegion *ar, View3D *v3d
        {
                /* do nothing */
        }
-       else if ((base && (base->object->mode & OB_MODE_PARTICLE_EDIT)) &&
-                V3D_IS_ZBUF(v3d))
-       {
-               /* do nothing */
-       }
        else if (scene->obedit &&
                 V3D_IS_ZBUF(v3d))
        {
@@ -2999,18 +2993,16 @@ static void view3d_main_region_clear(Scene *scene, View3D *v3d, ARegion *ar)
                                glLoadIdentity();
                                glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
                        }
-
+                       // Draw world
                        glEnable(GL_DEPTH_TEST);
                        glDepthFunc(GL_ALWAYS);
-                       glShadeModel(GL_SMOOTH);
                        glBegin(GL_TRIANGLE_STRIP);
                        glVertex3f(-1.0, -1.0, 1.0);
                        glVertex3f(1.0, -1.0, 1.0);
                        glVertex3f(-1.0, 1.0, 1.0);
                        glVertex3f(1.0, 1.0, 1.0);
                        glEnd();
-                       glShadeModel(GL_FLAT);
-
+                       //
                        if (material_not_bound) {
                                glMatrixMode(GL_PROJECTION);
                                glPopMatrix();
@@ -3048,8 +3040,6 @@ static void view3d_main_region_clear(Scene *scene, View3D *v3d, ARegion *ar)
                        glPushMatrix();
                        glLoadIdentity();
 
-                       glShadeModel(GL_SMOOTH);
-
                        /* calculate buffers the first time only */
                        if (!buf_calculated) {
                                for (x = 0; x < VIEWGRAD_RES_X; x++) {
@@ -3135,8 +3125,6 @@ static void view3d_main_region_clear(Scene *scene, View3D *v3d, ARegion *ar)
                        glMatrixMode(GL_MODELVIEW);
                        glPopMatrix();
 
-                       glShadeModel(GL_FLAT);
-
 #undef VIEWGRAD_RES_X
 #undef VIEWGRAD_RES_Y
                }
@@ -3160,7 +3148,6 @@ static void view3d_main_region_clear(Scene *scene, View3D *v3d, ARegion *ar)
 
                        glEnable(GL_DEPTH_TEST);
                        glDepthFunc(GL_ALWAYS);
-                       glShadeModel(GL_SMOOTH);
                        glBegin(GL_QUADS);
                        UI_ThemeColor(TH_LOW_GRAD);
                        glVertex3f(-1.0, -1.0, 1.0);
@@ -3169,8 +3156,6 @@ static void view3d_main_region_clear(Scene *scene, View3D *v3d, ARegion *ar)
                        glVertex3f(1.0, 1.0, 1.0);
                        glVertex3f(-1.0, 1.0, 1.0);
                        glEnd();
-                       glShadeModel(GL_FLAT);
-
                        glDepthFunc(GL_LEQUAL);
                        glDisable(GL_DEPTH_TEST);