Skip to content

Commit

Permalink
Fix block renderer to not be hugely inefficient.
Browse files Browse the repository at this point in the history
  • Loading branch information
CovertJaguar committed Jun 10, 2014
1 parent bdda0fb commit d99505c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions common/buildcraft/core/render/RenderEntityBlock.java
Expand Up @@ -206,9 +206,7 @@ public void renderBlock(RenderInfo info, IBlockAccess blockAccess, double x, dou
realDoLight = false;
}

// TODO: needs to cancel the test because the variable is now private... May need to
// duplicate the tessellator code.
//if (doTessellating && !tessellator.isDrawing)
if (doTessellating)
tessellator.startDrawingQuads();

float light = 0;
Expand Down Expand Up @@ -280,9 +278,7 @@ public void renderBlock(RenderInfo info, IBlockAccess blockAccess, double x, dou
renderBlocks.renderFaceXPos(info.baseBlock, x, y, z, info.getBlockTextureFromSide(5));
}

// TODO: needs to cancel the test because the variable is now private... May need to
// duplicate the tessellator code.
//if (doTessellating && tessellator.isDrawing)
tessellator.draw();
if (doTessellating)
tessellator.draw();
}
}

2 comments on commit d99505c

@SpaceToad
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think that fix is worth back-porting all the way to the 5.0.x branch?

@CovertJaguar
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chunk that uses this render during a simple block render action will force the entire render stack to flush twice for every render call. Its not a game ending problem, but isn't ideal either. I'm not even sure how many simple block renders use this function.

Please sign in to comment.