Somewhat restore the loading screen overlay. It seems that once the mojang logo and progress bar

start running, I can no longer write to the window, even though I am obviously trying to..

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
cpw 2020-03-14 23:28:45 -04:00
parent 202ae50820
commit 6329c0fcf2
No known key found for this signature in database
GPG key ID: 8EB3DF749553B1B7

View file

@ -45,7 +45,17 @@ public class EarlyLoaderGUI {
this.window = window;
RenderSystem.clearColor(1.0f, 1.0f, 1.0f, 1.0f);
RenderSystem.clear(GL11.GL_COLOR_BUFFER_BIT, Minecraft.IS_RUNNING_ON_MAC);
window.update();
window.flipFrame();
}
private void setupMatrix() {
GlStateManager.clear(256, Minecraft.IS_RUNNING_ON_MAC);
RenderSystem.matrixMode(5889);
RenderSystem.loadIdentity();
RenderSystem.ortho(0.0D, window.getFramebufferWidth() / window.getGuiScaleFactor(), window.getFramebufferHeight() / window.getGuiScaleFactor(), 0.0D, 1000.0D, 3000.0D);
RenderSystem.matrixMode(5888);
RenderSystem.loadIdentity();
RenderSystem.translatef(0.0F, 0.0F, -2000.0F);
}
public void handleElsewhere() {
@ -63,8 +73,9 @@ public class EarlyLoaderGUI {
RenderSystem.clearColor(1.0f, 1.0f, 1.0f, 1.0f);
RenderSystem.clear(GL11.GL_COLOR_BUFFER_BIT, Minecraft.IS_RUNNING_ON_MAC);
setupMatrix();
renderMessages();
window.update();
window.flipFrame();
}
private void renderMessages() {
@ -110,6 +121,7 @@ public class EarlyLoaderGUI {
RenderSystem.drawArrays(GL11.GL_QUADS, 0, quads * 4);
RenderSystem.popMatrix();
GlStateManager.disableClientState(GL11.GL_VERTEX_ARRAY);
MemoryUtil.memFree(charBuffer);
}
}