Java 类net.minecraft.client.renderer.GlStateManager 实例源码

项目:BaseClient    文件:LayerEndermanEyes.java   
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    this.endermanRenderer.bindTexture(field_177203_a);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(1, 1);
    GlStateManager.disableLighting();
    GlStateManager.depthMask(!entitylivingbaseIn.isInvisible());
    int i = 61680;
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.endermanRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
    this.endermanRenderer.func_177105_a(entitylivingbaseIn, partialTicks);
    GlStateManager.depthMask(true);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
}
项目:CustomWorldGen    文件:ItemCameraTransforms.java   
public static void applyTransformSide(ItemTransformVec3f vec, boolean leftHand)
{
    if (vec != ItemTransformVec3f.DEFAULT)
    {
        int i = leftHand ? -1 : 1;
        GlStateManager.translate((float)i * (offsetTranslateX + vec.translation.x), offsetTranslateY + vec.translation.y, offsetTranslateZ + vec.translation.z);
        float f = offsetRotationX + vec.rotation.x;
        float f1 = offsetRotationY + vec.rotation.y;
        float f2 = offsetRotationZ + vec.rotation.z;

        if (leftHand)
        {
            f1 = -f1;
            f2 = -f2;
        }

        GlStateManager.rotate(makeQuaternion(f, f1, f2));
        GlStateManager.scale(offsetScaleX + vec.scale.x, offsetScaleY + vec.scale.y, offsetScaleZ + vec.scale.z);
    }
}
项目:BaseClient    文件:RenderPainting.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityPainting entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    GlStateManager.translate(x, y, z);
    GlStateManager.rotate(180.0F - entityYaw, 0.0F, 1.0F, 0.0F);
    GlStateManager.enableRescaleNormal();
    this.bindEntityTexture(entity);
    EntityPainting.EnumArt entitypainting$enumart = entity.art;
    float f = 0.0625F;
    GlStateManager.scale(f, f, f);
    this.renderPainting(entity, entitypainting$enumart.sizeX, entitypainting$enumart.sizeY, entitypainting$enumart.offsetX, entitypainting$enumart.offsetY);
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
项目:CustomWorldGen    文件:RenderBoat.java   
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityBoat entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    this.setupTranslation(x, y, z);
    this.setupRotation(entity, entityYaw, partialTicks);
    this.bindEntityTexture(entity);

    if (this.renderOutlines)
    {
        GlStateManager.enableColorMaterial();
        GlStateManager.enableOutlineMode(this.getTeamColor(entity));
    }

    this.modelBoat.render(entity, partialTicks, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);

    if (this.renderOutlines)
    {
        GlStateManager.disableOutlineMode();
        GlStateManager.disableColorMaterial();
    }

    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
