From dcdf768147d81551864cbc415dfd69176a3fc173 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 3 May 2012 09:31:59 +0000 Subject: Fix #31108: entering local view with glsl shows objects black. Now keeps lamps affecting the material even if they are not part of the local view. --- source/blender/gpu/intern/gpu_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 09ed3c6f5fb..1c1cf8017f6 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -1087,7 +1087,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O GMS.gob = ob; GMS.gscene = scene; GMS.totmat= ob->totcol+1; /* materials start from 1, default material is 0 */ - GMS.glay= v3d->lay; + GMS.glay= (v3d->localvd)? v3d->localvd->lay: v3d->lay; /* keep lamps visible in local view */ GMS.gviewmat= rv3d->viewmat; GMS.gviewinv= rv3d->viewinv; -- cgit v1.2.3