1
0
Fork 0
This commit is contained in:
HoosierTransfer 2024-04-30 14:03:30 -04:00
parent 68803bc304
commit 9966f32dba
4 changed files with 35551 additions and 35573 deletions

File diff suppressed because it is too large Load Diff

View File

@ -36,8 +36,4 @@ public class Config {
public static boolean renderParticles() {
return false;
}
public static boolean doBatchRendering() {
return false;
}
}

View File

@ -163,9 +163,6 @@ public class ModelRenderer {
}
public void render(float parFloat1) {
if (compiledState != Config.doBatchRendering()) {
compiled = false;
}
if (!this.isHidden && this.showModel) {
if (!this.compiled) {
this.compileDisplayList(parFloat1);
@ -290,18 +287,11 @@ public class ModelRenderer {
this.displayList = GLAllocation.generateDisplayLists();
EaglercraftGPU.glNewList(this.displayList, GL_COMPILE);
WorldRenderer worldrenderer = Tessellator.getInstance().getWorldRenderer();
compiledState = Config.doBatchRendering();
if (compiledState) {
Tessellator.getInstance().getWorldRenderer().begin(7, DefaultVertexFormats.OLDMODEL_POSITION_TEX_NORMAL);
}
for (int i = 0; i < this.cubeList.size(); ++i) {
((ModelBox) this.cubeList.get(i)).render(worldrenderer, scale);
}
if (compiledState) {
Tessellator.getInstance().draw();
}
EaglercraftGPU.glEndList();
this.compiled = true;
}

View File

@ -79,11 +79,7 @@ public class TexturedQuad {
f2 = -f2;
}
boolean drawOnSelf = renderer.isDrawing();
if (drawOnSelf || !Config.doBatchRendering()) {
renderer.begin(7, DefaultVertexFormats.OLDMODEL_POSITION_TEX_NORMAL);
}
renderer.begin(7, DefaultVertexFormats.OLDMODEL_POSITION_TEX_NORMAL);
for (int i = 0; i < 4; ++i) {
@ -95,8 +91,6 @@ public class TexturedQuad {
(double) positiontexturevertex.texturePositionY)
.normal(f, f1, f2).endVertex();
}
if (drawOnSelf || !Config.doBatchRendering()) {
Tessellator.getInstance().draw();
}
Tessellator.getInstance().draw();
}
}