aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-12-07 04:14:36 +0100
committerSven Gothel <[email protected]>2014-12-07 04:14:36 +0100
commita372a5db4e9c2d56545791a5a2233a5cdbd94523 (patch)
tree12257141e31cc3abed839b58ee86eeb038d9ac9e /src/jogl/classes/javax
parent35622a7cef4a28ce7e32bf008ef331d9a0d9e3e2 (diff)
Misc Fixes: Bug 1102 GLJPanel.setSurfaceScale(..); SurfaceSize.hashCode()
- Bug 1102: GLJPanel.setSurfaceScale(..) Allow setting non-initialized GLJPanel surface scale. TODO: More tests and probing before initialization. - SurfaceSize.hashCode() Resolution's hash code is already multiplied.
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index edd5266b9..6e9e28c19 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -581,14 +581,14 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
@Override
public final void setSurfaceScale(final int[] pixelScale) { // HiDPI support
SurfaceScaleUtils.validateReqPixelScale(reqPixelScale, pixelScale, DEBUG ? getClass().getSimpleName() : null);
- final Backend b = backend;
- if ( isInitialized && null != b ) {
- final int hadPixelScaleX = hasPixelScale[0];
- final int hadPixelScaleY = hasPixelScale[1];
- SurfaceScaleUtils.computePixelScale(hasPixelScale, hasPixelScale, reqPixelScale, nativePixelScale, DEBUG ? getClass().getSimpleName() : null);
- if( hadPixelScaleX != hasPixelScale[0] || hadPixelScaleY != hasPixelScale[1] ) {
+ final int hadPixelScaleX = hasPixelScale[0];
+ final int hadPixelScaleY = hasPixelScale[1];
+ SurfaceScaleUtils.computePixelScale(hasPixelScale, hasPixelScale, reqPixelScale, nativePixelScale, DEBUG ? getClass().getSimpleName() : null);
+ if( hadPixelScaleX != hasPixelScale[0] || hadPixelScaleY != hasPixelScale[1] ) {
+ reshapeImpl(getWidth(), getHeight());
+ final Backend b = backend;
+ if ( isInitialized && null != b ) {
updateWrappedSurfaceScale(b.getDrawable());
- reshapeImpl(getWidth(), getHeight());
display();
}
}