From f9a00b91dcd146c72a50237b62270f33bd0da98e Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Wed, 21 May 2014 08:53:54 +0200
Subject: Bug 742 HiDPI: [Core API Change] Distinguish window-units and
 pixel-units; Add HiDPI for AWT GLCanvas w/ OSX CALayer

Core API Change:

To support HiDPI thoroughly in JOGL (NativeWindow, JOGL, NEWT)
we need to separate window- and pixel units.

NativeWindow and NativeSurface now have distinguished
access methods for window units and pixel units.

  NativeWindow: Using window units
      - getWindowWidth()    * NEW Method *
      - getWindowHeight()   * NEW Method *
      - getX(), getY(), ...

  NativeSurface: Using pixel units
      - getWidth()  -> getSurfaceWidth()   * RENAMED *
      - getHeight() -> getSurfaceHeight()  * RENAMED *

  GLDrawable:  Using pixel units
      - getWidth()  -> getSurfaceWidth()   * RENAMED, aligned w/ NativeSurface *
      - getHeight() -> getSurfaceHeight()  * RENAMED, aligned w/ NativeSurface *

Above changes also removes API collision w/ other windowing TK,
e.g. AWT's getWidth()/getHeight() in GLCanvas
and the same method names in GLDrawable before this change.

+++

Now preliminary 'working':
  - AWT GLCanvas
  - AWT GLJPanel

Tested manually on OSX w/ and w/o HiDPI Retina:
  java com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT -manual -noanim -time 1000000
  java com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT -manual -noanim -time 1000000

+++

TODO:
  - NEWT
    - Change Window.setSize(..) to use pixel units ?
    - OSX HiDPI support

  - Testing ..

  - API refinement
---
 src/jogl/native/macosx/MacOSXWindowSystemInterface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/jogl/native/macosx/MacOSXWindowSystemInterface.h')

diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.h b/src/jogl/native/macosx/MacOSXWindowSystemInterface.h
index 138accb22..b2d7f9db8 100644
--- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.h
+++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.h
@@ -3,7 +3,7 @@
 #import <OpenGL/CGLTypes.h>
 #import <jni.h>
 
-// #define VERBOSE_ON 1
+#define VERBOSE_ON 1
 
 #ifdef VERBOSE_ON
     #define DBG_PRINT(...) NSLog(@ __VA_ARGS__)
-- 
cgit v1.2.3