Potential fix for #27257: menus disappear particle edit mode wireframe draw.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 2 May 2011 12:50:26 +0000 (12:50 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 2 May 2011 12:50:26 +0000 (12:50 +0000)
Depth test got re-enabled without check if it was necessary.

source/blender/editors/space_view3d/drawobject.c

index ed9d6f77ffa5f9a3da769a1e4cc7fa620edde654..a3a139181d5bfa680e62fa5ad79f7e8c0f9669a7 100644 (file)
@@ -4217,7 +4217,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit)
        glDisableClientState(GL_NORMAL_ARRAY);
        glDisableClientState(GL_VERTEX_ARRAY);
        glShadeModel(GL_FLAT);
-       glEnable(GL_DEPTH_TEST);
+       if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
        glLineWidth(1.0f);
        glPointSize(1.0);
 }