summaryrefslogtreecommitdiff
path: root/opengl/libagl/light.cpp
diff options
context:
space:
mode:
author Android (Google) Code Review <android-gerrit@google.com> 2009-06-03 15:07:26 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2009-06-03 15:07:26 -0700
commit5de674e1cbd6e43b6d7954ccacf5cd709b30265d (patch)
tree2cb0c8cfecd313046671126de66e903e1c927472 /opengl/libagl/light.cpp
parentb9a39cd300998a1a4577ac7eb87f9b505b8621dc (diff)
parent7c7dface993a66778c506179ae11cadd6a88f7b1 (diff)
Merge change 3013 into donut
* changes: fix a bug in GL lighting where the specular component could be ommited when vertex material was disabled.
Diffstat (limited to 'opengl/libagl/light.cpp')
-rw-r--r--opengl/libagl/light.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/opengl/libagl/light.cpp b/opengl/libagl/light.cpp
index 25c41d0c5b9d..bc9449c0bdef 100644
--- a/opengl/libagl/light.cpp
+++ b/opengl/libagl/light.cpp
@@ -318,6 +318,11 @@ void lightVertexMaterial(ogles_context_t* c, vertex_t* v)
vmul3(l.implicitAmbient.v, material.ambient.v, l.ambient.v);
vmul3(l.implicitDiffuse.v, material.diffuse.v, l.diffuse.v);
vmul3(l.implicitSpecular.v, material.specular.v, l.specular.v);
+ // this is just a flag to tell if we have a specular component
+ l.implicitSpecular.v[3] =
+ l.implicitSpecular.r |
+ l.implicitSpecular.g |
+ l.implicitSpecular.b;
}
// emission and ambient for the whole scene
vmla3( c->lighting.implicitSceneEmissionAndAmbient.v,