summaryrefslogtreecommitdiff
path: root/opengl/libagl/matrix.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:43 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:43 -0800
commitf013e1afd1e68af5e3b868c26a653bbfb39538f8 (patch)
tree7ad6c8fd9c7b55f4b4017171dec1cb760bbd26bf /opengl/libagl/matrix.cpp
parente70cfafe580c6f2994c4827cd8a534aabf3eb05c (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 441da38e3eb4..f175cdad6e6a 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)) {