Issues with Multiple Monitor Support - Testers Needed!

I may have found some issues that are potentially caused by this recent PR that adds support for multiple monitors: Add support for Multiple Monitors in jme-LWJGL3 #2030 by bob0bob · Pull Request #2031 · jMonkeyEngine/jmonkeyengine · GitHub

There are 2 important aspects to test with a new PR like this:

  1. The test-case / example that directly uses this new feature to display fullscreen on a non-primary monitor. Issues are expected with this until the feature is further tested, and it is understandable that it will take a while to get things working on every different device/monitor.

  2. Any issues that arise for JME apps that do not enable this new feature. These are what I am most concerned about fixing so that the PR does not need reverted prior to 3.8 beta.

To elaborate on the issues I’m running into:

It appears that my secondary monitor is not being detected, and my app is now drawing a viewport with a resolution that is equal to the size of both of my monitors. It appears as though it is just adding together the full width of my 2 dual monitors as if they are 1 big monitor, and it is not detecting my secondary monitor as an seperate monitor.

When I run fullscreen, the resolution is doubled but it does manage to display on just one screen, but this doubled resolution causes all of my gui components to shrink to half size. And when I run windowed mode, it renders a single wide wiewport that stretches accross both of my monitors.


So I am making this thread to discuss this issue and collect more information.

First I am curious to know if the author @kevinba99 is still around and has the time to continue supporting this feature, since it is indeed a large contribution and may be hard for the community to fix without your support (and it is of course understandable if you are unable or unwilling to continue working on this as of now, your contribution is still greatly appreciated either way)

And also I am curious to know if other JME users have tested this yet. Has anyone done any testing for Multiple Monitor support since it has been added to 3.8.0-alpha1? Or has anyone noticed any issues with your screen resolution

Detailed reports from testers who may have run into similar issues are greatly appreciated.

Here is also a quick poll to help me get a sense of how much testing this feature has recieved in the past month its been in testing:


Have you had success testing the new TestMonitorApp example that directly uses this feature?

  • Yes, I ran it and managed to render a full screen app on a non-primary monitor without any issues arising.
  • Full screen did not work, but windowed mode still rendered properly.
  • Neither full screen or non-fullscreen mode worked as expected.
  • Other (please explain in a comment)
0 voters

Have any of your JME apps experienced any new resolution issues or issues similar to what I’ve described since upgrading to 3.8.0-alpha1?

  • I have tested 3.8.0 alpha and did not encounter any similar issues
  • I have encountered similar issues
0 voters

2 Likes

Here are 2 screenshots that better demonstrate the issue I experience when running TestMonitorApp :

Here it is reporting only 1 monitor detected, despite having 2 monitors:

And here is the appSettings interface that defaults to a large 3840 x 2160 resolution (which is equal to the value of both of my monitor widths added together) when fullscreen is selected:

This is my results when I run the app. I made a couple of changes to the code.

As you can see it shows both monitors, and their sizes.

Are you sure you are running it under LWJGL 3.x not 2. I can’t remember but for the longest time the JME community wanted to stay at LWJGL 2.x by default. I am not using 3.8. I have 3.7, installed and it defaults to 2.x. You have to switch it over to LWJGL 3.x to get Multiple Display support. Otherwise it will return a NULL (0) on the monitors. Just checking.

here is a real world example inside of a game I did. The monitor text is cut off on a vertical monitor but displays correctly on a horizontal monitor.

1 Like

I ran this test with the default build of the engine’s jme-examples library (which I think now uses LWJGL3 by default, someone please correct me if I’m wrong on this though)

The TestMonitorApp also reports that my app is finding 1 monitor (not null or 0)

image

Here’s the info for my primary monitor:

And for my seconday monitor:

Have you tried building the newest 3.8 alpha version to see if multiple monitors still works for you?

If you’re using 3.7 then it is possible that some other changes since 3.7 could have broken things. There were some major changes to jme’s rendering pipeline in 3.8, so it could be useful for you to test on 3.8 and make sure TestMonitorApp still works the same way it worked for you on 3.7

When you run it and exit. It should create a file called TestMonitorApp.prefs.

Can you post that.

Also, post your console output. This is mine.

Feb 04, 2025 9:50:00 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Feb 04, 2025 9:50:03 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.7.0-SNAPSHOT
 * Branch: master
 * Git Hash: 5445d3f
 * Build Date: 2023-10-31
Feb 04, 2025 9:50:03 PM com.jme3.system.lwjgl.LwjglWindow getDisplays
INFO: Display id: 944627584 Resolution: 2560 x 1440 @ 170
Feb 04, 2025 9:50:03 PM com.jme3.system.lwjgl.LwjglWindow getDisplays
INFO: Display id: 944629072 Resolution: 1440 x 2560 @ 165
Feb 04, 2025 9:50:05 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: LWJGL 3.3.2+13 context running on thread jME3 Main
 * Graphics Adapter: GLFW 3.4.0 Win32 WGL Null EGL OSMesa VisualC DLL
Feb 04, 2025 9:50:05 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFO: OpenGL Renderer Information
 * Vendor: NVIDIA Corporation
 * Renderer: NVIDIA GeForce RTX 4070/PCIe/SSE2
 * OpenGL Version: 3.3.0 NVIDIA 560.94
 * GLSL Version: 3.30 NVIDIA via Cg compiler
 * Profile: Core
Feb 04, 2025 9:50:05 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.23.0
 * 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_SOFT_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_loopback_bformat ALC_SOFT_output_limiter ALC_SOFT_output_mode ALC_SOFT_pause_device ALC_SOFT_reopen_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_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFT_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFT_gain_clamp_ex AL_SOFTX_hold_on_disconnect AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize AL_SOFTX_source_start_delay AL_SOFT_UHJ
Feb 04, 2025 9:50:05 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio effect extension version: 1.0
Feb 04, 2025 9:50:05 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio max auxiliary sends: 2
Feb 04, 2025 9:50:06 PM com.jme3.system.lwjgl.LwjglWindow getDisplays
INFO: Display id: 944627584 Resolution: 720 x 576 @ 50
Feb 04, 2025 9:50:06 PM com.jme3.system.lwjgl.LwjglWindow getDisplays
INFO: Display id: 944629072 Resolution: 1440 x 2560 @ 165

This is mine.

#jME3 AppSettings
#Tue Feb 04 21:47:50 CST 2025
Renderer(string)=LWJGL-OpenGL33
WindowHeight(int)=720
Width(int)=576
WindowXPosition(int)=0
DisableJoysticks(bool)=true
UseRetinaFrameBuffer(bool)=false
SettingsDialogImage(string)=/com/jme3/app/Monkey.png
Title(string)=jMonkeyEngine 3.7.0-SNAPSHOT
Height(int)=720
Samples(int)=0
Resizable(bool)=false
OpenCLPlatformChooser(string)=com.jme3.opencl.DefaultPlatformChooser
WindowWidth(int)=576
UseInput(bool)=true
BitsPerPixel(int)=32
GammaCorrection(bool)=true
Frequency(int)=60
WindowYPosition(int)=0
DepthBits(int)=24
Fullscreen(bool)=true
AudioRenderer(string)=LWJGL
StencilBits(int)=0
VSync(bool)=true
Display(int)=0
FrameRate(int)=-1
OpenCL(bool)=false
CenterWindow(bool)=true
MinWidth(int)=0
MinHeight(int)=0
SwapBuffers(bool)=true

1 Like

Also, forgot to mention. What the monitor returns is not up to JME, it is from LWJGL 3 library. So if it returns only 1 monitor, most likely there is nothing JME can do, and at this point it might be related to LWJGL library.

1 Like