Exemple #1
0
  public void render() {
    updateNearbyChunkMeshes(false);

    material.getShader().setUniform("View", client.getActiveCamera().getView());
    material.getShader().setUniform("Projection", client.getActiveCamera().getProjection());

    renderChunks();
  }
Exemple #2
0
  private void renderChunks() {
    for (ChunkMeshBatch renderer : chunkRenderers) {
      material.getShader().setUniform("Model", renderer.getTransform());

      // It's hard to look right
      // at the world baby
      // But here's my frustrum
      // so cull me maybe?
      if (client.getActiveCamera().getFrustum().intersects(renderer)) {
        renderer.render();
      }
    }
  }