diff options
author | Julien Gouesse <[email protected]> | 2015-10-12 20:38:23 +0200 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2015-10-12 20:38:23 +0200 |
commit | ecd68023b29227d384a9aba859450dc80a4f4711 (patch) | |
tree | 4a97c59de0a191b4136ed3214291d2088eafa2dd /ardor3d-jogl | |
parent | b3a4fc6b96432a2921fcb1d4cb63033fb4fe3727 (diff) |
Disables HiDPI by default, see the issue #14: https://github.com/gouessej/Ardor3D/issues/14
Diffstat (limited to 'ardor3d-jogl')
-rw-r--r-- | ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java index 725e3d3..0f73157 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java @@ -13,15 +13,12 @@ package com.ardor3d.framework.jogl; import java.util.List; import java.util.concurrent.CountDownLatch; -import com.jogamp.nativewindow.util.Dimension; -import com.jogamp.opengl.GLAutoDrawable; -import com.jogamp.opengl.GLContext; -import com.jogamp.opengl.GLRunnable; - import com.ardor3d.annotation.MainThread; import com.ardor3d.framework.DisplaySettings; import com.ardor3d.framework.NativeCanvas; import com.ardor3d.image.Image; +import com.jogamp.nativewindow.ScalableSurface; +import com.jogamp.nativewindow.util.Dimension; import com.jogamp.newt.MonitorDevice; import com.jogamp.newt.MonitorMode; import com.jogamp.newt.event.KeyListener; @@ -31,6 +28,9 @@ import com.jogamp.newt.event.WindowEvent; import com.jogamp.newt.event.WindowListener; import com.jogamp.newt.opengl.GLWindow; import com.jogamp.newt.util.MonitorModeUtil; +import com.jogamp.opengl.GLAutoDrawable; +import com.jogamp.opengl.GLContext; +import com.jogamp.opengl.GLRunnable; /** * Ardor3D NEWT lightweight window, NEWT "top level" component for the OpenGL rendering of Ardor3D with JOGL that @@ -64,6 +64,9 @@ public class JoglNewtWindow implements NativeCanvas, NewtWindowContainer { final boolean fboRequested, final CapsUtil capsUtil) { _newtWindow = GLWindow.create(capsUtil.getCapsForSettings(settings, onscreen, bitmapRequested, pbufferRequested, fboRequested)); + // disables HiDPI, see https://github.com/gouessej/Ardor3D/issues/14 + _newtWindow.setSurfaceScale(new float[] { ScalableSurface.IDENTITY_PIXELSCALE, + ScalableSurface.IDENTITY_PIXELSCALE }); _drawerGLRunnable = new JoglDrawerRunnable(canvasRenderer); _settings = settings; _canvasRenderer = canvasRenderer; |