Java 类org.lwjgl.opengl.XRandR.Screen 实例源码
项目:PhET
文件:LinuxDisplay.java
public DisplayMode init() throws LWJGLException {
lockAWT();
try {
Compiz.init();
delete_atom = internAtom("WM_DELETE_WINDOW", false);
current_displaymode_extension = getBestDisplayModeExtension();
if (current_displaymode_extension == NONE)
throw new LWJGLException("No display mode extension is available");
DisplayMode[] modes = getAvailableDisplayModes();
if (modes == null || modes.length == 0)
throw new LWJGLException("No modes available");
switch (current_displaymode_extension) {
case XRANDR:
savedXrandrConfig = AccessController.doPrivileged(new PrivilegedAction<Screen[]>() {
public Screen[] run() {
return XRandR.getConfiguration();
}
});
saved_mode = getCurrentXRandrMode();
break;
case XF86VIDMODE:
saved_mode = modes[0];
break;
default:
throw new LWJGLException("Unknown display mode extension: " + current_displaymode_extension);
}
current_mode = saved_mode;
saved_gamma = getCurrentGammaRamp();
current_gamma = saved_gamma;
return saved_mode;
} finally {
unlockAWT();
}
}
项目:Wolf_game
文件:LinuxDisplay.java
public DisplayMode init() throws LWJGLException {
lockAWT();
try {
Compiz.init();
delete_atom = internAtom("WM_DELETE_WINDOW", false);
current_displaymode_extension = getBestDisplayModeExtension();
if (current_displaymode_extension == NONE)
throw new LWJGLException("No display mode extension is available");
DisplayMode[] modes = getAvailableDisplayModes();
if (modes == null || modes.length == 0)
throw new LWJGLException("No modes available");
switch (current_displaymode_extension) {
case XRANDR:
savedXrandrConfig = AccessController.doPrivileged(new PrivilegedAction<Screen[]>() {
public Screen[] run() {
return XRandR.getConfiguration();
}
});
saved_mode = getCurrentXRandrMode();
break;
case XF86VIDMODE:
saved_mode = modes[0];
break;
default:
throw new LWJGLException("Unknown display mode extension: " + current_displaymode_extension);
}
current_mode = saved_mode;
saved_gamma = getCurrentGammaRamp();
current_gamma = saved_gamma;
return saved_mode;
} finally {
unlockAWT();
}
}
项目:GPVM
文件:LinuxDisplay.java
public DisplayMode init() throws LWJGLException {
lockAWT();
try {
Compiz.init();
delete_atom = internAtom("WM_DELETE_WINDOW", false);
current_displaymode_extension = getBestDisplayModeExtension();
if (current_displaymode_extension == NONE)
throw new LWJGLException("No display mode extension is available");
DisplayMode[] modes = getAvailableDisplayModes();
if (modes == null || modes.length == 0)
throw new LWJGLException("No modes available");
switch (current_displaymode_extension) {
case XRANDR:
savedXrandrConfig = AccessController.doPrivileged(new PrivilegedAction<Screen[]>() {
public Screen[] run() {
return XRandR.getConfiguration();
}
});
saved_mode = getCurrentXRandrMode();
break;
case XF86VIDMODE:
saved_mode = modes[0];
break;
default:
throw new LWJGLException("Unknown display mode extension: " + current_displaymode_extension);
}
current_mode = saved_mode;
saved_gamma = getCurrentGammaRamp();
current_gamma = saved_gamma;
return saved_mode;
} finally {
unlockAWT();
}
}
项目:GPVM
文件:LinuxDisplay.java
public DisplayMode init() throws LWJGLException {
lockAWT();
try {
Compiz.init();
delete_atom = internAtom("WM_DELETE_WINDOW", false);
current_displaymode_extension = getBestDisplayModeExtension();
if (current_displaymode_extension == NONE)
throw new LWJGLException("No display mode extension is available");
DisplayMode[] modes = getAvailableDisplayModes();
if (modes == null || modes.length == 0)
throw new LWJGLException("No modes available");
switch (current_displaymode_extension) {
case XRANDR:
savedXrandrConfig = AccessController.doPrivileged(new PrivilegedAction<Screen[]>() {
public Screen[] run() {
return XRandR.getConfiguration();
}
});
saved_mode = getCurrentXRandrMode();
break;
case XF86VIDMODE:
saved_mode = modes[0];
break;
default:
throw new LWJGLException("Unknown display mode extension: " + current_displaymode_extension);
}
current_mode = saved_mode;
saved_gamma = getCurrentGammaRamp();
current_gamma = saved_gamma;
return saved_mode;
} finally {
unlockAWT();
}
}
项目:SpaceStationAlpha
文件:LinuxDisplay.java
public DisplayMode init() throws LWJGLException {
lockAWT();
try {
Compiz.init();
delete_atom = internAtom("WM_DELETE_WINDOW", false);
current_displaymode_extension = getBestDisplayModeExtension();
if (current_displaymode_extension == NONE)
throw new LWJGLException("No display mode extension is available");
DisplayMode[] modes = getAvailableDisplayModes();
if (modes == null || modes.length == 0)
throw new LWJGLException("No modes available");
switch (current_displaymode_extension) {
case XRANDR:
savedXrandrConfig = AccessController.doPrivileged(new PrivilegedAction<Screen[]>() {
public Screen[] run() {
return XRandR.getConfiguration();
}
});
saved_mode = getCurrentXRandrMode();
break;
case XF86VIDMODE:
saved_mode = modes[0];
break;
default:
throw new LWJGLException("Unknown display mode extension: " + current_displaymode_extension);
}
current_mode = saved_mode;
saved_gamma = getCurrentGammaRamp();
current_gamma = saved_gamma;
return saved_mode;
} finally {
unlockAWT();
}
}
项目:TeacherSmash
文件:LinuxDisplay.java
public DisplayMode init() throws LWJGLException {
lockAWT();
try {
Compiz.init();
delete_atom = internAtom("WM_DELETE_WINDOW", false);
current_displaymode_extension = getBestDisplayModeExtension();
if (current_displaymode_extension == NONE)
throw new LWJGLException("No display mode extension is available");
DisplayMode[] modes = getAvailableDisplayModes();
if (modes == null || modes.length == 0)
throw new LWJGLException("No modes available");
switch (current_displaymode_extension) {
case XRANDR:
savedXrandrConfig = AccessController.doPrivileged(new PrivilegedAction<Screen[]>() {
public Screen[] run() {
return XRandR.getConfiguration();
}
});
saved_mode = getCurrentXRandrMode();
break;
case XF86VIDMODE:
saved_mode = modes[0];
break;
default:
throw new LWJGLException("Unknown display mode extension: " + current_displaymode_extension);
}
current_mode = saved_mode;
saved_gamma = getCurrentGammaRamp();
current_gamma = saved_gamma;
return saved_mode;
} finally {
unlockAWT();
}
}
项目:3d-Demo
文件:LinuxDisplay.java
public DisplayMode init() throws LWJGLException {
lockAWT();
try {
Compiz.init();
delete_atom = internAtom("WM_DELETE_WINDOW", false);
current_displaymode_extension = getBestDisplayModeExtension();
if (current_displaymode_extension == NONE)
throw new LWJGLException("No display mode extension is available");
DisplayMode[] modes = getAvailableDisplayModes();
if (modes == null || modes.length == 0)
throw new LWJGLException("No modes available");
switch (current_displaymode_extension) {
case XRANDR:
savedXrandrConfig = AccessController.doPrivileged(new PrivilegedAction<Screen[]>() {
public Screen[] run() {
return XRandR.getConfiguration();
}
});
saved_mode = getCurrentXRandrMode();
break;
case XF86VIDMODE:
saved_mode = modes[0];
break;
default:
throw new LWJGLException("Unknown display mode extension: " + current_displaymode_extension);
}
current_mode = saved_mode;
saved_gamma = getCurrentGammaRamp();
current_gamma = saved_gamma;
return saved_mode;
} finally {
unlockAWT();
}
}