summaryrefslogtreecommitdiffstats
path: root/src/net/java/joglutils/msg/nodes/OrthographicCamera.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/joglutils/msg/nodes/OrthographicCamera.java')
-rw-r--r--src/net/java/joglutils/msg/nodes/OrthographicCamera.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/java/joglutils/msg/nodes/OrthographicCamera.java b/src/net/java/joglutils/msg/nodes/OrthographicCamera.java
index 0678acd..28c657a 100644
--- a/src/net/java/joglutils/msg/nodes/OrthographicCamera.java
+++ b/src/net/java/joglutils/msg/nodes/OrthographicCamera.java
@@ -61,11 +61,12 @@ public class OrthographicCamera extends Camera {
if ((height == 0) || (width == 0) || (deltaZ == 0))
return projMatrix;
- // This is a simplified version of the orthographic camera
+ // This is a simplified version of the orthographic projection
// matrix where it's symmetric about the origin
projMatrix.set(0, 0, 2.0f / width);
projMatrix.set(1, 1, 2.0f / height);
projMatrix.set(2, 2, -2.0f / deltaZ);
+ projMatrix.set(2, 3, -(zFar + zNear) / deltaZ);
}
return projMatrix;