diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-11-03 18:04:49 -0500 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-11-03 18:04:49 -0500 |
commit | 33e18e4ec7fc0083fc00a183e4f01418db263420 (patch) | |
tree | c3091c7f5228de97e8c350b41c3fce19369a5014 /opengl/libagl | |
parent | 374661062231783a97de19f5551d0e5af4dbba6e (diff) | |
parent | b44efdc6ba8fc792d10ea7560c2f03292b253c7b (diff) | |
download | frameworks_native-33e18e4ec7fc0083fc00a183e4f01418db263420.zip frameworks_native-33e18e4ec7fc0083fc00a183e4f01418db263420.tar.gz frameworks_native-33e18e4ec7fc0083fc00a183e4f01418db263420.tar.bz2 |
Merge change I56981989 into eclair
* changes:
fix [2231527] Compatibility with SpaceJunk game (OpenGL)
Diffstat (limited to 'opengl/libagl')
-rw-r--r-- | opengl/libagl/matrix.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/opengl/libagl/matrix.cpp b/opengl/libagl/matrix.cpp index 21ef50e..3c50977 100644 --- a/opengl/libagl/matrix.cpp +++ b/opengl/libagl/matrix.cpp @@ -741,20 +741,19 @@ void point4__generic(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) { void point4__mvui(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) { // this used for transforming light positions back to object space. - // Lights have 3 components positions, so w is always 1. - // however, it is used as a switch for directional lights, so we need + // w is used as a switch for directional lights, so we need // to preserve it. const GLfixed* const m = mx->matrix.m; const GLfixed rx = rhs->x; const GLfixed ry = rhs->y; const GLfixed rz = rhs->z; - lhs->x = mla3a(rx, m[ 0], ry, m[ 4], rz, m[ 8], m[12]); - lhs->y = mla3a(rx, m[ 1], ry, m[ 5], rz, m[ 9], m[13]); - lhs->z = mla3a(rx, m[ 2], ry, m[ 6], rz, m[10], m[14]); - lhs->w = rhs->w; + const GLfixed rw = rhs->w; + lhs->x = mla4(rx, m[ 0], ry, m[ 4], rz, m[ 8], rw, m[12]); + lhs->y = mla4(rx, m[ 1], ry, m[ 5], rz, m[ 9], rw, m[13]); + lhs->z = mla4(rx, m[ 2], ry, m[ 6], rz, m[10], rw, m[14]); + lhs->w = rw; } - void point2__nop(transform_t const*, vec4_t* lhs, vec4_t const* rhs) { lhs->z = 0; lhs->w = 0x10000; |