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 committed 2015-11-16 10:52:20 +01:00
1 parent 824ec1eccb
commit d5dfc31210
69 files changed
+435 -343

No files matched your search

@@ -124,6 +124,7 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
else if( ( xx ? 1 : 0 ) + ( yy ? 1 : 0 ) + ( zz ? 1 : 0 ) >= 2 )
{
final int v = ( Math.abs( x ) + Math.abs( y ) + Math.abs( z ) ) % 2;
renderer.uvRotateEast = renderer.uvRotateBottom = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
if( v == 0 )
@@ -140,6 +141,7 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
if( hasPower )
{
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerPowered.getIcon() );
if( isConflict )
{
lights = ExtraBlockTextures.BlockControllerConflict;
@@ -156,6 +158,7 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
}
final boolean out = renderer.renderStandardBlock( blk, x, y, z );
if( lights != null )
{
Tessellator.instance.setColorOpaque_F( 1.0f, 1.0f, 1.0f );