aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi/qsgrenderer.cpp
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2012-04-11 17:39:46 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-25 10:01:11 +0200
commit70dee431e82aa4596aa993570120ab9afc7b608b (patch)
tree6349d66a034b33d3bb3b45d5c5d12a726beb7ce5 /src/quick/scenegraph/coreapi/qsgrenderer.cpp
parent8c68dcd2aa98f12d4e5c731dbc04a49c05917ed8 (diff)
Simplify the depth transformation in the scene graph.
Use default depth function GL_LESS and depth clear value 1, and set the near and far clipping planes to -1 and 1. This change will make the transformations a bit easier for people who implement custom 3D geometry since [-1, 1] is the typical z-range after a projection transformation. The change has no visual impact on 2D geometry. Change-Id: I75d4a8acc15131ffaa5d13a749e42dffbc1d09db Reviewed-by: Glenn Watson <glenn.watson@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgrenderer.cpp')
-rw-r--r--src/quick/scenegraph/coreapi/qsgrenderer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer.cpp b/src/quick/scenegraph/coreapi/qsgrenderer.cpp
index 92b99b8662..0049ae706a 100644
--- a/src/quick/scenegraph/coreapi/qsgrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgrenderer.cpp
@@ -313,7 +313,7 @@ void QSGRenderer::setProjectionMatrixToRect(const QRectF &rect)
rect.x() + rect.width(),
rect.y() + rect.height(),
rect.y(),
- qreal(0.01),
+ 1,
-1);
setProjectionMatrix(matrix);
}