Do not use transparent rendering in 3d viewport for objects which are in edit mode

Transparent rendering can't be implemented in way it gives accurate shading in
3d viewport. It's acceptable for object mode, but when you're in edit mode
it gives more problems than benefits of seeing transparent faces.

This is possible fix for for weird polygons in [#29255] Object invisible and weird polygons appearance
This commit is contained in:
Sergey Sharybin 2011-11-25 12:55:42 +00:00
parent 3a2cb0e3a8
commit 951c1798ab

@ -3264,15 +3264,11 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
if(dt>OB_WIRE) {
glsl = draw_glsl_material(scene, ob, v3d, dt);
check_alpha = check_material_alpha(base, glsl);
GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl,
(check_alpha)? &do_alpha_pass: NULL);
GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
}
// transp in editmode makes the fancy draw over go bad
if (!do_alpha_pass)
draw_em_fancy(scene, v3d, rv3d, ob, em, cageDM, finalDM, dt);
draw_em_fancy(scene, v3d, rv3d, ob, em, cageDM, finalDM, dt);
GPU_end_object_materials();