Commit 3d0296f8debe9d59f1f02198461d627706cc8a4e

Authored by Mumfrey
1 parent 86035a24

Fix loading screen flickering when debug is enabled

src/client/java/com/mumfrey/liteloader/client/gui/startup/LoadingBar.java
@@ -260,12 +260,12 @@ public class LoadingBar extends LoadingProgress @@ -260,12 +260,12 @@ public class LoadingBar extends LoadingProgress
260 this.textureManager.bindTexture(this.textureLocation); 260 this.textureManager.bindTexture(this.textureLocation);
261 Tessellator tessellator = Tessellator.getInstance(); 261 Tessellator tessellator = Tessellator.getInstance();
262 VertexBuffer vertexBuffer = tessellator.getBuffer(); 262 VertexBuffer vertexBuffer = tessellator.getBuffer();
263 - vertexBuffer.begin(GL_QUADS, VF_POSITION); 263 + vertexBuffer.begin(GL_QUADS, VF_POSITION_TEX_COLOR);
264 glColor4f(1.0F, 1.0F, 1.0F, 1.0F); 264 glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
265 - vertexBuffer.pos(0.0D, scaledHeight, 0.0D).endVertex();  
266 - vertexBuffer.pos(scaledWidth, scaledHeight, 0.0D).endVertex();  
267 - vertexBuffer.pos(scaledWidth, 0.0D, 0.0D).endVertex();  
268 - vertexBuffer.pos(0.0D, 0.0D, 0.0D).endVertex(); 265 + vertexBuffer.pos(0.0D, scaledHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
  266 + vertexBuffer.pos(scaledWidth, scaledHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
  267 + vertexBuffer.pos(scaledWidth, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
  268 + vertexBuffer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
269 tessellator.draw(); 269 tessellator.draw();
270 270
271 glColor4f(1.0F, 1.0F, 1.0F, 1.0F); 271 glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
@@ -278,11 +278,11 @@ public class LoadingBar extends LoadingProgress @@ -278,11 +278,11 @@ public class LoadingBar extends LoadingProgress
278 int v2 = 256; 278 int v2 = 256;
279 279
280 float texMapScale = 0.00390625F; 280 float texMapScale = 0.00390625F;
281 - vertexBuffer.begin(GL_QUADS, VF_POSITION_TEX);  
282 - vertexBuffer.pos(left + 0, top + v2, 0.0D).tex((u1 + 0) * texMapScale, (v1 + v2) * texMapScale).endVertex();  
283 - vertexBuffer.pos(left + u2, top + v2, 0.0D).tex((u1 + u2) * texMapScale, (v1 + v2) * texMapScale).endVertex();  
284 - vertexBuffer.pos(left + u2, top + 0, 0.0D).tex((u1 + u2) * texMapScale, (v1 + 0) * texMapScale).endVertex();  
285 - vertexBuffer.pos(left + 0, top + 0, 0.0D).tex((u1 + 0) * texMapScale, (v1 + 0) * texMapScale).endVertex(); 281 + vertexBuffer.begin(GL_QUADS, VF_POSITION_TEX_COLOR);
  282 + vertexBuffer.pos(left + 0, top + v2, 0.0D).tex((u1 + 0) * texMapScale, (v1 + v2) * texMapScale).color(255, 255, 255, 255).endVertex();
  283 + vertexBuffer.pos(left + u2, top + v2, 0.0D).tex((u1 + u2) * texMapScale, (v1 + v2) * texMapScale).color(255, 255, 255, 255).endVertex();
  284 + vertexBuffer.pos(left + u2, top + 0, 0.0D).tex((u1 + u2) * texMapScale, (v1 + 0) * texMapScale).color(255, 255, 255, 255).endVertex();
  285 + vertexBuffer.pos(left + 0, top + 0, 0.0D).tex((u1 + 0) * texMapScale, (v1 + 0) * texMapScale).color(255, 255, 255, 255).endVertex();
286 tessellator.draw(); 286 tessellator.draw();
287 287
288 glEnableTexture2D(); 288 glEnableTexture2D();