Skip to content

Commit

Permalink
Force Flat Shading when rendering bounding boxes.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlgorithmX2 committed Oct 18, 2016
1 parent c2d03e1 commit 1b956c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/mod/chiselsandbits/client/RenderHelper.java
Expand Up @@ -141,8 +141,10 @@ public static void renderBoundingBox(
final int blue,
final int alpha )
{
GlStateManager.pushAttrib(); // glShadeMode( GL_LIGHTING_BIT );
final Tessellator tess = Tessellator.getInstance();
final VertexBuffer buffer = tess.getBuffer();
GlStateManager.shadeModel( GL11.GL_FLAT );
buffer.begin( GL11.GL_LINE_STRIP, DefaultVertexFormats.POSITION_COLOR );

final double minX = boundingBox.minX;
Expand Down Expand Up @@ -186,6 +188,7 @@ public static void renderBoundingBox(
buffer.pos( maxX, maxY, maxZ ).color( red, green, blue, alpha ).endVertex();

tess.draw();
GlStateManager.popAttrib();
}

public static void renderLine(
Expand Down

0 comments on commit 1b956c6

Please sign in to comment.