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
@@ -22,14 +22,16 @@ package appeng.client.render;
import net.minecraft.util.IIcon;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;
import appeng.client.texture.FlippableIcon;
import appeng.client.texture.TmpFlippableIcon;
import appeng.tile.AEBaseTile;
public class BlockRenderInfo
{
private final BaseBlockRender rendererInstance;
private final BaseBlockRender<? extends AEBaseBlock, ? extends AEBaseTile> rendererInstance;
private final TmpFlippableIcon tmpTopIcon = new TmpFlippableIcon();
private final TmpFlippableIcon tmpBottomIcon = new TmpFlippableIcon();
private final TmpFlippableIcon tmpSouthIcon = new TmpFlippableIcon();
@@ -44,7 +46,7 @@ public class BlockRenderInfo
private FlippableIcon eastIcon = null;
private FlippableIcon westIcon = null;
public BlockRenderInfo( final BaseBlockRender inst )
public BlockRenderInfo( final BaseBlockRender<? extends AEBaseBlock, ? extends AEBaseTile> inst )
{
this.rendererInstance = inst;
}