项目:DecompiledMinecraft    文件:RenderWitherSkull.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityWitherSkull entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    GlStateManager.disableCull();
    float f = this.func_82400_a(entity.prevRotationYaw, entity.rotationYaw, partialTicks);
    float f1 = entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTicks;
    GlStateManager.translate((float)x, (float)y, (float)z);
    float f2 = 0.0625F;
    GlStateManager.enableRescaleNormal();
    GlStateManager.scale(-1.0F, -1.0F, 1.0F);
    GlStateManager.enableAlpha();
    this.bindEntityTexture(entity);
    this.skeletonHeadModel.render(entity, 0.0F, 0.0F, 0.0F, f, f1, f2);
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
项目:BaseClient    文件:GuiSpectator.java   
private void func_175266_a(int p_175266_1_, int p_175266_2_, float p_175266_3_, float p_175266_4_, ISpectatorMenuObject p_175266_5_)
{
    this.field_175268_g.getTextureManager().bindTexture(field_175269_a);

    if (p_175266_5_ != SpectatorMenu.field_178657_a)
    {
        int i = (int)(p_175266_4_ * 255.0F);
        GlStateManager.pushMatrix();
        GlStateManager.translate((float)p_175266_2_, p_175266_3_, 0.0F);
        float f = p_175266_5_.func_178662_A_() ? 1.0F : 0.25F;
        GlStateManager.color(f, f, f, p_175266_4_);
        p_175266_5_.func_178663_a(f, i);
        GlStateManager.popMatrix();
        String s = String.valueOf((Object)GameSettings.getKeyDisplayString(this.field_175268_g.gameSettings.keyBindsHotbar[p_175266_1_].getKeyCode()));

        if (i > 3 && p_175266_5_.func_178662_A_())
        {
            this.field_175268_g.fontRendererObj.drawStringWithShadow(s, (float)(p_175266_2_ + 19 - 2 - this.field_175268_g.fontRendererObj.getStringWidth(s)), p_175266_3_ + 6.0F + 3.0F, 16777215 + (i << 24));
        }
    }
}
项目:Solar    文件:EyeOfSchrodingerRenderer.java   
@Override
protected void applyRotations(EntityEyeOfSchrodinger schrodinger, float p_77043_2_, float rotationYaw, float partialTicks) {
    GlStateManager.rotate(180F - rotationYaw, 0F, 1F, 0F);
    GlStateManager.rotate(-schrodinger.rotationPitch, 1F, 0F, 0.0F);

    if(schrodinger.deathTime > 0) {
        float f = ((float) schrodinger.deathTime + partialTicks - 1.0F) / 20.0F * 1.6F;
        f = MathHelper.sqrt(f);

        if(f > 1.0F) {
            f = 1.0F;
        }

        GlStateManager.rotate(f * this.getDeathMaxRotation(schrodinger), 0.0F, 0.0F, 1.0F);
    }
}
项目:ArcaneMagic    文件:GLHelper.java   
public static void renderParchmentFirstPerson(float pitch, float p_187463_2_, float p_187463_3_,
        ItemStack parchment)
{
    GlStateManager.pushMatrix();
    GlStateManager.pushAttrib();

    float f = MathHelper.sqrt(p_187463_3_);
    float f1 = -0.2F * MathHelper.sin(p_187463_3_ * (float) Math.PI);
    float f2 = -0.4F * MathHelper.sin(f * (float) Math.PI);
    GlStateManager.translate(0.0F, -f1 / 2.0F, f2);
    float f3 = Minecraft.getMinecraft().getItemRenderer().getMapAngleFromPitch(pitch);
    GlStateManager.translate(0.0F, 0.04F + p_187463_2_ * -1.2F + f3 * -0.5F, -0.72F);
    GlStateManager.rotate(f3 * -85.0F, 1.0F, 0.0F, 0.0F);
    Minecraft.getMinecraft().getItemRenderer().renderArms();
    float f4 = MathHelper.sin(f * (float) Math.PI);
    GlStateManager.rotate(f4 * 20.0F, 1.0F, 0.0F, 0.0F);
    GlStateManager.scale(2.0F, 2.0F, 2.0F);
    renderParchmentFirstPerson(parchment);

    GlStateManager.popAttrib();
    GlStateManager.popMatrix();
}
项目:DecompiledMinecraft    文件:GuiScreen.java   
/**
 * Draws the background (i is always 0 as of 1.2.2)
 */
public void drawBackground(int tint)
{
    GlStateManager.disableLighting();
    GlStateManager.disableFog();
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    this.mc.getTextureManager().bindTexture(optionsBackground);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    float f = 32.0F;
    worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
    worldrenderer.pos(0.0D, (double)this.height, 0.0D).tex(0.0D, (double)((float)this.height / 32.0F + (float)tint)).color(64, 64, 64, 255).endVertex();
    worldrenderer.pos((double)this.width, (double)this.height, 0.0D).tex((double)((float)this.width / 32.0F), (double)((float)this.height / 32.0F + (float)tint)).color(64, 64, 64, 255).endVertex();
    worldrenderer.pos((double)this.width, 0.0D, 0.0D).tex((double)((float)this.width / 32.0F), (double)tint).color(64, 64, 64, 255).endVertex();
    worldrenderer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, (double)tint).color(64, 64, 64, 255).endVertex();
    tessellator.draw();
}
项目:CustomWorldGen    文件:LayerEndermanEyes.java   
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    this.endermanRenderer.bindTexture(RES_ENDERMAN_EYES);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
    GlStateManager.disableLighting();
    GlStateManager.depthMask(!entitylivingbaseIn.isInvisible());
    int i = 61680;
    int j = 61680;
    int k = 0;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 61680.0F, 0.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.endermanRenderer.getMainModel().render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
    this.endermanRenderer.setLightmap(entitylivingbaseIn, partialTicks);
    GlStateManager.depthMask(true);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
}
项目:BaseClient    文件:RenderVillager.java   
/**
 * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
 * entityLiving, partialTickTime
 */
