Removed unused import and renamed VSYNC to VSync
This commit is contained in:
parent
73d24d36f4
commit
9d7f69892b
@ -39,7 +39,7 @@ public class GraphicsBackend {
|
|||||||
private static boolean faceCullingEnabled = false;
|
private static boolean faceCullingEnabled = false;
|
||||||
|
|
||||||
private static boolean isFullscreen = false;
|
private static boolean isFullscreen = false;
|
||||||
private static boolean isVSYNC = false;
|
private static boolean vSyncEnabled = false;
|
||||||
private static boolean isGLFWInitialized = false;
|
private static boolean isGLFWInitialized = false;
|
||||||
private static boolean isOpenGLInitialized = false;
|
private static boolean isOpenGLInitialized = false;
|
||||||
|
|
||||||
@ -153,8 +153,8 @@ public class GraphicsBackend {
|
|||||||
return isFullscreen;
|
return isFullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isVSYNC() {
|
public static boolean isVSyncEnabled() {
|
||||||
return isVSYNC;
|
return vSyncEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setFullscreen() {
|
public static void setFullscreen() {
|
||||||
@ -183,9 +183,9 @@ public class GraphicsBackend {
|
|||||||
isFullscreen = false;
|
isFullscreen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setVSYNC(boolean state) {
|
public static void setVSyncEnabled(boolean enable) {
|
||||||
glfwSwapInterval(state ? 1 : 0);
|
glfwSwapInterval(enable ? 1 : 0);
|
||||||
isVSYNC = state;
|
vSyncEnabled = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getRefreshRate() {
|
public static int getRefreshRate() {
|
||||||
|
@ -79,7 +79,7 @@ public class GraphicsInterface {
|
|||||||
} else {
|
} else {
|
||||||
GraphicsBackend.setWindowed();
|
GraphicsBackend.setWindowed();
|
||||||
}
|
}
|
||||||
GraphicsBackend.setVSYNC(GraphicsBackend.isVSYNC());
|
GraphicsBackend.setVSyncEnabled(GraphicsBackend.isVSyncEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
package ru.windcorp.progressia.common.util.crash.providers;
|
package ru.windcorp.progressia.common.util.crash.providers;
|
||||||
|
|
||||||
import ru.windcorp.progressia.client.graphics.backend.GraphicsBackend;
|
import ru.windcorp.progressia.client.graphics.backend.GraphicsBackend;
|
||||||
import ru.windcorp.progressia.client.graphics.backend.GraphicsInterface;
|
|
||||||
import ru.windcorp.progressia.common.util.crash.ContextProvider;
|
import ru.windcorp.progressia.common.util.crash.ContextProvider;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -121,9 +121,9 @@ public class LayerTestGUI extends GUILayer {
|
|||||||
|
|
||||||
panel.addChild(
|
panel.addChild(
|
||||||
new Label(
|
new Label(
|
||||||
"VSYNCDisplay",
|
"VSyncDisplay",
|
||||||
font,
|
font,
|
||||||
tmp_dynFormat("LayerTestGUI.IsVSYNC", GraphicsBackend::isVSYNC)
|
tmp_dynFormat("LayerTestGUI.IsVSync", GraphicsBackend::isVSyncEnabled)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ public class TestPlayerControls {
|
|||||||
case GLFW.GLFW_KEY_F12:
|
case GLFW.GLFW_KEY_F12:
|
||||||
if (!event.isPress())
|
if (!event.isPress())
|
||||||
return false;
|
return false;
|
||||||
GraphicsBackend.setVSYNC(!GraphicsBackend.isVSYNC());
|
GraphicsBackend.setVSyncEnabled(!GraphicsBackend.isVSyncEnabled());
|
||||||
updateGUI();
|
updateGUI();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -21,4 +21,4 @@ LayerTestGUI.SelectedBlockDisplay = %s Block: %s
|
|||||||
LayerTestGUI.SelectedTileDisplay = %s Tile: %s
|
LayerTestGUI.SelectedTileDisplay = %s Tile: %s
|
||||||
LayerTestGUI.PlacementModeHint = (Blocks %s Tiles: Ctrl + Mouse Wheel)
|
LayerTestGUI.PlacementModeHint = (Blocks %s Tiles: Ctrl + Mouse Wheel)
|
||||||
LayerTestGUI.IsFullscreen = Fullscreen: %5s (F11)
|
LayerTestGUI.IsFullscreen = Fullscreen: %5s (F11)
|
||||||
LayerTestGUI.IsVSYNC = VSYNC: %5s (F12)
|
LayerTestGUI.IsVSync = VSync: %5s (F12)
|
@ -21,4 +21,4 @@ LayerTestGUI.SelectedBlockDisplay = %s Блок: %s
|
|||||||
LayerTestGUI.SelectedTileDisplay = %s Плитка: %s
|
LayerTestGUI.SelectedTileDisplay = %s Плитка: %s
|
||||||
LayerTestGUI.PlacementModeHint = (Блок %s плитки: Ctrl + прокрутка)
|
LayerTestGUI.PlacementModeHint = (Блок %s плитки: Ctrl + прокрутка)
|
||||||
LayerTestGUI.IsFullscreen = Полный экран: %5s (F11)
|
LayerTestGUI.IsFullscreen = Полный экран: %5s (F11)
|
||||||
LayerTestGUI.IsVSYNC = Верт. синхр.: %5s (F12)
|
LayerTestGUI.IsVSync = Верт. синхр.: %5s (F12)
|
Reference in New Issue
Block a user