diff options
| author | 2008-12-19 08:31:54 -0800 | |
|---|---|---|
| committer | 2008-12-19 08:31:54 -0800 | |
| commit | 772a89695f179b51d16b26c1b0d946aa3e850e70 (patch) | |
| tree | 9a9fdadd1301625f875a3c126c986c79e3363ac4 /opengl/libagl/light.cpp | |
| parent | d34e59679f6a98e9e67ef4bd18da6e5a86d386bc (diff) | |
| parent | e09fd9e819c23dc90bca68375645e15544861330 (diff) | |
Merge commit 'remotes/korg/cupcake'
Conflicts:
	core/java/com/android/internal/app/AlertController.java
	core/res/res/values/strings.xml
	media/java/android/media/AudioSystem.java
	services/java/com/android/server/LocationManagerService.java
Diffstat (limited to 'opengl/libagl/light.cpp')
| -rw-r--r-- | opengl/libagl/light.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/opengl/libagl/light.cpp b/opengl/libagl/light.cpp index 87725cb3a3..25c41d0c5b 100644 --- a/opengl/libagl/light.cpp +++ b/opengl/libagl/light.cpp @@ -117,11 +117,11 @@ int32_t clampF(GLfixed f) {  }  static GLfixed fog_linear(ogles_context_t* c, GLfixed z) { -    return clampF(gglMulx((c->fog.end - z), c->fog.invEndMinusStart)); +    return clampF(gglMulx((c->fog.end - ((z<0)?-z:z)), c->fog.invEndMinusStart));  }  static GLfixed fog_exp(ogles_context_t* c, GLfixed z) { -    const float e = fixedToFloat(gglMulx(c->fog.density, z)); +    const float e = fixedToFloat(gglMulx(c->fog.density, ((z<0)?-z:z)));      return clampF(gglFloatToFixed(fastexpf(-e)));  } @@ -556,11 +556,11 @@ static void fogx(GLenum pname, GLfixed param, ogles_context_t* c)          ogles_error(c, GL_INVALID_VALUE);          break;      case GL_FOG_START: -        c->fog.start = gglClampx(param); +        c->fog.start = param;          c->fog.invEndMinusStart = gglRecip(c->fog.end - c->fog.start);          break;      case GL_FOG_END: -        c->fog.end = gglClampx(param); +        c->fog.end = param;          c->fog.invEndMinusStart = gglRecip(c->fog.end - c->fog.start);          break;      case GL_FOG_MODE: |