mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-22 05:02:34 +00:00
Use GlStateManager
This commit is contained in:
1 parent
31a305ffc2
commit
9c4b081f6d
24 files changed
+144
-152
No files matched your search
@@ -9,7 +9,7 @@ public class BlockDrinkRenderer //implements ISimpleBlockRenderingHandler
|
||||
//
|
||||
// @Override
|
||||
// public boolean renderWorldBlock(final IBlockAccess world, final int x, final int y, final int z, final Block block, final int modelId, final RenderBlocks renderer) {
|
||||
// GL11.glPushMatrix();
|
||||
// GlStateManager.pushMatrix();
|
||||
// Tessellator.instance.setColorRGBA(255, 255, 255, 150);
|
||||
// final Tessellator tess = Tessellator.instance;
|
||||
// renderer.renderFaceYPos(block, x, y, z, Blocks.dirt.getIcon(0, 0));
|
||||
@@ -24,7 +24,7 @@ public class BlockDrinkRenderer //implements ISimpleBlockRenderingHandler
|
||||
// tess.addVertexWithUV(x + 0.5f + d1, y + h3, z + 0.5f - d1, 0.0, 0.0);
|
||||
// tess.addVertexWithUV(x + 0.5f + d1, y + h2, z + 0.5f - d1, 0.0, 0.0);
|
||||
// }
|
||||
// GL11.glPopMatrix();
|
||||
// GlStateManager.popMatrix();
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
|
||||
@@ -4,7 +4,7 @@ public class CocktailRenderer //implements IItemRenderer
|
||||
{
|
||||
// private void renderCocktail(final RenderBlocks renderBlocks, final ItemStack item, final float p, final float q, final float r) {
|
||||
// final RenderItem renderItem = new RenderItem();
|
||||
// GL11.glEnable(3042);
|
||||
// GlStateManager.enableBlend();
|
||||
// GL11.glBlendFunc(770, 771);
|
||||
// final Glassware glass = ExtraTrees.drink.getGlassware(item);
|
||||
// final FluidStack fluid = ExtraTrees.drink.getFluid(item);
|
||||
@@ -31,7 +31,7 @@ public class CocktailRenderer //implements IItemRenderer
|
||||
// tessellator.addVertexWithUV(x + 0.0f, y + 0.0f, renderItem.zLevel, icon.getMinU(), minV);
|
||||
// tessellator.draw();
|
||||
// }
|
||||
// GL11.glDisable(3042);
|
||||
// GlStateManager.disableBlend();
|
||||
// }
|
||||
//
|
||||
// private void setColor(final int i1, final float alpha) {
|
||||
@@ -86,7 +86,7 @@ public class CocktailRenderer //implements IItemRenderer
|
||||
// case EQUIPPED:
|
||||
// case EQUIPPED_FIRST_PERSON: {
|
||||
// if (type == IItemRenderer.ItemRenderType.ENTITY) {
|
||||
// GL11.glTranslatef(-0.5f, -0.25f, -0.0f);
|
||||
// GlStateManager.translate(-0.5f, -0.25f, -0.0f);
|
||||
// }
|
||||
// final TextureManager texturemanager = BinnieCore.proxy.getMinecraftInstance().getTextureManager();
|
||||
// final Glassware glass = ExtraTrees.drink.getGlassware(item);
|
||||
|
||||
@@ -18,7 +18,7 @@ public class GateItemRenderer //implements IItemRenderer
|
||||
// if (k == 2) {
|
||||
// renderBlocks.setRenderBounds(0.5f - f2, 0.5, 0.0, 0.5f + f2, 1.0f - f2, 1.0);
|
||||
// }
|
||||
// GL11.glTranslatef(-0.5f, -0.5f, -0.5f);
|
||||
// GlStateManager.translate(-0.5f, -0.5f, -0.5f);
|
||||
// tessellator.startDrawingQuads();
|
||||
// tessellator.setNormal(0.0f, -1.0f, 0.0f);
|
||||
// renderBlocks.renderFaceYNeg(block, 0.0, 0.0, 0.0, renderBlocks.getBlockIconFromSideAndMetadata(block, 0, item.getItemDamage()));
|
||||
@@ -43,7 +43,7 @@ public class GateItemRenderer //implements IItemRenderer
|
||||
// tessellator.setNormal(1.0f, 0.0f, 0.0f);
|
||||
// renderBlocks.renderFaceXPos(block, 0.0, 0.0, 0.0, renderBlocks.getBlockIconFromSideAndMetadata(block, 5, item.getItemDamage()));
|
||||
// tessellator.draw();
|
||||
// GL11.glTranslatef(0.5f, 0.5f, 0.5f);
|
||||
// GlStateManager.translate(0.5f, 0.5f, 0.5f);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public class FenceRenderer //implements ISimpleBlockRenderingHandler
|
||||
// }
|
||||
// }
|
||||
// renderer.setRenderBoundsFromBlock(block);
|
||||
// GL11.glTranslatef(-0.5f, -0.5f, -0.5f);
|
||||
// GlStateManager.translate(-0.5f, -0.5f, -0.5f);
|
||||
// tess.startDrawingQuads();
|
||||
// tess.setNormal(0.0f, -1.0f, 0.0f);
|
||||
// renderer.renderFaceYNeg(block, 0.0, 0.0, 0.0, block.getIcon(0, metadata));
|
||||
@@ -117,7 +117,7 @@ public class FenceRenderer //implements ISimpleBlockRenderingHandler
|
||||
// tess.setNormal(1.0f, 0.0f, 0.0f);
|
||||
// renderer.renderFaceZPos(block, 0.0, 0.0, 0.0, block.getIcon(5, metadata));
|
||||
// tess.draw();
|
||||
// GL11.glTranslatef(0.5f, 0.5f, 0.5f);
|
||||
// GlStateManager.translate(0.5f, 0.5f, 0.5f);
|
||||
// }
|
||||
// block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
// renderer.setRenderBoundsFromBlock(block);
|
||||
|
||||
@@ -11,7 +11,7 @@ public class HedgeRenderer //implements ISimpleBlockRenderingHandler
|
||||
// GL11.glColor3f(r / 255.0f, g / 255.0f, b / 255.0f);
|
||||
// renderer.setRenderBounds(0.25, 0.0, 0.25, 0.75, 1.0, 0.75);
|
||||
// final Tessellator tess = Tessellator.instance;
|
||||
// GL11.glTranslatef(-0.5f, -0.5f, -0.5f);
|
||||
// GlStateManager.translate(-0.5f, -0.5f, -0.5f);
|
||||
// tess.startDrawingQuads();
|
||||
// tess.setNormal(0.0f, -1.0f, 0.0f);
|
||||
// renderer.renderFaceYNeg(block, 0.0, 0.0, 0.0, block.getIcon(0, metadata));
|
||||
@@ -36,7 +36,7 @@ public class HedgeRenderer //implements ISimpleBlockRenderingHandler
|
||||
// tess.setNormal(1.0f, 0.0f, 0.0f);
|
||||
// renderer.renderFaceZPos(block, 0.0, 0.0, 0.0, block.getIcon(5, metadata));
|
||||
// tess.draw();
|
||||
// GL11.glTranslatef(0.5f, 0.5f, 0.5f);
|
||||
// GlStateManager.translate(0.5f, 0.5f, 0.5f);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
@@ -47,7 +47,7 @@ public class HedgeRenderer //implements ISimpleBlockRenderingHandler
|
||||
// final boolean connectPosX = hedge.canConnectFenceTo(world, x + 1, y, z);
|
||||
// final boolean connectNegZ = hedge.canConnectFenceTo(world, x, y, z - 1);
|
||||
// final boolean connectPosZ = hedge.canConnectFenceTo(world, x, y, z + 1);
|
||||
// GL11.glPushMatrix();
|
||||
// GlStateManager.pushMatrix();
|
||||
// renderer.setRenderBounds(0.25, 0.0, 0.25, 0.75, 1.0, 0.75);
|
||||
// renderer.renderStandardBlock(block, x, y, z);
|
||||
// renderer.renderFaceYPos(block, x, y, z, icon);
|
||||
@@ -96,7 +96,7 @@ public class HedgeRenderer //implements ISimpleBlockRenderingHandler
|
||||
// renderer.renderFaceXNeg(block, x, y, z, icon);
|
||||
// renderer.renderFaceXPos(block, x, y, z, icon);
|
||||
// }
|
||||
// GL11.glPopMatrix();
|
||||
// GlStateManager.popMatrix();
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
|
||||
@@ -36,8 +36,8 @@ public class MachineRendererKitchen {
|
||||
// }
|
||||
// tess.startDrawingQuads();
|
||||
// tess.draw();
|
||||
// GL11.glPushMatrix();
|
||||
// GL11.glTranslated(x + 0.5, y + 1.0, z + 0.5);
|
||||
// GlStateManager.pushMatrix();
|
||||
// GlStateManager.translate(x + 0.5, y + 1.0, z + 0.5);
|
||||
// RenderManager.instance.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
// final float ux = icon.getMinU();
|
||||
// final float uy = icon.getMinV();
|
||||
@@ -60,9 +60,9 @@ public class MachineRendererKitchen {
|
||||
// ang += 0.05f;
|
||||
// }
|
||||
// for (int angle = 0; angle < 360; angle += 90) {
|
||||
// GL11.glPushMatrix();
|
||||
// GL11.glRotatef(angle, 0.0f, 1.0f, 0.0f);
|
||||
// GL11.glTranslatef(-0.5f, 0.0f, 0.0f);
|
||||
// GlStateManager.pushMatrix();
|
||||
// GlStateManager.rotate(angle, 0.0f, 1.0f, 0.0f);
|
||||
// GlStateManager.translate(-0.5f, 0.0f, 0.0f);
|
||||
// tess.startDrawingQuads();
|
||||
// tess.setColorRGBA(255, 255, 255, 150);
|
||||
// tess.addVertexWithUV(half - d1 * ang, h2, -d1 * ang, 0.0, 0.0);
|
||||
@@ -76,10 +76,10 @@ public class MachineRendererKitchen {
|
||||
// tess.addVertexWithUV(half - d2 * ang, h3, -d2 * ang, 0.0, 0.0);
|
||||
// tess.addVertexWithUV(half - d1 * ang, h2, -d1 * ang, 0.0, 0.0);
|
||||
// tess.draw();
|
||||
// GL11.glPopMatrix();
|
||||
// GlStateManager.popMatrix();
|
||||
// }
|
||||
// }
|
||||
// GL11.glPopMatrix();
|
||||
// GlStateManager.popMatrix();
|
||||
// if (wasTessellating) {
|
||||
// tess.startDrawingQuads();
|
||||
// }
|
||||
|
||||
@@ -4,7 +4,7 @@ import binnie.core.BinnieCore;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import binnie.core.resource.ResourceType;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
public class MachineRendererNursery {
|
||||
public static MachineRendererNursery instance = new MachineRendererNursery();
|
||||
@@ -19,12 +19,12 @@ public class MachineRendererNursery {
|
||||
|
||||
public void renderMachine(final BinnieResource texture, final double x, final double y, final double z, final float var8) {
|
||||
this.texture = texture;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||
GL11.glScaled(0.05, 0.05, 0.05);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x + 0.5, y, z + 0.5);
|
||||
GlStateManager.scale(0.05, 0.05, 0.05);
|
||||
BinnieCore.proxy.bindTexture(new BinnieResource(ExtraTrees.instance, ResourceType.Tile, "test.png"));
|
||||
//this.casinoMachine.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user