summaryrefslogtreecommitdiff
path: root/opengl/libagl/matrix.cpp
diff options
context:
space:
mode:
author The Android Open Source Project <initial-contribution@android.com> 2008-12-17 18:05:43 -0800
committer The Android Open Source Project <initial-contribution@android.com> 2008-12-17 18:05:43 -0800
commite09fd9e819c23dc90bca68375645e15544861330 (patch)
tree9a9fdadd1301625f875a3c126c986c79e3363ac4 /opengl/libagl/matrix.cpp
parent7c1b96a165f970a09ed239bb4fb3f1b0d8f2a407 (diff)
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'opengl/libagl/matrix.cpp')
-rw-r--r--opengl/libagl/matrix.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/opengl/libagl/matrix.cpp b/opengl/libagl/matrix.cpp
index 441da38e3e..f175cdad6e 100644
--- a/opengl/libagl/matrix.cpp
+++ b/opengl/libagl/matrix.cpp
@@ -98,8 +98,9 @@ static void validate_perspective(ogles_context_t* c, vertex_t* v)
c->arrays.perspective = (c->clipPlanes.enable) ?
ogles_vertex_clipAllPerspective3D : ogles_vertex_perspective3D;
if (enables & (GGL_ENABLE_DEPTH_TEST|GGL_ENABLE_FOG)) {
- c->arrays.perspective = (c->clipPlanes.enable) ?
- ogles_vertex_clipAllPerspective3DZ : ogles_vertex_perspective3DZ;
+ c->arrays.perspective = ogles_vertex_perspective3DZ;
+ if (c->clipPlanes.enable || (enables&GGL_ENABLE_FOG))
+ c->arrays.perspective = ogles_vertex_clipAllPerspective3DZ;
}
if ((c->arrays.vertex.size != 4) &&
(c->transforms.mvp4.flags & transform_t::FLAGS_2D_PROJECTION)) {