diff options
author | Sven Gothel <[email protected]> | 2023-03-21 14:12:48 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-03-21 14:12:48 +0100 |
commit | 1cbe45b9d7f21a751332d6f8dd948992e75dfe99 (patch) | |
tree | 1322e80e768a7924d40f3d9970a9a6b1fdca1d6e /src/graphui/classes/com | |
parent | 033c96fc22912c48539c5473283455c0179543ef (diff) |
GraphUI Scene: Move reshape() below init from in-between display() impls
Diffstat (limited to 'src/graphui/classes/com')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java | 38 |
1 files changed, 19 insertions, 19 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 24df8c80a..0755b31b9 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java @@ -245,6 +245,25 @@ public final class Scene implements GLEventListener { renderer.init(drawable.getGL().getGL2ES2()); } + /** + * Reshape scene using {@link #setupMatrix(PMVMatrix, int, int, int, int)} using {@link PMVMatrixSetup}. + * <p> + * {@inheritDoc} + * </p> + * @see PMVMatrixSetup + * @see #setPMVMatrixSetup(PMVMatrixSetup) + * @see #setupMatrix(PMVMatrix, int, int, int, int) + * @see #getBounds() + * @see #getBoundsCenter() + */ + @Override + public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) { + renderer.reshapeNotify(x, y, width, height); + + setupMatrix(renderer.getMatrix(), x, y, width, height); + pmvMatrixSetup.setPlaneBox(planeBox, renderer.getMatrix(), x, y, width, height); + } + private static Comparator<Shape> shapeZAscComparator = new Comparator<Shape>() { @Override public int compare(final Shape s1, final Shape s2) { @@ -268,25 +287,6 @@ public final class Scene implements GLEventListener { display(drawable, shapesS, false); } - /** - * Reshape scene using {@link #setupMatrix(PMVMatrix, int, int, int, int)} using {@link PMVMatrixSetup}. - * <p> - * {@inheritDoc} - * </p> - * @see PMVMatrixSetup - * @see #setPMVMatrixSetup(PMVMatrixSetup) - * @see #setupMatrix(PMVMatrix, int, int, int, int) - * @see #getBounds() - * @see #getBoundsCenter() - */ - @Override - public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) { - renderer.reshapeNotify(x, y, width, height); - - setupMatrix(renderer.getMatrix(), x, y, width, height); - pmvMatrixSetup.setPlaneBox(planeBox, renderer.getMatrix(), x, y, width, height); - } - private static final int[] sampleCountGLSelect = { -1 }; private void display(final GLAutoDrawable drawable, final Object[] shapesS, final boolean glSelect) { |