mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Fix loading screen color and text (#6824)
This commit is contained in:
1 parent
a79e4b3722
commit
4aa53dbb00
4 files changed
+27
-12
No files matched your search
@@ -72,11 +72,22 @@ public class EarlyLoaderGUI {
|
||||
RenderSystem.clear(GL11.GL_COLOR_BUFFER_BIT, Minecraft.IS_RUNNING_ON_MAC);
|
||||
RenderSystem.pushMatrix();
|
||||
setupMatrix();
|
||||
renderBackground();
|
||||
renderMessages();
|
||||
window.flipFrame();
|
||||
RenderSystem.popMatrix();
|
||||
}
|
||||
|
||||
private void renderBackground() {
|
||||
GL11.glBegin(GL11.GL_QUADS);
|
||||
GL11.glColor4f(239F / 255F, 50F / 255F, 61F / 255F, 255F / 255F); //Color from ResourceLoadProgressGui
|
||||
GL11.glVertex3f(0, 0, -10);
|
||||
GL11.glVertex3f(0, window.getScaledHeight(), -10);
|
||||
GL11.glVertex3f(window.getScaledWidth(), window.getScaledHeight(), -10);
|
||||
GL11.glVertex3f(window.getScaledWidth(), 0, -10);
|
||||
GL11.glEnd();
|
||||
}
|
||||
|
||||
private void renderMessages() {
|
||||
List<Pair<Integer, StartupMessageManager.Message>> messages = StartupMessageManager.getMessages();
|
||||
for (int i = 0; i < messages.size(); i++) {
|
||||
@@ -113,6 +124,9 @@ public class EarlyLoaderGUI {
|
||||
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.disableTexture();
|
||||
// STBEasyFont's quads are in reverse order or what OGGL expects, so it gets culled for facing the wrong way.
|
||||
// So Disable culling https://github.com/MinecraftForge/MinecraftForge/pull/6824
|
||||
RenderSystem.disableCull();
|
||||
GL14.glBlendColor(0,0,0, alpha);
|
||||
RenderSystem.blendFunc(GlStateManager.SourceFactor.CONSTANT_ALPHA, GlStateManager.DestFactor.ONE_MINUS_CONSTANT_ALPHA);
|
||||
RenderSystem.color3f(colour[0],colour[1],colour[2]);
|
||||
@@ -122,6 +136,7 @@ public class EarlyLoaderGUI {
|
||||
RenderSystem.drawArrays(GL11.GL_QUADS, 0, quads * 4);
|
||||
RenderSystem.popMatrix();
|
||||
|
||||
RenderSystem.enableCull();
|
||||
GlStateManager.disableClientState(GL11.GL_VERTEX_ARRAY);
|
||||
MemoryUtil.memFree(charBuffer);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user