Fix for bug #17722: sun light in the texture viewmode was broken.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 2 Oct 2008 23:04:28 +0000 (23:04 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 2 Oct 2008 23:04:28 +0000 (23:04 +0000)
source/blender/gpu/intern/gpu_draw.c

index 700dd6dedb238eb5066abf182a7b3021f713ffe3..85a1a059b75e41b13333306ce42554b0bffb9a69 100644 (file)
@@ -1046,7 +1046,7 @@ int GPU_scene_object_lights(Scene *scene, Object *ob, int lay, float viewmat[][4
                
                if(la->type==LA_SUN) {
                        /* sun lamp */
-                       VECCOPY(position, base->object->obmat[2]);
+                       VECCOPY(direction, base->object->obmat[2]);
                        direction[3]= 0.0;
 
                        glLightfv(GL_LIGHT0+count, GL_POSITION, direction);