protected void preRenderCallback(EntityVillager entitylivingbaseIn, float partialTickTime)
{
    float f = 0.9375F;

    if (entitylivingbaseIn.getGrowingAge() < 0)
    {
        f = (float)((double)f * 0.5D);
        this.shadowSize = 0.25F;
    }
    else
    {
        this.shadowSize = 0.5F;
    }

    GlStateManager.scale(f, f, f);
}
项目:PonySocks2    文件:ModelArmorSockBiped.java   
@Override
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
    if (stack.getMetadata() > 0) {
        Minecraft.getMinecraft().getTextureManager().bindTexture(LAYERS[Math.min(LAYERS.length - 1, 1 + stack.getMetadata())]);
        super.render(entityIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
        return;
    }

    for (int i = 0; i < 2; i++) {
        int color = PonySocks.sock.getColor(stack, i > 0);
        GlStateManager.color(
                (float) ((color >> 16) & 0xFF) / 255.0f,
                (float) ((color >> 8) & 0xFF) / 255.0f,
                (float) (color & 0xFF) / 255.0f,
                1.0f
        );
        Minecraft.getMinecraft().getTextureManager().bindTexture(LAYERS[i]);
        super.render(entityIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
    }
}
项目:EMC    文件:RenderUtils.java   
public static void searchBox(IBlockPos IBlockPos) {
    RenderUtils.fixDarkLight();
    GlStateManager.resetColor();
    double x = IBlockPos.getX() - Minecraft.getMinecraft().getRenderManager().renderPosX;
    double y = IBlockPos.getY() - Minecraft.getMinecraft().getRenderManager().renderPosY;
    double z = IBlockPos.getZ() - Minecraft.getMinecraft().getRenderManager().renderPosZ;
    GL11.glBlendFunc(770, 771);
    GL11.glEnable(3042);
    GL11.glLineWidth(1.0F);
    float sinus = 1.0F - MathHelper
            .abs(MathHelper.sin(Minecraft.getSystemTime() % 10000L / 10000.0F * 3.1415927F * 4.0F) * 1.0F);
    GL11.glDisable(3553);
    GL11.glDisable(2929);
    GL11.glDepthMask(false);
    GL11.glColor4f(1.0F - sinus, sinus, 0.0F, 0.15F);
    drawColorBox(new AxisAlignedBB(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D), 1.0F - sinus, sinus, 0.0F, 0.15F);
    GL11.glColor4d(0.0D, 0.0D, 0.0D, 0.5D);
    drawSelectionBoundingBox(new AxisAlignedBB(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D));
    GL11.glEnable(3553);
    GL11.glEnable(2929);
    GL11.glDepthMask(true);
    GL11.glDisable(3042);
}
项目:DecompiledMinecraft    文件:GuiScreenOptionsSounds.java   
protected void mouseDragged(Minecraft mc, int mouseX, int mouseY)
{
    if (this.visible)
    {
        if (this.field_146155_p)
        {
            this.field_146156_o = (float)(mouseX - (this.xPosition + 4)) / (float)(this.width - 8);
            this.field_146156_o = MathHelper.clamp_float(this.field_146156_o, 0.0F, 1.0F);
            mc.gameSettings.setSoundLevel(this.field_146153_r, this.field_146156_o);
            mc.gameSettings.saveOptions();
            this.displayString = this.field_146152_s + ": " + GuiScreenOptionsSounds.this.getSoundVolume(this.field_146153_r);
        }

        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.drawTexturedModalRect(this.xPosition + (int)(this.field_146156_o * (float)(this.width - 8)), this.yPosition, 0, 66, 4, 20);
        this.drawTexturedModalRect(this.xPosition + (int)(this.field_146156_o * (float)(this.width - 8)) + 4, this.yPosition, 196, 66, 4, 20);
    }
}
项目:DecompiledMinecraft    文件:EntityPickupFX.java   
/**
 * Renders the particle
 */
public void renderParticle(WorldRenderer worldRendererIn, Entity entityIn, float partialTicks, float p_180434_4_, float p_180434_5_, float p_180434_6_, float p_180434_7_, float p_180434_8_)
{
    float f = ((float)this.age + partialTicks) / (float)this.maxAge;
    f = f * f;
    double d0 = this.field_174840_a.posX;
    double d1 = this.field_174840_a.posY;
    double d2 = this.field_174840_a.posZ;
    double d3 = this.field_174843_ax.lastTickPosX + (this.field_174843_ax.posX - this.field_174843_ax.lastTickPosX) * (double)partialTicks;
    double d4 = this.field_174843_ax.lastTickPosY + (this.field_174843_ax.posY - this.field_174843_ax.lastTickPosY) * (double)partialTicks + (double)this.field_174841_aA;
    double d5 = this.field_174843_ax.lastTickPosZ + (this.field_174843_ax.posZ - this.field_174843_ax.lastTickPosZ) * (double)partialTicks;
    double d6 = d0 + (d3 - d0) * (double)f;
    double d7 = d1 + (d4 - d1) * (double)f;
    double d8 = d2 + (d5 - d2) * (double)f;
    int i = this.getBrightnessForRender(partialTicks);
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    d6 = d6 - interpPosX;
    d7 = d7 - interpPosY;
    d8 = d8 - interpPosZ;
    this.field_174842_aB.renderEntityWithPosYaw(this.field_174840_a, (double)((float)d6), (double)((float)d7), (double)((float)d8), this.field_174840_a.rotationYaw, partialTicks);
}
项目:BaseClient    文件:CustomItemProperties.java   
public float getTextureHeight(TextureManager p_getTextureHeight_1_)
{
    if (this.textureHeight <= 0)
    {
        if (this.textureLocation != null)
        {
            ITextureObject itextureobject = p_getTextureHeight_1_.getTexture(this.textureLocation);
            int i = itextureobject.getGlTextureId();
            int j = GlStateManager.getBoundTexture();
            GlStateManager.bindTexture(i);
            this.textureHeight = GL11.glGetTexLevelParameteri(GL11.GL_TEXTURE_2D, 0, GL11.GL_TEXTURE_HEIGHT);
            GlStateManager.bindTexture(j);
        }

        if (this.textureHeight <= 0)
        {
            this.textureHeight = 16;
        }
    }

    return (float)this.textureHeight;
}
项目:Metalworks    文件:GuiMachine.java   
@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
    GlStateManager.pushMatrix();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.drawDefaultBackground();
    Pair<Integer, Integer> invCoords = this.machineInterface.getInventoryLocation(this.tile, this.player);
    if(invCoords != null){
        this.texture.bindTexture(INVENTORY_LOCATION);
        this.drawTexturedModalRect(invCoords.getLeft() + this.guiLeft, invCoords.getRight() + this.guiTop, 0, 0, 176, 85);
    }
    this.machineInterface.drawBackground(this.tile, this, this.texture, this.guiLeft, this.guiTop, mouseX, mouseY, partialTicks);
    if(this.energyBar != null){
        IEnergyStorage energy = this.tile.getEnergy(EnumFacing.NORTH);
        if(energy != null && energy.getMaxEnergyStored() > 0){
            this.energyBar.draw(energy.getEnergyStored(), energy.getMaxEnergyStored(), -1);
        }
    }
    GlStateManager.popMatrix();
}
项目:Industrial-Foregoing    文件:PetrifiedFuelInfoPiece.java   
@Override
public void drawForegroundLayer(BasicTeslaGuiContainer container, int guiX, int guiY, int mouseX, int mouseY) {
    super.drawForegroundLayer(container, guiX, guiY, mouseX, mouseY);
    if (this.tile != null) {
        long timeLeft = 0;
        long generatingRate = 0;
        if (this.tile.getGeneratedPowerStored() > 0) {
            timeLeft = ((this.tile.getGeneratedPowerStored() / 2) / this.tile.getGeneratedPowerReleaseRate()) / 20;
            generatingRate = this.tile.getGeneratedPowerReleaseRate();
        }
        FontRenderer renderer = Minecraft.getMinecraft().fontRenderer;
        GlStateManager.pushMatrix();
        GlStateManager.translate(this.getLeft() + 2, this.getTop() + 2, 0);
        GlStateManager.scale(1, 1, 1);
        renderer.drawString(TextFormatting.DARK_GRAY + new TextComponentTranslation("text.industrialforegoing.display.burning").getFormattedText(), 4, 4, 0xFFFFFF);
        renderer.drawString(TextFormatting.DARK_GRAY + getFormatedTime(timeLeft * 1000), 8, (renderer.FONT_HEIGHT) + 5, 0xFFFFFF);
        renderer.drawString(TextFormatting.DARK_GRAY + new TextComponentTranslation("text.industrialforegoing.display.producing").getFormattedText(), 4, 2 * (renderer.FONT_HEIGHT) + 9, 0xFFFFFF);
        renderer.drawString(TextFormatting.DARK_GRAY + "" + generatingRate + " RF/tick", 8, 3 * (renderer.FONT_HEIGHT) + 10, 0xFFFFFF);
        GlStateManager.popMatrix();
    }
}
项目:BaseClient    文件:GuiCreateFlatWorld.java   
private void func_148224_c(int p_148224_1_, int p_148224_2_, int p_148224_3_, int p_148224_4_)
{
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(Gui.statIcons);
    float f = 0.0078125F;
    float f1 = 0.0078125F;
    int i = 18;
    int j = 18;
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
    worldrenderer.pos((double)(p_148224_1_ + 0), (double)(p_148224_2_ + 18), (double)GuiCreateFlatWorld.this.zLevel).tex((double)((float)(p_148224_3_ + 0) * 0.0078125F), (double)((float)(p_148224_4_ + 18) * 0.0078125F)).endVertex();
    worldrenderer.pos((double)(p_148224_1_ + 18), (double)(p_148224_2_ + 18), (double)GuiCreateFlatWorld.this.zLevel).tex((double)((float)(p_148224_3_ + 18) * 0.0078125F), (double)((float)(p_148224_4_ + 18) * 0.0078125F)).endVertex();
    worldrenderer.pos((double)(p_148224_1_ + 18), (double)(p_148224_2_ + 0), (double)GuiCreateFlatWorld.this.zLevel).tex((double)((float)(p_148224_3_ + 18) * 0.0078125F), (double)((float)(p_148224_4_ + 0) * 0.0078125F)).endVertex();
    worldrenderer.pos((double)(p_148224_1_ + 0), (double)(p_148224_2_ + 0), (double)GuiCreateFlatWorld.this.zLevel).tex((double)((float)(p_148224_3_ + 0) * 0.0078125F), (double)((float)(p_148224_4_ + 0) * 0.0078125F)).endVertex();
    tessellator.draw();
}
项目:CustomWorldGen    文件:GuiStats.java   
/**
 * Draws a sprite from assets/textures/gui/container/stats_icons.png
 */
