diff options
author | Mathias Agopian <mathias@google.com> | 2009-06-02 22:51:09 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-06-02 22:51:09 -0700 |
commit | 50aba6d31d3ddd0c4dc13292822b7fabade2b6c3 (patch) | |
tree | 75d6c80ca4fb79e36354b41ab7db6fa157b25fb6 /opengl/libagl | |
parent | 446393bafdb63dc2ebd75819629821adb757b88f (diff) | |
download | frameworks_native-50aba6d31d3ddd0c4dc13292822b7fabade2b6c3.zip frameworks_native-50aba6d31d3ddd0c4dc13292822b7fabade2b6c3.tar.gz frameworks_native-50aba6d31d3ddd0c4dc13292822b7fabade2b6c3.tar.bz2 |
fix a bug in GL lighting where the specular component could be ommited when vertex material was disabled.
the specular enable flag wasn't computed in that case.
Diffstat (limited to 'opengl/libagl')
-rw-r--r-- | opengl/libagl/light.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/opengl/libagl/light.cpp b/opengl/libagl/light.cpp index 25c41d0..bc9449c 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, |