diff options
author | Sven Gothel <[email protected]> | 2014-10-25 00:11:08 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-10-25 00:11:08 +0200 |
commit | aaaa48f4401555612ece10fce5dfe6163587f420 (patch) | |
tree | 8fb026df4f9b28541e2726047b61cd6180e8b107 /src/jogl/classes/com/jogamp/opengl/util | |
parent | f39e66e9c5137dacb556ce7a1edbdd3fb460b5e2 (diff) |
FloatUtil.makeFrustum(..): Add throws GLException API doc / Add GLException if zNear == zFar
throws GLException with GL_INVALID_VALUE if zNear is <= 0, or zFar < 0,
or if left == right, or bottom == top, or zNear == zFar
Add note on callers:
- FloatUtil.makePerspective(..)
- Matrix4.*
- PMVMatrix.*
- ProjectFloat.*
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java index 11acb0c58..6dd8ae032 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java +++ b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java @@ -660,8 +660,14 @@ public final class PMVMatrix implements GLMatrixFunc { glMultMatrixf( FloatUtil.makeOrtho(mat4Tmp1, 0, true, left, right, bottom, top, zNear, zFar), 0 ); } + /** + * {@inheritDoc} + * + * @throws GLException with GL_INVALID_VALUE if zNear is <= 0, or zFar < 0, + * or if left == right, or bottom == top, or zNear == zFar. + */ @Override - public final void glFrustumf(final float left, final float right, final float bottom, final float top, final float zNear, final float zFar) { + public final void glFrustumf(final float left, final float right, final float bottom, final float top, final float zNear, final float zFar) throws GLException { glMultMatrixf( FloatUtil.makeFrustum(mat4Tmp1, 0, true, left, right, bottom, top, zNear, zFar), 0 ); } @@ -676,8 +682,9 @@ public final class PMVMatrix implements GLMatrixFunc { * @param aspect aspect ratio width / height * @param zNear * @param zFar + * @throws GLException with GL_INVALID_VALUE if zNear is <= 0, or zFar < 0, or if zNear == zFar. */ - public final void gluPerspective(final float fovy_deg, final float aspect, final float zNear, final float zFar) { + public final void gluPerspective(final float fovy_deg, final float aspect, final float zNear, final float zFar) throws GLException { glMultMatrixf( FloatUtil.makePerspective(mat4Tmp1, 0, true, fovy_deg * FloatUtil.PI / 180.0f, aspect, zNear, zFar), 0 ); } |