private void drawSprite(int p_146527_1_, int p_146527_2_, int p_146527_3_, int p_146527_4_)
{
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(STAT_ICONS);
    float f = 0.0078125F;
    float f1 = 0.0078125F;
    int i = 18;
    int j = 18;
    Tessellator tessellator = Tessellator.getInstance();
    VertexBuffer vertexbuffer = tessellator.getBuffer();
    vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX);
    vertexbuffer.pos((double)(p_146527_1_ + 0), (double)(p_146527_2_ + 18), (double)this.zLevel).tex((double)((float)(p_146527_3_ + 0) * 0.0078125F), (double)((float)(p_146527_4_ + 18) * 0.0078125F)).endVertex();
    vertexbuffer.pos((double)(p_146527_1_ + 18), (double)(p_146527_2_ + 18), (double)this.zLevel).tex((double)((float)(p_146527_3_ + 18) * 0.0078125F), (double)((float)(p_146527_4_ + 18) * 0.0078125F)).endVertex();
    vertexbuffer.pos((double)(p_146527_1_ + 18), (double)(p_146527_2_ + 0), (double)this.zLevel).tex((double)((float)(p_146527_3_ + 18) * 0.0078125F), (double)((float)(p_146527_4_ + 0) * 0.0078125F)).endVertex();
    vertexbuffer.pos((double)(p_146527_1_ + 0), (double)(p_146527_2_ + 0), (double)this.zLevel).tex((double)((float)(p_146527_3_ + 0) * 0.0078125F), (double)((float)(p_146527_4_ + 0) * 0.0078125F)).endVertex();
    tessellator.draw();
}
项目:CustomWorldGen    文件:GuiScreen.java   
/**
 * Draws the background (i is always 0 as of 1.2.2)
 */
