-
-
Save zzuegg/41fc84e5a15119beba6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gg.zue.rse.modules.graphics.managers; | |
import com.jogamp.newt.MonitorDevice; | |
import com.jogamp.newt.NewtFactory; | |
import com.jogamp.newt.Screen; | |
import com.jogamp.newt.opengl.GLWindow; | |
import javax.media.opengl.GLCapabilities; | |
import javax.media.opengl.GLProfile; | |
/** | |
* Created by michael on 04.01.15. | |
*/ | |
public class RSDisplayManagerJogl { | |
public void getAvailableMonitorDevices() { | |
Screen screen = NewtFactory.createScreen(NewtFactory.createDisplay(null), 0); | |
screen.addReference(); | |
MonitorDevice monitorDevice = screen.getMonitorDevices().get(0); | |
MonitorDevice monitorDevice2 = screen.getMonitorDevices().get(1); | |
GLWindow window = GLWindow.create(monitorDevice.getScreen(), new GLCapabilities(GLProfile.getDefault())); | |
GLWindow window2 = GLWindow.create(monitorDevice2.getScreen(), new GLCapabilities(GLProfile.getDefault())); | |
window.setVisible(true); | |
window2.setVisible(true); | |
} | |
public static void main(String[] args) { | |
new RSDisplayManagerJogl().getAvailableMonitorDevices(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment