From 9e954259d99d642dab1aae5763ce8e34c855706c Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Tue, 27 May 2014 10:41:33 +0200
Subject: Adapt to JOGL HiDPI (Bug 741) changes up-to commit
 bcda2dad1a6569ffd4eba07b231d50fdafc60b7f

---
 .../opencl/demos/fractal/MultiDeviceFractal.java       | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

(limited to 'src/com/jogamp/opencl/demos')

diff --git a/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java b/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java
index 0cbb340..51c40ec 100644
--- a/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java
+++ b/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java
@@ -71,7 +71,7 @@ public class MultiDeviceFractal implements GLEventListener {
     // max per pixel iterations to compute the fractal
     private static final int MAX_ITERATIONS         = 500;
 
-    private GLCanvas canvas;
+    private final GLCanvas canvas;
 
     private CLGLContext clContext;
     private CLCommandQueue[] queues;
@@ -113,7 +113,7 @@ public class MultiDeviceFractal implements GLEventListener {
             public void windowClosing(WindowEvent e) {
                 MultiDeviceFractal.this.release(e.getWindow());
             }
-        }); 
+        });
         canvas.setPreferredSize(new Dimension(width, height));
         frame.add(canvas);
         frame.pack();
@@ -139,7 +139,7 @@ public class MultiDeviceFractal implements GLEventListener {
             gl.glDisable(GL_DEPTH_TEST);
             gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
 
-            initView(gl, drawable.getWidth(), drawable.getHeight());
+            initView(gl, drawable.getSurfaceWidth(), drawable.getSurfaceHeight());
 
             initPBO(gl);
             drawable.getGL().glFinish();
@@ -219,7 +219,7 @@ public class MultiDeviceFractal implements GLEventListener {
     }
 
     private void initColorMap(IntBuffer colorMap, int stepSize, Color... colors) {
-        
+
         for (int n = 0; n < colors.length - 1; n++) {
 
             Color color = colors[n];
@@ -453,7 +453,7 @@ public class MultiDeviceFractal implements GLEventListener {
         setKernelConstants();
 
         initView(drawable.getGL().getGL2(), width, height);
-        
+
     }
 
     private void initSceneInteraction() {
@@ -464,7 +464,7 @@ public class MultiDeviceFractal implements GLEventListener {
 
             @Override
             public void mouseDragged(MouseEvent e) {
-                
+
                 double offsetX = (lastpos.x - e.getX()) * (maxX - minX) / width;
                 double offsetY = (lastpos.y - e.getY()) * (maxY - minY) / height;
 
@@ -484,7 +484,7 @@ public class MultiDeviceFractal implements GLEventListener {
             public void mouseMoved(MouseEvent e) {
                 lastpos = e.getPoint();
             }
-            
+
             @Override
             public void mouseWheelMoved(MouseWheelEvent e) {
                 float rotation = e.getWheelRotation() / 25.0f;
@@ -548,9 +548,9 @@ public class MultiDeviceFractal implements GLEventListener {
     }
 
     public static void main(String args[]) {
-        
+
         GLProfile.initSingleton();
-        
+
         SwingUtilities.invokeLater(new Runnable() {
             @Override public void run() {
                 new MultiDeviceFractal(512, 512);
-- 
cgit v1.2.3