Re: glwindow on secondary monitor
Posted by Triipaxx on Dec 20, 2011; 12:19pm
URL: https://forum.jogamp.org/glwindow-on-secondary-monitor-tp3593579p3601038.html
sorry, it dosn't work....
it always opens the glwindow in the primary monitor.... :(
here my entirewindow creation code...
//**********************************
public class PreviewGLWindow extends GLWindow {
PreviewRenderer renderer;
protected PreviewGLWindow(Window window) {
super(window);
}
public static PreviewGLWindow create(GLCapabilitiesImmutable caps, GraphicsDevice device, GLContext shared) {
Rectangle w = device.getDefaultConfiguration().getBounds();
Display d = NewtFactory.createDisplay(null);
Screen s = NewtFactory.createScreen(d, 1);
PreviewGLWindow preview = new PreviewGLWindow(NewtFactory.createWindow(s, caps));
preview.setTitle("Preview");
preview.setUndecorated(true);
// preview.setPosition(w.x, w.x);
preview.setSize(w.width, w.height);
preview.setAlwaysOnTop(false);
preview.setSharedContext(shared);
preview.addGLEventListener(new PreviewRenderer());
return preview;
}
}