diff options
Diffstat (limited to 'source/blender/editors/space_view3d/drawmesh.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index f35a844afc9..0ecde350b00 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -51,6 +51,7 @@ #include "BKE_DerivedMesh.h" #include "BKE_effect.h" +#include "BKE_global.h" #include "BKE_image.h" #include "BKE_material.h" #include "BKE_paint.h" @@ -965,7 +966,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Mesh *me = ob->data; TexMatCallback data = {scene, ob, me, dm}; int (*set_face_cb)(void *, int); - int glsl; + int glsl, picking = (G.f & G_PICKSEL); /* face hiding callback depending on mode */ if (ob == scene->obedit) @@ -976,11 +977,11 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, set_face_cb = NULL; /* test if we can use glsl */ - glsl = (v3d->drawtype == OB_MATERIAL) && GPU_glsl_support(); + glsl = (v3d->drawtype == OB_MATERIAL) && GPU_glsl_support() && !picking; GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL); - if (glsl) { + if (glsl || picking) { /* draw glsl */ dm->drawMappedFacesMat(dm, tex_mat_set_material_cb, |