aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-05-22 07:09:23 +0200
committerSven Gothel <[email protected]>2014-05-22 07:09:23 +0200
commitfb57c652fee6be133990cd7afbbd2fdfc084afaa (patch)
tree7993fe001b291eb83519bf02f34639502f2afb22 /src/jogl/classes/com/jogamp/opengl
parentf9a00b91dcd146c72a50237b62270f33bd0da98e (diff)
Bug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units: Refine commit f9a00b91dcd146c72a50237b62270f33bd0da98e
- Using comment tag 'FIXME HiDPI' to locate remaining issues - Fix remaining 'getPixel*(..)' -> 'getSurface*(..)' - UpstreamSurfaceHook - Fix usage (one by one) of - NativeWindow: getWindowWidth() / getWindowHeight() - NativeSurface/GLDrawable: getSurfaceWidth() / getSurfaceHeight() - mention window- or pixel units in API doc where required - use 'setSurfaceSize(..)' where appropriate to match 'getSurface*()' - GLFBODrawable - GLOffscreenAutoDrawable - UpstreamSurfaceHook.MutableSize - NativeWindow's Point: Add API doc and 'Point scaleInv(..)' - NativeSurface Simplify new conversion methods and use single in-place storage - 'int[] getWindowUnitXY(int[], int[])' -> 'int[] convertToWindowUnits(int[], int[])' - 'int[] getPixelUnitXY(int[], int[])' -> 'int[] convertToPixelUnits(int[], int[])' - NEWT Screen/Monitor - Assume screen/window units - TODO: Refine semantics - Monitor resolution probably is in pixel units ?! - Including the Rectangle/Monitor association etc etc - NEWT Window - Add setSurfaceSize(..) for convenience - Add 'Point convertToWindowUnits(final Point pixelUnitsAndResult)', etc .. - All window ops are using window units (size, pos, ..), but methods operating on the surface/drawable: windowRepaint(..) .. - TODO: Consider changing method names 'window*(..)' to 'surface*(..)' actually operating on surface/drawable - Window.windowRepaint(..) - GLAutoDrawableDelegate.windowResizedOp(..) (maybe all similar methods in here) - NEWT Mouse/Pointer Events - Using pixel units
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java18
-rw-r--r--src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java4
2 files changed, 19 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java b/src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java
index 6b1bb0e5e..e9fe80a91 100644
--- a/src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java
+++ b/src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java
@@ -36,6 +36,7 @@ import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLContext;
import javax.media.opengl.GLDrawable;
import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLException;
import com.jogamp.common.util.locks.LockFactory;
@@ -101,7 +102,22 @@ public class GLAutoDrawableDelegate extends GLAutoDrawableBase implements GLAuto
super.defaultWindowRepaintOp();
}
- /** Implementation to handle resize events from the windowing system. All required locks are being claimed. */
+ /**
+ * Handling resize events from the windowing system.
+ * <p>
+ * Implementation:
+ * <ul>
+ * <li>resizes {@link #getDelegatedDrawable() the GLDrawable}, if offscreen,</li>
+ * <li>triggers a pending {@link GLEventListener#reshape(GLAutoDrawable, int, int, int, int) reshape events}, and</li>
+ * <li>issues a {@link #display()} call, if no animator is present.</li>
+ * </ul>
+ * </p>
+ * <p>
+ * All required locks are being claimed.
+ * </p>
+ * @param newWidth new width in pixel units
+ * @param newWidth new height in pixel units
+ */
public final void windowResizedOp(int newWidth, int newHeight) {
super.defaultWindowResizedOp(newWidth, newHeight);
}
diff --git a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
index 1c6dced6a..ec0935c18 100644
--- a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
+++ b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
@@ -455,12 +455,12 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
public final void destroy(ProxySurface s) { /* nop */ }
@Override
- public final int getPixelWidth(ProxySurface s) {
+ public final int getSurfaceWidth(ProxySurface s) {
return clientArea.width;
}
@Override
- public final int getPixelHeight(ProxySurface s) {
+ public final int getSurfaceHeight(ProxySurface s) {
return clientArea.height;
}