Bug 600 - Expose the information about attached monitor/display devices
Summary: Expose the information about attached monitor/display devices
Status: RESOLVED FIXED
Alias: None
Product: Newt
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All all
: P4 enhancement
Assignee: Sven Gothel
URL: http://forum.jogamp.org/How-to-choose...
Depends on: 721
Blocks: 648
  Show dependency treegraph
 
Reported: 2012-07-01 19:35 CEST by Julien Gouesse
Modified: 2013-05-06 17:45 CEST (History)
2 users (show)

See Also:
Type: ---
SCM Refs:
6ebf649d1b87944257fe492e0aef842d1b8debc2
Workaround: ---


Attachments
Screenshot of the trouble occurring with TUER (Ardor3D) provided by Jiri Vanek (Red Hat) (1.00 MB, image/png)
2012-07-03 13:03 CEST, Julien Gouesse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Gouesse 2012-07-01 19:35:20 CEST
As far as I know, there is no way to make a distinction between 2-monitor wide screens and 1-monitor wide screens, primary and secondary screens, etc... Maybe some platform-dependent identifiers can be used but it is not satisfying. As a first step, NEWT should query this information and expose it. As a second step, we should be able to pick the most suitable screen. 2-monitor ones are generally not suitable for games.

XRandR version 13 can be used to do that under GNU Linux, some other solutions have to be found for other platforms.
Comment 1 Julien Gouesse 2012-07-03 13:03:36 CEST
Created attachment 359 [details]
Screenshot of the trouble occurring with TUER (Ardor3D) provided by Jiri Vanek (Red Hat)
Comment 2 petsagouris 2012-08-28 18:22:06 CEST
Maybe this will help identifying monitors.
http://stackoverflow.com/questions/6794054/how-to-identify-the-monitor-from-java-swing-application
Comment 3 Julien Gouesse 2012-08-28 19:00:57 CEST
(In reply to comment #2)
> Maybe this will help identifying monitors.
> http://stackoverflow.com/questions/6794054/how-to-identify-the-monitor-from-java-swing-application

I'm not sure AWT is able to return physical screens, it probably handles only virtual screens.
Comment 4 Julien Gouesse 2013-03-27 14:00:19 CET
In my humble opinion, it's a bit late to modify the public API to support this feature before the release of JOGL 2.0.2 but choosing a physical monitor is really important both in games and in other applications. NEWT really needs it. I'm not sure that this bug should be fixed in the next minor release.
Comment 5 Julien Gouesse 2013-04-25 14:31:01 CEST
As a first step, it would be fine to expose all monitors (virtual and physical) in the unchanged public API. Maybe it wouldn't be enough to fix bugs that really require a way of detecting that the current canvas has been moved to another display.
Comment 6 Sven Gothel 2013-05-06 17:45:54 CEST
http://jogamp.org/git/?p=jogl.git;a=commit;h=6ebf649d1b87944257fe492e0aef842d1b8debc2

http://jogamp.org/files/screenshots/newt-mmonitor/html/

NEWT API Change !

Fix Bug 600 and Bug 721: Adding support for multiple monitors w/ NEWT
    
  - Support for all monitor devices and their available modes
    - X11: Use RandR 1.3 if available
    - Retrieve information
    - Changing a monitor device's mode
    
  - Support for dedicated and spannig fullscreen
    - See <http://jogamp.org/files/screenshots/newt-mmonitor/html/>
    
  - TODO:
    - X11 RandR does _not_ relayout the virtual screen size
      and neither the CRT's viewport.
      We may need to relayout them if they were covering a seamless region
      to achieve same experience!
    
    - OSX: No machine to attach a secondary CRT -> TEST!
    
  - Tested Manually for Regressions
    - Linux ARMv6hf (Rasp-Pi/BCM, Panda/X11)
    - Android (Huawei, Kindle)
    
  - Tested Manually and junit:
    - X11/Linux
      - NV, ATI-Catalyst w/ 2 CRTs
      - VBox w/ 4 CRTs
    
    - Win/Windows
      - NV, w/ 2 CRTs
      - VBox w/ 4 CRTs
    
    - X11/OpenIndiana, NV, 1 CRT