From cbb0035b5c5df6eada04e38a3478091cca0fe9c5 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 23 Sep 2023 03:01:39 +0200 Subject: Bug 1452: GraphUI Scene DefaultPMVMatrixSetup.set(): Fix regression of commit 5d6e8a367c03644740187e500c6de5d3ac039d5e - pmv.glMatrixMode(GLMatrixFunc.GL_PROJECTION); - pmv.glLoadIdentity(); - pmv.gluPerspective(angle, ratio, zNear, zFar); - pmv.glTranslatef(0f, 0f, scene_dist); + pmv.loadPIdentity(); + pmv.perspectiveP(angle, ratio, zNear, zFar); + pmv.translateMv(0f, 0f, scene_dist); ^^ Was projection matrix. Fixed. Note: resolved via TraceGL and comparing output -> P matrix differed, here translation. --- src/graphui/classes/com/jogamp/graph/ui/Scene.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/graphui/classes/com/jogamp/graph/ui/Scene.java') diff --git a/src/graphui/classes/com/jogamp/graph/ui/Scene.java b/src/graphui/classes/com/jogamp/graph/ui/Scene.java index 370c51dc7..9e9925481 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/Scene.java +++ b/src/graphui/classes/com/jogamp/graph/ui/Scene.java @@ -1283,7 +1283,7 @@ public final class Scene implements Container, GLEventListener { final float ratio = (float) viewport.width() / (float) viewport.height(); pmv.loadPIdentity(); pmv.perspectiveP(angle, ratio, zNear, zFar); - pmv.translateMv(0f, 0f, scene_dist); + pmv.translateP(0f, 0f, scene_dist); pmv.loadMvIdentity(); } -- cgit v1.2.3