Fix #33292: cycles material draw mode selection not working on some cards, now
skip glsl for picking as was already done for other GLSL drawing.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user