public void drawBackground(int tint)
{
    GlStateManager.disableLighting();
    GlStateManager.disableFog();
    Tessellator tessellator = Tessellator.getInstance();
    VertexBuffer vertexbuffer = tessellator.getBuffer();
    this.mc.getTextureManager().bindTexture(OPTIONS_BACKGROUND);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    float f = 32.0F;
    vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
    vertexbuffer.pos(0.0D, (double)this.height, 0.0D).tex(0.0D, (double)((float)this.height / 32.0F + (float)tint)).color(64, 64, 64, 255).endVertex();
    vertexbuffer.pos((double)this.width, (double)this.height, 0.0D).tex((double)((float)this.width / 32.0F), (double)((float)this.height / 32.0F + (float)tint)).color(64, 64, 64, 255).endVertex();
    vertexbuffer.pos((double)this.width, 0.0D, 0.0D).tex((double)((float)this.width / 32.0F), (double)tint).color(64, 64, 64, 255).endVertex();
    vertexbuffer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, (double)tint).color(64, 64, 64, 255).endVertex();
    tessellator.draw();
}
项目:BaseClient    文件:LayerDeadmau5Head.java   
public void doRenderLayer(AbstractClientPlayer entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    if (entitylivingbaseIn.getName().equals("deadmau5") && entitylivingbaseIn.hasSkin() && !entitylivingbaseIn.isInvisible())
    {
        this.playerRenderer.bindTexture(entitylivingbaseIn.getLocationSkin());

        for (int i = 0; i < 2; ++i)
        {
            float f = entitylivingbaseIn.prevRotationYaw + (entitylivingbaseIn.rotationYaw - entitylivingbaseIn.prevRotationYaw) * partialTicks - (entitylivingbaseIn.prevRenderYawOffset + (entitylivingbaseIn.renderYawOffset - entitylivingbaseIn.prevRenderYawOffset) * partialTicks);
            float f1 = entitylivingbaseIn.prevRotationPitch + (entitylivingbaseIn.rotationPitch - entitylivingbaseIn.prevRotationPitch) * partialTicks;
            GlStateManager.pushMatrix();
            GlStateManager.rotate(f, 0.0F, 1.0F, 0.0F);
            GlStateManager.rotate(f1, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.375F * (float)(i * 2 - 1), 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -0.375F, 0.0F);
            GlStateManager.rotate(-f1, 1.0F, 0.0F, 0.0F);
            GlStateManager.rotate(-f, 0.0F, 1.0F, 0.0F);
            float f2 = 1.3333334F;
            GlStateManager.scale(f2, f2, f2);
            this.playerRenderer.getMainModel().renderDeadmau5Head(0.0625F);
            GlStateManager.popMatrix();
        }
    }
}
项目:Backmemed    文件:Framebuffer.java   
public void bindFramebuffer(boolean p_147610_1_)
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        OpenGlHelper.glBindFramebuffer(OpenGlHelper.GL_FRAMEBUFFER, this.framebufferObject);

        if (p_147610_1_)
        {
            GlStateManager.viewport(0, 0, this.framebufferWidth, this.framebufferHeight);
        }
    }
}
项目:FundamentalChemistry    文件:ChemicalInventoryGui.java   
@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks,
        int mouseX, int mouseY) {
   GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
   this.mc.getTextureManager().bindTexture(new ResourceLocation("fundamentalchemistry:textures/gui/container/chemical_inventory.png"));
   this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);

   //display energy
   if(this.inv.max_energy > 0){
    int eh = (int)(this.inv.energy/(float)this.inv.max_energy*39);
    if(eh > 0)
        this.drawTexturedModalRect(this.guiLeft+160, this.guiTop+8+39-eh, 176, 39-eh, 8, eh);
   }
}
项目:BaseClient    文件:EntityLargeExplodeFX.java   
/**
 * Renders the particle
 */
