Skip to content

Commit

Permalink
Fix arrows and daggers sometimes rendering as cyan square in inventor…
Browse files Browse the repository at this point in the history
…y/nei
  • Loading branch information
bonii-xx committed Aug 23, 2014
1 parent 1753521 commit 72e6bce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/tconstruct/client/ToolCoreRenderer.java
Expand Up @@ -129,6 +129,7 @@ public void renderItem (ItemRenderType type, ItemStack item, Object... data)
if (type == ItemRenderType.INVENTORY)
{
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_BLEND);
tess.startDrawingQuads();
for (int i = 0; i < iconParts; ++i)
{
Expand Down Expand Up @@ -157,6 +158,7 @@ public void renderItem (ItemRenderType type, ItemStack item, Object... data)
default:
}

// one side
tess.startDrawingQuads();
tess.setNormal(0, 0, 1);
for (int i = 0; i < iconParts; ++i)
Expand All @@ -167,6 +169,8 @@ public void renderItem (ItemRenderType type, ItemStack item, Object... data)
tess.addVertexWithUV(0, 1, 0, xMax[i], yMin[i]);
}
tess.draw();

// other side
tess.startDrawingQuads();
tess.setNormal(0, 0, -1);
for (int i = 0; i < iconParts; ++i)
Expand All @@ -177,6 +181,8 @@ public void renderItem (ItemRenderType type, ItemStack item, Object... data)
tess.addVertexWithUV(0, 0, -depth, xMax[i], yMax[i]);
}
tess.draw();

// make it have "depth"
tess.startDrawingQuads();
tess.setNormal(-1, 0, 0);
int k;
Expand Down

0 comments on commit 72e6bce

Please sign in to comment.