本文整理了Java中org.lwjgl.opengl.Display.wasResized()
方法的一些代码示例,展示了Display.wasResized()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Display.wasResized()
方法的具体详情如下:
包路径:org.lwjgl.opengl.Display
类名称:Display
方法名:wasResized
暂无
代码示例来源:origin: MovingBlocks/Terasology
public void update() {
if (Display.wasResized()) {
updateViewport();
// Note that the "old" and "new" values (0 and 1) in the above call aren't actually
// used: they are only necessary to ensure that the event is fired up correctly.
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void runLoop(){
// This method is overriden to do restart
if (needRestart.getAndSet(false)) {
try {
createContext(settings);
} catch (LWJGLException ex) {
logger.log(Level.SEVERE, "Failed to set display settings!", ex);
}
listener.reshape(settings.getWidth(), settings.getHeight());
logger.fine("Display restarted.");
} else if (Display.wasResized()) {
int newWidth = Display.getWidth();
int newHeight = Display.getHeight();
settings.setResolution(newWidth, newHeight);
listener.reshape(newWidth, newHeight);
}
super.runLoop();
}
代码示例来源:origin: libgdx/libgdx
graphics.config.x = Display.getX();
graphics.config.y = Display.getY();
if (graphics.resize || Display.wasResized()
|| (int)(Display.getWidth() * Display.getPixelScaleFactor()) != graphics.config.width
|| (int)(Display.getHeight() * Display.getPixelScaleFactor()) != graphics.config.height) {
代码示例来源:origin: libgdx/libgdx
graphics.config.x = Display.getX();
graphics.config.y = Display.getY();
if (graphics.resize || Display.wasResized()
|| (int)(Display.getWidth() * Display.getPixelScaleFactor()) != graphics.config.width
|| (int)(Display.getHeight() * Display.getPixelScaleFactor()) != graphics.config.height) {
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl
@Override
public void runLoop(){
// This method is overriden to do restart
if (needRestart.getAndSet(false)) {
try {
createContext(settings);
} catch (LWJGLException ex) {
logger.log(Level.SEVERE, "Failed to set display settings!", ex);
}
listener.reshape(settings.getWidth(), settings.getHeight());
logger.fine("Display restarted.");
} else if (Display.wasResized()) {
int newWidth = Display.getWidth();
int newHeight = Display.getHeight();
settings.setResolution(newWidth, newHeight);
listener.reshape(newWidth, newHeight);
}
super.runLoop();
}
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl
graphics.config.x = Display.getX();
graphics.config.y = Display.getY();
if (graphics.resize || Display.wasResized()
|| (int)(Display.getWidth() * Display.getPixelScaleFactor()) != graphics.config.width
|| (int)(Display.getHeight() * Display.getPixelScaleFactor()) != graphics.config.height) {
代码示例来源:origin: org.mini2Dx/mini2Dx-desktop
graphics.config.x = Display.getX();
graphics.config.y = Display.getY();
if (graphics.resize || Display.wasResized()
|| (int) (Display.getWidth() * Display.getPixelScaleFactor()) != graphics.config.width
|| (int) (Display.getHeight() * Display.getPixelScaleFactor()) != graphics.config.height) {
内容来源于网络,如有侵权,请联系作者删除!