jMonkeyEngine / jMonkeyEngine/jmonkeyengine
jMonkey Window on Mac Retina uses pixels instead of coordinates, so the viewport does not fill the window
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 14
Description
I'm running a MacBook Pro with a Retina display. I have a very basic jMonkey application just trying to make sure everything is working. I set the application resolution as 1024x576 through the AppSettings. The window launches and fills the area according to the screen coordinates, but the viewport is in the lower left corner and appears to just be using pixels. On Retina screens, coordinates do not equal pixels. I have added -Dorg.lwjgl.opengl.Display.enableHighDPI=true -Dsun.java2d.dpiaware=true to the application start parameters which didn't seem to affect anything.
Here is a screenshot of what the window looks like: 
Here are my AppSettings:
AppSettings settings = new AppSettings(true);
settings.setRenderer(AppSettings.LWJGL_OPENGL41);
settings.putBoolean("RendererDebug", true);
settings.setWidth(Integer.valueOf(System.getProperty("ORS_SCREEN_WIDTH", "1024")));
settings.setHeight(Integer.valueOf(System.getProperty("ORS_SCREEN_HEIGHT", "576")));
settings.setVSync(Boolean.valueOf(System.getProperty("ORS_SCREEN_VSYNC", "false")));
settings.setFullscreen(Boolean.valueOf(System.getProperty("ORS_SCREEN_FULLSCREEN", "false")));
Here are the logs prior to my application:
Sep 08, 2018 9:17:12 AM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.2-stable
* Branch: HEAD
* Git Hash: f85624a
* Build Date: 2018-01-21
Sep 08, 2018 9:17:12 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: LWJGL 3.1.2 build 29 context running on thread main
* Graphics Adapter: GLFW 3.3.0 Cocoa NSGL dynamic
Sep 08, 2018 9:17:12 AM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFO: OpenGL Renderer Information
* Vendor: Intel Inc.
* Renderer: Intel Iris Pro OpenGL Engine
* OpenGL Version: 4.1 INTEL-10.36.19
* GLSL Version: 4.10
* Profile: Core
Sep 08, 2018 9:17:12 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio Renderer Information
* Device: OpenAL Soft
* Vendor: OpenAL Community
* Renderer: OpenAL Soft
* Version: 1.1 ALSOFT 1.17.2
* Supported channels: 64
* ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE
ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context
ALC_SOFTX_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFTX_output_limiter
ALC_SOFT_pause_device
* AL extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE
AL_EXT_EXPONENT_DISTANCE
AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW
AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET
AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES
AL_LOKI_quadriphonic AL_SOFT_block_alignment AL_SOFT_deferred_updates
AL_SOFT_direct_channels AL_SOFT_gain_clamp_ex AL_SOFT_loop_points AL_SOFT_MSADPCM
AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler
AL_SOFT_source_spatialize
Sep 08, 2018 9:17:12 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio effect extension version: 1.0
Sep 08, 2018 9:17:12 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio max auxiliary sends: 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the minimal AppSettings configuration on a Mac Retina display and review the JmeDesktopSystem and LwjglContext initialization logs. Trace how the window size and viewport dimensions are handled; done means the viewport fills the window using screen coordinates on Retina displays without relying on the reported workaround flags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- computer-graphics, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100