Skip to content

Commit

Permalink
more small track rendering improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
EternalBlueFlame committed Oct 12, 2023
1 parent a3d9a96 commit f6530f1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
6 changes: 2 additions & 4 deletions src/main/java/ebf/tim/render/models/Model1x1Rail.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ public static void Model3DRail(World world, int xPos, int yPos, int zPos, RailSh
//renders the rails, also defines min and max width
//GL11.glEnable(GL11.GL_NORMALIZE);
GL11.glPushMatrix();
GL11.glColor4f(1,1,1,1);
GL11.glDisable(GL_TEXTURE_2D);
GL11.glColor4f(1,1,1,1);
switch (ClientProxy.railSkin){
case 0:{ModelRail.modelPotatoRail(shape, shape.renderScale, colors); break;}
case 1:{ModelRail.modelExtrudedRail(shape, shape.renderScale, colors); break;}
Expand Down Expand Up @@ -138,9 +138,7 @@ public static void Model3DRail(World world, int xPos, int yPos, int zPos, RailSh
GL11.glPushMatrix();
if(ClientProxy.railSkin==0){
ModelTies.modelPotatoTies(BlockRailCore.getShape(world,xPos,yPos,zPos), maxWidth, minWidth, shape.renderScale, shape.ties);
} else if (ClientProxy.railSkin<3) {
ModelTies.model3DTies(BlockRailCore.getShape(world, xPos, yPos, zPos), maxWidth, minWidth, shape.renderScale, shape.ties);
} else if (ClientProxy.railSkin==3) {
} if (ClientProxy.railSkin==3) {
ModelTies.modelHDTies(BlockRailCore.getShape(world, xPos, yPos, zPos), maxWidth, minWidth, shape.renderScale, shape.ties, colors);
} else {
ModelTies.model3DTies(BlockRailCore.getShape(world,xPos,yPos,zPos), maxWidth, minWidth, shape.renderScale, shape.ties);
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/ebf/tim/render/models/ModelRail.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ public static void model3DRail(RailShapeCore shape, float scale, int[] color) {
GL11.glTranslated(0, 0.225*scale, 0);

for(float rail : shape.getGaugePositions()) {
GL11.glPushMatrix();
centerShading(rail,color,20,true);
drawFace(shape.activePath, rail, 0.0625f, 0,0,0, scale);
drawFace(shape.activePath, rail, 0.0625f, 0.0625f,-0.025f,0, scale);
Expand Down Expand Up @@ -186,7 +185,6 @@ public static void model3DRail(RailShapeCore shape, float scale, int[] color) {
Tessellator.getInstance().draw();

}
GL11.glPopMatrix();
}
}

Expand All @@ -196,7 +194,6 @@ public static void modelHDRail(RailShapeCore shape, float scale, int[] color) {

for(float rail : shape.getGaugePositions()) {
rail = rail * 1.0625f;
GL11.glPushMatrix();
railShading(rail,color, 33, 43, 58, true);
drawFace(shape.activePath, rail, -0.0125f,-0.021875f,0,0, scale);//railhead top dull

Expand Down Expand Up @@ -281,7 +278,6 @@ public static void modelHDRail(RailShapeCore shape, float scale, int[] color) {
Tessellator.getInstance().draw();

}
GL11.glPopMatrix();
}
}
}
6 changes: 0 additions & 6 deletions src/main/java/fexcraft/tmt/slim/Tessellator.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ebf.tim.utility.DebugUtil;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3;
import org.lwjgl.opengl.GL11;

import java.util.ArrayList;
import java.util.List;

/**
* @Author EternalBlueFlame
*
Expand Down

0 comments on commit f6530f1

Please sign in to comment.