public static AWTGraphicsDevice createDefault() { final GraphicsDevice awtDevice = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); return new AWTGraphicsDevice(awtDevice, AbstractGraphicsDevice.DEFAULT_UNIT); }
@Override protected void createNativeImpl() { aDevice = AWTGraphicsDevice.createDefault(); }
@Override public String toString() { return getClass().getSimpleName()+"[type "+getType()+", connection "+getConnection()+", unitID "+getUnitID()+", awtDevice "+device+", handle 0x"+Long.toHexString(getHandle())+"]"; } }
public AWTGraphicsScreen(final AWTGraphicsDevice device) { super(device, findScreenIndex(device.getGraphicsDevice())); }
device = ((AWTGraphicsDevice)awtScreen.getDevice()).getGraphicsDevice();
public static AbstractGraphicsScreen createScreenDevice(final GraphicsDevice awtDevice, final int unitID) { return new AWTGraphicsScreen(new AWTGraphicsDevice(awtDevice, unitID)); }
device = ((AWTGraphicsDevice)awtScreen.getDevice()).getGraphicsDevice();
public static AbstractGraphicsScreen createDefault() { return new AWTGraphicsScreen(AWTGraphicsDevice.createDefault()); }
JoglGraphicsConfiguration(GLCapabilities caps, int chosenIndex, GraphicsDevice device) { super(); this.caps = caps; this.chosenIndex = chosenIndex; this.device = device; //FIXME unit id? this.awtGraphicsDevice = new AWTGraphicsDevice(this.device, 0); DisplayMode m = device.getDisplayMode(); width = m.getWidth(); height = m.getHeight(); }
final GraphicsDevice device = ((AWTGraphicsDevice)awtScreen.getDevice()).getGraphicsDevice();
final AWTGraphicsDevice awtDevice = new AWTGraphicsDevice(awtGraphicsDevice, AbstractGraphicsDevice.DEFAULT_UNIT); final AWTGraphicsScreen awtScreen = new AWTGraphicsScreen(awtDevice);
@Override protected void collectNativeMonitorModesAndDevicesImpl(final Cache cache) { final GraphicsDevice awtGD = ((AWTGraphicsDevice)getDisplay().getGraphicsDevice()).getGraphicsDevice(); final DisplayMode[] awtModes = awtGD.getDisplayModes(); for(int i=0; i<awtModes.length; i++) { getModeProps(cache, awtModes[i]); } final MonitorMode currentMode = getModeProps(cache, awtGD.getDisplayMode()); final int[] props = new int[MonitorModeProps.MIN_MONITOR_DEVICE_PROPERTIES - 1 - MonitorModeProps.NUM_MONITOR_MODE_PROPERTIES]; int i = 0; props[i++] = props.length; props[i++] = 0; // crt_idx props[i++] = ScreenImpl.default_sm_widthmm; // FIXME props[i++] = ScreenImpl.default_sm_heightmm; // FIXME props[i++] = 0; // rotated viewport x pixel-units props[i++] = 0; // rotated viewport y pixel-units props[i++] = currentMode.getRotatedWidth(); // rotated viewport width pixel-units props[i++] = currentMode.getRotatedHeight(); // rotated viewport height pixel-units props[i++] = 0; // rotated viewport x window-units props[i++] = 0; // rotated viewport y window-units props[i++] = currentMode.getRotatedWidth(); // rotated viewport width window-units props[i++] = currentMode.getRotatedHeight(); // rotated viewport height window-units MonitorModeProps.streamInMonitorDevice(null, cache, this, cache.monitorModes, currentMode, props, 0); }