use of net.minecraft.client.renderer.Tessellator in project NetherEx by LogicTechCorp.
the class RenderGhastlingFireball method doRender.
@Override
public void doRender(EntityGhastlingFireball fireball, double x, double y, double z, float entityYaw, float partialTicks) {
GlStateManager.pushMatrix();
bindEntityTexture(fireball);
GlStateManager.translate((float) x, (float) y, (float) z);
GlStateManager.enableRescaleNormal();
GlStateManager.scale(2.0F, 2.0F, 2.0F);
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer vertexbuffer = tessellator.getBuffer();
GlStateManager.rotate(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate((float) (renderManager.options.thirdPersonView == 2 ? -1 : 1) * -renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
if (renderOutlines) {
GlStateManager.enableColorMaterial();
GlStateManager.enableOutlineMode(getTeamColor(fireball));
}
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_NORMAL);
vertexbuffer.pos(-0.5D, -0.25D, 0.0D).tex(0.0D, 1.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
vertexbuffer.pos(0.5D, -0.25D, 0.0D).tex(1.0D, 1.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
vertexbuffer.pos(0.5D, 0.75D, 0.0D).tex(1.0D, 0.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
vertexbuffer.pos(-0.5D, 0.75D, 0.0D).tex(0.0D, 0.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
tessellator.draw();
if (renderOutlines) {
GlStateManager.disableOutlineMode();
GlStateManager.disableColorMaterial();
}
GlStateManager.disableRescaleNormal();
GlStateManager.popMatrix();
super.doRender(fireball, x, y, z, entityYaw, partialTicks);
}
use of net.minecraft.client.renderer.Tessellator in project NetherEx by LogicTechCorp.
the class RenderGhastQueenFireball method doRender.
@Override
public void doRender(EntityGhastQueenFireball fireball, double x, double y, double z, float entityYaw, float partialTicks) {
GlStateManager.pushMatrix();
bindEntityTexture(fireball);
GlStateManager.translate((float) x, (float) y, (float) z);
GlStateManager.enableRescaleNormal();
GlStateManager.scale(2.0F, 2.0F, 2.0F);
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer vertexbuffer = tessellator.getBuffer();
GlStateManager.rotate(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate((float) (renderManager.options.thirdPersonView == 2 ? -1 : 1) * -renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
if (renderOutlines) {
GlStateManager.enableColorMaterial();
GlStateManager.enableOutlineMode(getTeamColor(fireball));
}
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_NORMAL);
vertexbuffer.pos(-0.5D, -0.25D, 0.0D).tex(0.0D, 1.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
vertexbuffer.pos(0.5D, -0.25D, 0.0D).tex(1.0D, 1.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
vertexbuffer.pos(0.5D, 0.75D, 0.0D).tex(1.0D, 0.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
vertexbuffer.pos(-0.5D, 0.75D, 0.0D).tex(0.0D, 0.0D).normal(0.0F, 1.0F, 0.0F).endVertex();
tessellator.draw();
if (renderOutlines) {
GlStateManager.disableOutlineMode();
GlStateManager.disableColorMaterial();
}
GlStateManager.disableRescaleNormal();
GlStateManager.popMatrix();
super.doRender(fireball, x, y, z, entityYaw, partialTicks);
}
use of net.minecraft.client.renderer.Tessellator in project NetherEx by LogicTechCorp.
the class RenderUtil method drawTexturedModalRect.
public static void drawTexturedModalRect(int x, int y, int textureX, int textureY, int width, int height) {
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer vertexbuffer = tessellator.getBuffer();
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX);
vertexbuffer.pos((double) (x + 0), (double) (y + height), 0.0D).tex((double) ((float) (textureX + 0) * 0.00390625F), (double) ((float) (textureY + height) * 0.00390625F)).endVertex();
vertexbuffer.pos((double) (x + width), (double) (y + height), 0.0D).tex((double) ((float) (textureX + width) * 0.00390625F), (double) ((float) (textureY + height) * 0.00390625F)).endVertex();
vertexbuffer.pos((double) (x + width), (double) (y + 0), 0.0D).tex((double) ((float) (textureX + width) * 0.00390625F), (double) ((float) (textureY + 0) * 0.00390625F)).endVertex();
vertexbuffer.pos((double) (x + 0), (double) (y + 0), 0.0D).tex((double) ((float) (textureX + 0) * 0.00390625F), (double) ((float) (textureY + 0) * 0.00390625F)).endVertex();
tessellator.draw();
}
use of net.minecraft.client.renderer.Tessellator in project Trains-In-Motion-1.7.10 by EternalBlueFlame.
the class GUITransport method drawTexturedRect.
public static void drawTexturedRect(int posX, int posY, int posU, int posV, int width, int height) {
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(posX, posY + height, 0, posU * guiScaler, (posV + height) * guiScaler);
tessellator.addVertexWithUV(posX + width, posY + height, 0, (posU + width) * guiScaler, (posV + height) * guiScaler);
tessellator.addVertexWithUV(posX + width, posY, 0, (posU + width) * guiScaler, posV * guiScaler);
tessellator.addVertexWithUV(posX, posY, 0, posU * guiScaler, posV * guiScaler);
tessellator.draw();
}
use of net.minecraft.client.renderer.Tessellator in project GregTech by GregTechCE.
the class TextureArea method draw.
@SideOnly(Side.CLIENT)
public void draw(int x, int y, int width, int height) {
Minecraft.getMinecraft().renderEngine.bindTexture(imageLocation);
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder bufferbuilder = tessellator.getBuffer();
bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
bufferbuilder.pos(x, y + height, 0.0D).tex(offsetX, offsetY + imageHeight).endVertex();
bufferbuilder.pos(x + width, y + height, 0.0D).tex(offsetX + imageWidth, offsetY + imageHeight).endVertex();
bufferbuilder.pos(x + width, y, 0.0D).tex(offsetX + imageWidth, offsetY).endVertex();
bufferbuilder.pos(x, y, 0.0D).tex(offsetX, offsetY).endVertex();
tessellator.draw();
}
Aggregations