summaryrefslogtreecommitdiffstats
path: root/src/graphui
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphui')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java b/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java
index 0755b31b9..39039d83d 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java
@@ -942,16 +942,18 @@ public final class Scene implements GLEventListener {
pmv.gluPerspective(DEFAULT_ANGLE, ratio, DEFAULT_ZNEAR, DEFAULT_ZFAR);
pmv.glTranslatef(0f, 0f, DEFAULT_SCENE_DIST);
+ pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
+ pmv.glLoadIdentity();
+
// Scale (back) to have normalized plane dimensions, 1 for the greater of width and height.
final AABBox planeBox0 = new AABBox();
setPlaneBox(planeBox0, pmv, x, y, width, height);
final float sx = planeBox0.getWidth();
final float sy = planeBox0.getHeight();
final float sxy = sx > sy ? sx : sy;
+ pmv.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
pmv.glScalef(sxy, sxy, 1f);
-
pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
- pmv.glLoadIdentity();
}
@Override