History log of /frameworks/native/opengl/libagl/light.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
92dc3fc52cf097bd105460cf377779bdcf146d62 12-Mar-2014 Mark Salyzyn <salyzyn@google.com> native frameworks: 64-bit compile issues

- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)

Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
/frameworks/native/opengl/libagl/light.cpp
d5b1cda91ea5826e0fe8fa20d7daad57dc9ffd8b 23-Apr-2012 Martin Storsjo <martin@martin.st> libagl: Transform the vertex if using eye space lighting with point lights

This fixes lighting when using point lights, when eye space
lighting is used (which is the default).

Change-Id: I0cd0d2329893d6b5f8af3b1e595274c2076fc322
/frameworks/native/opengl/libagl/light.cpp
04a3f57d19b471c21f3c83c50793a94908cafdc7 03-Feb-2010 Mathias Agopian <mathias@google.com> fix [2133133] Software OpenGL ES Lighting is buggy (GL Gears washed out bug)

A typo caused GL_AMBIENT_AND_DIFFUSE to only set the the ambient color.

Fix another typo which caused the viewer position to be wrong for
specular highlights.

Switch back to eye-space lighting, since there are still some issues
with some demos (San Angeles in particular).
/frameworks/native/opengl/libagl/light.cpp
e03eaa1551a644e9a13c327d16cc09bfd7649d78 11-Aug-2009 Martin Storsjo <martin@martin.st> Calculate specular lighting correctly

Since the lighting calculations are done in object space, the vector
from the object to the viewer also needs to be transformed to object
space.
/frameworks/native/opengl/libagl/light.cpp
69ca17a12444ef619952b783ddaac121a0d438e5 03-Jun-2009 Mathias Agopian <mathias@google.com> fix [1610840] Positional light doesn't work correctly on emulator

This bug was introduced when lighting computations was changed from eye-space to object-space.
The light position need to be transformed back to object-space each time the modelview matrix changes which requires us to compute the inverse of the modelview matrix. This computation was done with the assumption that normals where transformed (which was the case when the computation was made in eye-space), however, normals only require the inverse of the upper 3x3 matrix while transforming positions requires the inverse of the whole matrix.
This caused the interesting behavior that lights were more-or-less transformed properly, but not translated at all, which caused improper lighting with directional lights in particular.

There was also another smaller bug affecting directional lights: when vertices are read, only the active component are read, the other ones are ignored, later, the transformation operations are set up to ignore the unset values, howver, in the case of lighting, we use the vertex in object space (that is, before it is transformed), and therefore were using uninitalized values; in particular w.
/frameworks/native/opengl/libagl/light.cpp
50aba6d31d3ddd0c4dc13292822b7fabade2b6c3 03-Jun-2009 Mathias Agopian <mathias@google.com> 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.
/frameworks/native/opengl/libagl/light.cpp
edbf3b6af777b721cd2a1ef461947e51e88241e1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/native/opengl/libagl/light.cpp
d5193d9394c5e58176d7bcdf50ef017f8a3b9e1e 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/native/opengl/libagl/light.cpp
e09fd9e819c23dc90bca68375645e15544861330 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/native/opengl/libagl/light.cpp
7c1b96a165f970a09ed239bb4fb3f1b0d8f2a407 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/native/opengl/libagl/light.cpp