public void renderParticle(WorldRenderer worldRendererIn, Entity entityIn, float partialTicks, float p_180434_4_, float p_180434_5_, float p_180434_6_, float p_180434_7_, float p_180434_8_)
{
    int i = (int)(((float)this.field_70581_a + partialTicks) * 15.0F / (float)this.field_70584_aq);

    if (i <= 15)
    {
        this.theRenderEngine.bindTexture(EXPLOSION_TEXTURE);
        float f = (float)(i % 4) / 4.0F;
        float f1 = f + 0.24975F;
        float f2 = (float)(i / 4) / 4.0F;
        float f3 = f2 + 0.24975F;
        float f4 = 2.0F * this.field_70582_as;
        float f5 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)partialTicks - interpPosX);
        float f6 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)partialTicks - interpPosY);
        float f7 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)partialTicks - interpPosZ);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.disableLighting();
        RenderHelper.disableStandardItemLighting();
        worldRendererIn.begin(7, field_181549_az);
        worldRendererIn.pos((double)(f5 - p_180434_4_ * f4 - p_180434_7_ * f4), (double)(f6 - p_180434_5_ * f4), (double)(f7 - p_180434_6_ * f4 - p_180434_8_ * f4)).tex((double)f1, (double)f3).color(this.particleRed, this.particleGreen, this.particleBlue, 1.0F).lightmap(0, 240).normal(0.0F, 1.0F, 0.0F).endVertex();
        worldRendererIn.pos((double)(f5 - p_180434_4_ * f4 + p_180434_7_ * f4), (double)(f6 + p_180434_5_ * f4), (double)(f7 - p_180434_6_ * f4 + p_180434_8_ * f4)).tex((double)f1, (double)f2).color(this.particleRed, this.particleGreen, this.particleBlue, 1.0F).lightmap(0, 240).normal(0.0F, 1.0F, 0.0F).endVertex();
        worldRendererIn.pos((double)(f5 + p_180434_4_ * f4 + p_180434_7_ * f4), (double)(f6 + p_180434_5_ * f4), (double)(f7 + p_180434_6_ * f4 + p_180434_8_ * f4)).tex((double)f, (double)f2).color(this.particleRed, this.particleGreen, this.particleBlue, 1.0F).lightmap(0, 240).normal(0.0F, 1.0F, 0.0F).endVertex();
        worldRendererIn.pos((double)(f5 + p_180434_4_ * f4 - p_180434_7_ * f4), (double)(f6 - p_180434_5_ * f4), (double)(f7 + p_180434_6_ * f4 - p_180434_8_ * f4)).tex((double)f, (double)f3).color(this.particleRed, this.particleGreen, this.particleBlue, 1.0F).lightmap(0, 240).normal(0.0F, 1.0F, 0.0F).endVertex();
        Tessellator.getInstance().draw();
        GlStateManager.enableLighting();
    }
}
项目:BaseClient    文件:RenderCreeper.java   
/**
 * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
 * entityLiving, partialTickTime
 */
protected void preRenderCallback(EntityCreeper entitylivingbaseIn, float partialTickTime)
{
    float f = entitylivingbaseIn.getCreeperFlashIntensity(partialTickTime);
    float f1 = 1.0F + MathHelper.sin(f * 100.0F) * f * 0.01F;
    f = MathHelper.clamp_float(f, 0.0F, 1.0F);
    f = f * f;
    f = f * f;
    float f2 = (1.0F + f * 0.4F) * f1;
    float f3 = (1.0F + f * 0.1F) / f1;
    GlStateManager.scale(f2, f3, f2);
}
项目:BaseClient    文件:RenderLeashKnot.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityLeashKnot entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    GlStateManager.disableCull();
    GlStateManager.translate((float)x, (float)y, (float)z);
    float f = 0.0625F;
    GlStateManager.enableRescaleNormal();
    GlStateManager.scale(-1.0F, -1.0F, 1.0F);
    GlStateManager.enableAlpha();
    this.bindEntityTexture(entity);
    this.leashKnotModel.render(entity, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, f);
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
项目:BaseClient    文件:ChunkRenderDispatcher.java   
private void uploadDisplayList(WorldRenderer p_178510_1_, int p_178510_2_, RenderChunk chunkRenderer)
{
    GL11.glNewList(p_178510_2_, GL11.GL_COMPILE);
    GlStateManager.pushMatrix();
    chunkRenderer.multModelviewMatrix();
    this.worldVertexUploader.func_181679_a(p_178510_1_);
    GlStateManager.popMatrix();
    GL11.glEndList();
}
项目:BaseClient    文件:RenderMagmaCube.java   
/**
 * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
 * entityLiving, partialTickTime
 */
