Rendering cleanup

Replaces the reflexive instantiation of the Renderes with a factory
method.

Some optimizations to the renderers to no longer push the whole OpenGL state to the stack.

General cleanup of duplicate code, etc
This commit is contained in:
yueh
2015-09-16 18:03:07 +02:00
parent 824ec1eccb
commit d5dfc31210
69 changed files with 435 additions and 343 deletions
@@ -20,6 +20,7 @@ package appeng.client.render;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
@@ -41,7 +42,7 @@ public final class WorldRender implements ISimpleBlockRenderingHandler
{
public static final WorldRender INSTANCE = new WorldRender();
private final HashMap<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap<AEBaseBlock, BaseBlockRender>();
private final Map<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap<AEBaseBlock, BaseBlockRender>();
private final int renderID = RenderingRegistry.getNextAvailableRenderId();
private final RenderBlocks renderer = new RenderBlocks();
private boolean hasError = false;