[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52558] trunk/blender/source/blender/ editors/space_view3d/drawmesh.c: Fix #33292: cycles material draw mode selection not working on some cards, now
Brecht Van Lommel
brechtvanlommel at pandora.be
Mon Nov 26 09:00:17 CET 2012
Revision: 52558
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52558
Author: blendix
Date: 2012-11-26 08:00:15 +0000 (Mon, 26 Nov 2012)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_view3d/drawmesh.c
Modified: trunk/blender/source/blender/editors/space_view3d/drawmesh.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawmesh.c 2012-11-26 06:59:59 UTC (rev 52557)
+++ trunk/blender/source/blender/editors/space_view3d/drawmesh.c 2012-11-26 08:00:15 UTC (rev 52558)
@@ -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 @@
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 @@
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,
More information about the Bf-blender-cvs
mailing list