protected void preRenderCallback(EntityMagmaCube entitylivingbaseIn, float partialTickTime)
{
    int i = entitylivingbaseIn.getSlimeSize();
    float f = (entitylivingbaseIn.prevSquishFactor + (entitylivingbaseIn.squishFactor - entitylivingbaseIn.prevSquishFactor) * partialTickTime) / ((float)i * 0.5F + 1.0F);
    float f1 = 1.0F / (f + 1.0F);
    float f2 = (float)i;
    GlStateManager.scale(f1 * f2, 1.0F / f1 * f2, f1 * f2);
}
项目:ForgeHax    文件:SurfaceHelper.java   
public static void drawText(String msg, int x, int y, int color, double scale, boolean shadow) {
    GlStateManager.pushMatrix();
    GlStateManager.disableDepth();
    GlStateManager.scale(scale, scale, scale);
    MC.fontRenderer.drawString(msg, (int)(x * (1/scale)), (int)(y * (1/scale)), color, shadow);
    GlStateManager.enableDepth();
    GlStateManager.popMatrix();
}
项目:Randores2    文件:CraftiniumForgeGui.java   
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(new ResourceLocation("randores:textures/gui/craftinium_forge.png"));
    int i = (this.width - this.xSize) / 2;
    int j = (this.height - this.ySize) / 2;
    this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize);

    if (this.tileEntity.isBurning()) {
        int k = this.getBurnLeftScaled(13);
        this.drawTexturedModalRect(i + 56, j + 36 + 12 - k, 176, 12 - k, 14, k + 1);
    }

    int l = this.getCookProgressScaled(24);
    this.drawTexturedModalRect(i + 79, j + 34, 176, 14, l + 1, 16);
}
项目:Backmemed    文件:GuiScreenDemo.java   
/**
 * Draws either a gradient over the background screen (when it exists) or a flat gradient over background.png
 */
