pull/12/head
parent
accb0e7b86
commit
031957fb23
|
@ -76,21 +76,17 @@ public class BlockRenderer extends Renderer implements WorldGenConstants
|
||||||
public void render(BlockInstance[] renderList)
|
public void render(BlockInstance[] renderList)
|
||||||
{
|
{
|
||||||
prepareRender();
|
prepareRender();
|
||||||
for (int x = 0; x < CHUNK_SIZE; x++)
|
|
||||||
for (int y = 0; y < CHUNK_SIZE; y++)
|
for (BlockInstance entity : renderList) {
|
||||||
for (int z = 0; z < CHUNK_SIZE; z++)
|
if (entity != null && entity.getModel() != null)
|
||||||
{
|
{
|
||||||
BlockInstance entity = renderList[Chunk.index(x, y, z)];
|
TexturedModel blockModel = entity.getModel();
|
||||||
if (entity != null && entity.getModel() != null)
|
GL11.glBindTexture(GL11.GL_TEXTURE_2D, blockModel.getTexture().getTextureID());
|
||||||
{
|
prepBlockInstance(entity);
|
||||||
TexturedModel blockModel = entity.getModel();
|
GL11.glDrawElements(GL11.GL_TRIANGLES, blockModel.getRawModel().getVertexCount(), GL11.GL_UNSIGNED_INT, 0);
|
||||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, blockModel.getTexture().getTextureID());
|
}
|
||||||
prepBlockInstance(entity);
|
}
|
||||||
GL11.glDrawElements(GL11.GL_TRIANGLES, blockModel.getRawModel().getVertexCount(),
|
// disableWireframe();
|
||||||
GL11.GL_UNSIGNED_INT, 0);
|
// shader.stop();
|
||||||
}
|
|
||||||
}
|
|
||||||
disableWireframe();
|
|
||||||
shader.stop();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue