I've been trying to render a border on a chunk - I'm using RenderGlobal#drawSelectionBoundingBox to try to achieve this, but it's not working as intended (Can't actually see the box). Code is as follows - The AABB min and max positions are correct (the lower and upper boundaries of the chunk) but presumably I'm missing something stupid here. Can anyone point me in the right direction?
public void renderChunkBorder(TileEntityElemental te){
GlStateManager.pushMatrix();
{
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.glLineWidth(2.0F);
GlStateManager.disableTexture2D();
GlStateManager.depthMask(false);
Chunk c = te.getWorld().getChunkFromBlockCoords(te.getPos());
AxisAlignedBB chunk = new AxisAlignedBB(c.getPos().getXStart(), 0, c.getPos().getZStart(), c.getPos().getXEnd(), 255, c.getPos().getZEnd());
RenderGlobal.drawSelectionBoundingBox(chunk, 1f, 0f, 1f, 0.5f);
GlStateManager.depthMask(true);
GlStateManager.enableTexture2D();
GlStateManager.disableBlend();
}
GlStateManager.popMatrix();
}
Edit: Calling this in a TESR.