public void drawDefaultBackground()
{
    super.drawDefaultBackground();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(DEMO_BACKGROUND_LOCATION);
    int i = (this.width - 248) / 2;
    int j = (this.height - 166) / 2;
    this.drawTexturedModalRect(i, j, 0, 0, 248, 166);
}
项目:DecompiledMinecraft    文件:LayerMooshroomMushroom.java   
public void doRenderLayer(EntityMooshroom entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    if (!entitylivingbaseIn.isChild() && !entitylivingbaseIn.isInvisible())
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        this.mooshroomRenderer.bindTexture(TextureMap.locationBlocksTexture);
        GlStateManager.enableCull();
        GlStateManager.cullFace(1028);
        GlStateManager.pushMatrix();
        GlStateManager.scale(1.0F, -1.0F, 1.0F);
        GlStateManager.translate(0.2F, 0.35F, 0.5F);
        GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.pushMatrix();
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.1F, 0.0F, -0.6F);
        GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        ((ModelQuadruped)this.mooshroomRenderer.getMainModel()).head.postRender(0.0625F);
        GlStateManager.scale(1.0F, -1.0F, 1.0F);
        GlStateManager.translate(0.0F, 0.7F, -0.2F);
        GlStateManager.rotate(12.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.cullFace(1029);
        GlStateManager.disableCull();
    }
}
项目:CustomWorldGen    文件:GuiCustomizeWorldScreen.java   
/**
 * Draws the screen and all the components in it.
 */
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
    this.drawDefaultBackground();
    this.list.drawScreen(mouseX, mouseY, partialTicks);
    this.drawCenteredString(this.fontRendererObj, this.title, this.width / 2, 2, 16777215);
    this.drawCenteredString(this.fontRendererObj, this.subtitle, this.width / 2, 12, 16777215);
    this.drawCenteredString(this.fontRendererObj, this.pageTitle, this.width / 2, 22, 16777215);
    super.drawScreen(mouseX, mouseY, partialTicks);

    if (this.confirmMode != 0)
    {
        drawRect(0, 0, this.width, this.height, Integer.MIN_VALUE);
        this.drawHorizontalLine(this.width / 2 - 91, this.width / 2 + 90, 99, -2039584);
        this.drawHorizontalLine(this.width / 2 - 91, this.width / 2 + 90, 185, -6250336);
        this.drawVerticalLine(this.width / 2 - 91, 99, 185, -2039584);
        this.drawVerticalLine(this.width / 2 + 90, 99, 185, -6250336);
        float f = 85.0F;
        float f1 = 180.0F;
        GlStateManager.disableLighting();
        GlStateManager.disableFog();
        Tessellator tessellator = Tessellator.getInstance();
        VertexBuffer vertexbuffer = tessellator.getBuffer();
        this.mc.getTextureManager().bindTexture(OPTIONS_BACKGROUND);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        float f2 = 32.0F;
        vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
        vertexbuffer.pos((double)(this.width / 2 - 90), 185.0D, 0.0D).tex(0.0D, 2.65625D).color(64, 64, 64, 64).endVertex();
        vertexbuffer.pos((double)(this.width / 2 + 90), 185.0D, 0.0D).tex(5.625D, 2.65625D).color(64, 64, 64, 64).endVertex();
        vertexbuffer.pos((double)(this.width / 2 + 90), 100.0D, 0.0D).tex(5.625D, 0.0D).color(64, 64, 64, 64).endVertex();
        vertexbuffer.pos((double)(this.width / 2 - 90), 100.0D, 0.0D).tex(0.0D, 0.0D).color(64, 64, 64, 64).endVertex();
        tessellator.draw();
        this.drawCenteredString(this.fontRendererObj, I18n.format("createWorld.customize.custom.confirmTitle", new Object[0]), this.width / 2, 105, 16777215);
        this.drawCenteredString(this.fontRendererObj, I18n.format("createWorld.customize.custom.confirm1", new Object[0]), this.width / 2, 125, 16777215);
        this.drawCenteredString(this.fontRendererObj, I18n.format("createWorld.customize.custom.confirm2", new Object[0]), this.width / 2, 135, 16777215);
        this.confirm.drawButton(this.mc, mouseX, mouseY);
        this.cancel.drawButton(this.mc, mouseX, mouseY);
    }
}
项目:Backmemed    文件:Shaders.java   
public static void beginSpiderEyes()
{
    if (isRenderingWorld && programsID[18] != programsID[0])
    {
        useProgram(18);
        GlStateManager.enableAlpha();
        GlStateManager.alphaFunc(516, 0.0F);
        GlStateManager.blendFunc(770, 771);
    }
}
项目:Backmemed    文件:RenderDragonFireball.java   
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityDragonFireball entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    this.bindEntityTexture(entity);
    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();
    float f = 1.0F;
    float f1 = 0.5F;
    float f2 = 0.25F;
    GlStateManager.rotate(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate((float)(this.renderManager.options.thirdPersonView == 2 ? -1 : 1) * -this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);

    if (this.renderOutlines)
    {
        GlStateManager.enableColorMaterial();
        GlStateManager.enableOutlineMode(this.getTeamColor(entity));
    }

    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 (this.renderOutlines)
    {
        GlStateManager.disableOutlineMode();
        GlStateManager.disableColorMaterial();
    }

    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
项目:Backmemed    文件:Shaders.java   
public static void endHand()
{
    checkGLError("pre endHand");
    checkFramebufferStatus("pre endHand");
    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glPopMatrix();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glPopMatrix();
    GlStateManager.blendFunc(770, 771);
    checkGLError("endHand");
}
项目:BaseClient    文件:GuiPlayerTabOverlay.java   
protected void drawPing(int p_175245_1_, int p_175245_2_, int p_175245_3_, NetworkPlayerInfo networkPlayerInfoIn)
{
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(icons);
    int i = 0;
    int j = 0;

    if (networkPlayerInfoIn.getResponseTime() < 0)
    {
        j = 5;
    }
    else if (networkPlayerInfoIn.getResponseTime() < 150)
    {
        j = 0;
    }
    else if (networkPlayerInfoIn.getResponseTime() < 300)
    {
        j = 1;
    }
    else if (networkPlayerInfoIn.getResponseTime() < 600)
    {
        j = 2;
    }
    else if (networkPlayerInfoIn.getResponseTime() < 1000)
    {
        j = 3;
    }
    else
    {
        j = 4;
    }

    this.zLevel += 100.0F;
    this.drawTexturedModalRect(p_175245_2_ + p_175245_1_ - 11, p_175245_3_, 0 + i * 10, 176 + j * 8, 10, 8);
    this.zLevel -= 100.0F;
}
项目:pnc-repressurized    文件:ModelElevatorBase.java   
private void renderPole(ModelRenderer pole, int idx, float scale, float extension) {
    GlStateManager.translate(0, -extension / 4, 0);
    GlStateManager.pushMatrix();
    GlStateManager.translate(0, FACTOR, 0);
    GlStateManager.scale(1, extension * 16 / 14 / 4, 1);
    GlStateManager.translate(0, -FACTOR, 0);
    GlStateManager.color(1 - idx * 0.15f, 1 - idx * 0.15f, 1 - idx * 0.15f, 1);
    pole.render(scale);
    GlStateManager.popMatrix();
}
项目:CustomWorldGen    文件:Framebuffer.java   
public void bindFramebufferTexture()
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        GlStateManager.bindTexture(this.framebufferTexture);
    }
}