move handOffWindow down near start()
This commit is contained in:
parent
438c969fef
commit
677e2104a0
1 changed files with 15 additions and 15 deletions
|
@ -911,21 +911,6 @@ class ClientVisualization implements EarlyProgressVisualization.Visualization {
|
|||
glfwPollEvents();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long handOffWindow(final IntSupplier width, final IntSupplier height, final Supplier<String> title, final LongSupplier monitorSupplier) {
|
||||
glfwSetWindowTitle(window, title.get());
|
||||
glfwSetWindowSize(window, width.getAsInt(), height.getAsInt());
|
||||
if (monitorSupplier.getAsLong()!=0L)
|
||||
glfwSetWindowMonitor(window, monitorSupplier.getAsLong(),0, 0, width.getAsInt(), height.getAsInt(), GLFW_DONT_CARE);
|
||||
glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
renderProgress();
|
||||
glfwSwapInterval(0);
|
||||
glfwSwapBuffers(window);
|
||||
glfwSwapInterval(1);
|
||||
return window;
|
||||
}
|
||||
|
||||
private static float clamp(float num, float min, float max) {
|
||||
if (num < min) {
|
||||
return min;
|
||||
|
@ -1042,6 +1027,21 @@ class ClientVisualization implements EarlyProgressVisualization.Visualization {
|
|||
return this::renderProgress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long handOffWindow(final IntSupplier width, final IntSupplier height, final Supplier<String> title, final LongSupplier monitorSupplier) {
|
||||
glfwSetWindowTitle(window, title.get());
|
||||
glfwSetWindowSize(window, width.getAsInt(), height.getAsInt());
|
||||
if (monitorSupplier.getAsLong()!=0L)
|
||||
glfwSetWindowMonitor(window, monitorSupplier.getAsLong(),0, 0, width.getAsInt(), height.getAsInt(), GLFW_DONT_CARE);
|
||||
glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
renderProgress();
|
||||
glfwSwapInterval(0);
|
||||
glfwSwapBuffers(window);
|
||||
glfwSwapInterval(1);
|
||||
return window;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replacedWindow() {
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue