replicant-frameworks_native/opengl
Mathias Agopian 69ca17a124 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.
2009-06-03 15:09:52 -07:00
..
include remove the gl{Vertex|Color|TexCoord|Normal}PointerBounds() "extension" fro eglext.h 2009-05-08 17:18:55 -07:00
libagl fix [1610840] Positional light doesn't work correctly on emulator 2009-06-03 15:09:52 -07:00
libs make sure to fail to software when the h/w renderer cannot be initialized 2009-05-20 17:58:36 -07:00
tests simplify this test 2009-06-02 18:35:48 -07:00
tools/glgen Fix bug 1856713 gl Pointer functions should use Buffer position 2009-05-15 18:13:34 -07:00