aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java18
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java6
2 files changed, 18 insertions, 6 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
index 8b3fb3a82..0c939d015 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
@@ -362,17 +362,29 @@ public final class RegionRenderer {
viewport.set(x, y, width, height);
}
- public final void reshapePerspective(final float angle, final int width, final int height, final float near, final float far) {
+ /**
+ * Perspective projection, method also calls {@link #reshapeNotify(int, int, int, int)}.
+ * @param angle_rad perspective angle in radians
+ * @param width viewport width
+ * @param height viewport height
+ * @param near projection z-near
+ * @param far projection z-far
+ */
+ public final void reshapePerspective(final float angle_rad, final int width, final int height, final float near, final float far) {
reshapeNotify(0, 0, width, height);
final float ratio = (float)width/(float)height;
final PMVMatrix p = getMatrix();
p.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
p.glLoadIdentity();
- p.gluPerspective(angle, ratio, near, far);
+ p.gluPerspective(angle_rad, ratio, near, far);
}
/**
- * Perspective orthogonal, method calls {@link #reshapeNotify(int, int, int, int)}.
+ * Orthogonal projection, method also calls {@link #reshapeNotify(int, int, int, int)}.
+ * @param width viewport width
+ * @param height viewport height
+ * @param near projection z-near
+ * @param far projection z-far
*/
public final void reshapeOrtho(final int width, final int height, final float near, final float far) {
reshapeNotify(0, 0, width, height);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
index b8b2925ae..ebb164912 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
@@ -1038,15 +1038,15 @@ public final class PMVMatrix implements GLMatrixFunc {
/**
* {@link #glMultMatrixf(FloatBuffer) Multiply} the {@link #glGetMatrixMode() current matrix} with the perspective/frustum matrix.
*
- * @param fovy_deg fov angle in degrees
+ * @param fovy_rad fov angle in radians
* @param aspect aspect ratio width / height
* @param zNear
* @param zFar
* @throws GLException if {@code zNear <= 0} or {@code zFar <= zNear}
* @see Matrix4f#setToPerspective(float, float, float, float)
*/
- public final void gluPerspective(final float fovy_deg, final float aspect, final float zNear, final float zFar) throws GLException {
- glMultMatrixf( mat4Tmp1.setToPerspective(FloatUtil.adegToRad(fovy_deg), aspect, zNear, zFar) );
+ public final void gluPerspective(final float fovy_rad, final float aspect, final float zNear, final float zFar) throws GLException {
+ glMultMatrixf( mat4Tmp1.setToPerspective(fovy_rad, aspect, zNear, zFar) );
}
/**