Dual monitor issues
Posted by Agnes on Oct 15, 2013; 8:06pm
URL: https://forum.jogamp.org/Dual-monitor-issues-tp4030258.html
I am starting to debug my code on dual monitors, but I see lots of different issues. For example, one JOGL application reports an FPS of 1000, although the screen image is not updated, and I am supposedly using vsynch (gl.setSwapInterval(1)).
Another application either fails to display or alternately fails to draw text or sets gl.glClearColor() incorrectly.
I'm running GLCanvas in a Frame, and running it as a windows application - I don't need full screen and I don't need dual monitors. Obviously i need to not crash if a user has dual monitors. I've seen the issues on both Linux 64-bit and Vista 32-bit.
Are there any dual monitor gotchas I should know of?
As this is a utility that is not meant to run in a multitasking environment, I'm tempted to just detect multiple monitors using...
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
...and ask them to switch one off :-)
EDIT: While testing my crude 'please switch off the second monitor!!!' code, I found that if I start the application with one monitor, and then change to two monitors, everything works correctly, on Vista-32 anyway. The apps run correctly. I can even drag the JOGL windows to the secondary monitor and they display fine. I can have multiple JOGL windows open simultaneously on both monitors.