當前位置: 首頁>>代碼示例>>Java>>正文


Java GlStateManager.disableTexture2D方法代碼示例

本文整理匯總了Java中net.minecraft.client.renderer.GlStateManager.disableTexture2D方法的典型用法代碼示例。如果您正苦於以下問題:Java GlStateManager.disableTexture2D方法的具體用法?Java GlStateManager.disableTexture2D怎麽用?Java GlStateManager.disableTexture2D使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.client.renderer.GlStateManager的用法示例。


在下文中一共展示了GlStateManager.disableTexture2D方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: render

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
@Override
public void render(SemiBlockLogistics semiBlock, float partialTick) {
    int alpha = semiBlock.getAlpha();
    if (alpha == 0) return;
    GlStateManager.disableTexture2D();
    if (alpha < 255) GlStateManager.enableBlend();
    RenderUtils.glColorHex((alpha << 24 | 0x00FFFFFF) & semiBlock.getColor());
    AxisAlignedBB aabb = semiBlock.getWorld() != null ?
        semiBlock.getBlockState().getSelectedBoundingBox(semiBlock.getWorld(), semiBlock.getPos()) :
        new AxisAlignedBB(0 + FRAME_WIDTH, 0 + FRAME_WIDTH, 0 + FRAME_WIDTH, 1 - FRAME_WIDTH, 1 - FRAME_WIDTH, 1 - FRAME_WIDTH);

    if (semiBlock.getPos() != null)
        GlStateManager.translate(-semiBlock.getPos().getX(), -semiBlock.getPos().getY(), -semiBlock.getPos().getZ());

    renderFrame(aabb, FRAME_WIDTH);
    GlStateManager.enableTexture2D();
    GlStateManager.disableBlend();
    GlStateManager.color(1, 1, 1, 1);
}
 
開發者ID:TeamPneumatic,項目名稱:pnc-repressurized,代碼行數:20,代碼來源:SemiBlockRendererLogistics.java

示例2: drawBorderedRectReliant

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void drawBorderedRectReliant(float x, float y, float x1, float y1, float lineWidth, int inside, int border) {
	GlStateManager.enableBlend();
    GlStateManager.disableTexture2D();
    GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
    RenderUtils.drawRect(x, y, x1, y1, inside);
    RenderUtils.glColor(border);
    GL11.glEnable((int)3042);
    GL11.glDisable((int)3553);
    GL11.glBlendFunc((int)770, (int)771);
    GL11.glLineWidth((float)lineWidth);
    GL11.glBegin((int)3);
    GL11.glVertex2f((float)x, (float)y);
    GL11.glVertex2f((float)x, (float)y1);
    GL11.glVertex2f((float)x1, (float)y1);
    GL11.glVertex2f((float)x1, (float)y);
    GL11.glVertex2f((float)x, (float)y);
    GL11.glEnd();
    GL11.glEnable((int)3553);
    GL11.glDisable((int)3042);
    GlStateManager.enableTexture2D();
    GlStateManager.disableBlend();
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:23,代碼來源:RenderUtils.java

示例3: drawFullCircle

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void drawFullCircle(float cx, float cy, float r, int c) {
    r *= 2.0;
    cx *= 2;
    cy *= 2;
    float f = (float)(c >> 24 & 255) / 255.0f;
    float f1 = (float)(c >> 16 & 255) / 255.0f;
    float f2 = (float)(c >> 8 & 255) / 255.0f;
    float f3 = (float)(c & 255) / 255.0f;
    GlStateManager.enableBlend();
    GlStateManager.disableTexture2D();
    GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
    GL11.glScalef((float)0.5f, (float)0.5f, (float)0.5f);
    GL11.glColor4f((float)f1, (float)f2, (float)f3, (float)f);
    GL11.glBegin((int)6);
    int i = 0;
    while (i <= 360) {
        double x = Math.sin((double)i * 3.141592653589793 / 180.0) * r;
        double y = Math.cos((double)i * 3.141592653589793 / 180.0) * r;
        GL11.glVertex2d((double)((double)cx + x), (double)((double)cy + y));
        ++i;
    }
    GL11.glEnd();
    GL11.glScalef((float)2.0f, (float)2.0f, (float)2.0f);
    GlStateManager.enableTexture2D();
    GlStateManager.disableBlend();
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:27,代碼來源:RenderUtils.java

示例4: drawRoundedRect

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void drawRoundedRect(float x, float y, float x1, float y1, int borderC, int insideC) {
	GlStateManager.enableBlend();
    GlStateManager.disableTexture2D();
    GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
    GL11.glScalef((float)0.5f, (float)0.5f, (float)0.5f);
    RenderUtils.drawVLine(x *= 2.0f, (y *= 2.0f) + 1.0f, (y1 *= 2.0f) - 2.0f, borderC);
    RenderUtils.drawVLine((x1 *= 2.0f) - 1.0f, y + 1.0f, y1 - 2.0f, borderC);
    RenderUtils.drawHLine(x + 2.0f, x1 - 3.0f, y, borderC);
    RenderUtils.drawHLine(x + 2.0f, x1 - 3.0f, y1 - 1.0f, borderC);
    RenderUtils.drawHLine(x + 1.0f, x + 1.0f, y + 1.0f, borderC);
    RenderUtils.drawHLine(x1 - 2.0f, x1 - 2.0f, y + 1.0f, borderC);
    RenderUtils.drawHLine(x1 - 2.0f, x1 - 2.0f, y1 - 2.0f, borderC);
    RenderUtils.drawHLine(x + 1.0f, x + 1.0f, y1 - 2.0f, borderC);
    RenderUtils.drawRect(x + 1.0f, y + 1.0f, x1 - 1.0f, y1 - 1.0f, insideC);
    GL11.glScalef((float)2.0f, (float)2.0f, (float)2.0f);
    GlStateManager.enableTexture2D();
    GlStateManager.disableBlend();
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:19,代碼來源:RenderUtils.java

示例5: drawGradientBorderedRect

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void drawGradientBorderedRect(double x, double y, double x2, double y2, float l1, int col1, int col2, int col3) {
	GlStateManager.enableBlend();
    GlStateManager.disableTexture2D();
    GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
    GL11.glPushMatrix();
    RenderUtils.glColor(col1);
    GL11.glLineWidth((float)1.0f);
    GL11.glBegin((int)1);
    GL11.glVertex2d((double)x, (double)y);
    GL11.glVertex2d((double)x, (double)y2);
    GL11.glVertex2d((double)x2, (double)y2);
    GL11.glVertex2d((double)x2, (double)y);
    GL11.glVertex2d((double)x, (double)y);
    GL11.glVertex2d((double)x2, (double)y);
    GL11.glVertex2d((double)x, (double)y2);
    GL11.glVertex2d((double)x2, (double)y2);
    GL11.glEnd();
    GL11.glPopMatrix();
    RenderUtils.drawGradientRect(x, y, x2, y2, col2, col3);
    GlStateManager.enableTexture2D();
    GlStateManager.disableBlend();
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:23,代碼來源:RenderUtils.java

示例6: drawEntityOnScreen

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Draws the entity to the screen. Args: xPos, yPos, scale, mouseX, mouseY, entityLiving
 */
public static void drawEntityOnScreen(int posX, int posY, int scale, float mouseX, float mouseY, EntityLivingBase ent)
{
    GlStateManager.enableColorMaterial();
    GlStateManager.pushMatrix();
    GlStateManager.translate((float)posX, (float)posY, 50.0F);
    GlStateManager.scale((float)(-scale), (float)scale, (float)scale);
    GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F);
    float f = ent.renderYawOffset;
    float f1 = ent.rotationYaw;
    float f2 = ent.rotationPitch;
    float f3 = ent.prevRotationYawHead;
    float f4 = ent.rotationYawHead;
    GlStateManager.rotate(135.0F, 0.0F, 1.0F, 0.0F);
    RenderHelper.enableStandardItemLighting();
    GlStateManager.rotate(-135.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(-((float)Math.atan((double)(mouseY / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F);
    ent.renderYawOffset = (float)Math.atan((double)(mouseX / 40.0F)) * 20.0F;
    ent.rotationYaw = (float)Math.atan((double)(mouseX / 40.0F)) * 40.0F;
    ent.rotationPitch = -((float)Math.atan((double)(mouseY / 40.0F))) * 20.0F;
    ent.rotationYawHead = ent.rotationYaw;
    ent.prevRotationYawHead = ent.rotationYaw;
    GlStateManager.translate(0.0F, 0.0F, 0.0F);
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    rendermanager.setPlayerViewY(180.0F);
    rendermanager.setRenderShadow(false);
    rendermanager.renderEntityWithPosYaw(ent, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
    rendermanager.setRenderShadow(true);
    ent.renderYawOffset = f;
    ent.rotationYaw = f1;
    ent.rotationPitch = f2;
    ent.prevRotationYawHead = f3;
    ent.rotationYawHead = f4;
    GlStateManager.popMatrix();
    RenderHelper.disableStandardItemLighting();
    GlStateManager.disableRescaleNormal();
    GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
    GlStateManager.disableTexture2D();
    GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:43,代碼來源:GuiInventory.java

示例7: drawEntityOnScreen

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void drawEntityOnScreen(int posX, int posY, int scale, EntityLivingBase ent) {
	GlStateManager.enableColorMaterial();
	GlStateManager.pushMatrix();
	GlStateManager.translate(posX, posY, 50.0F);
	GlStateManager.scale((-scale), scale, scale);
	GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F);
	float f = ent.renderYawOffset;
	float f1 = ent.rotationYaw;
	float f2 = ent.rotationPitch;
	float f3 = ent.prevRotationYawHead;
	float f4 = ent.rotationYawHead;
	GlStateManager.rotate(135.0F, 0.0F, 1.0F, 0.0F);
	RenderHelper.enableStandardItemLighting();
	GlStateManager.rotate(-135.0F, 0.0F, 1.0F, 0.0F);
	ent.renderYawOffset = 0;
	ent.rotationYaw = 0;
	ent.rotationPitch = 0;
	ent.rotationYawHead = ent.rotationYaw;
	ent.prevRotationYawHead = ent.rotationYaw;
	GlStateManager.translate(0.0F, 0.0F, 0.0F);
	RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
	rendermanager.setPlayerViewY(180.0F);
	rendermanager.setRenderShadow(false);
	rendermanager.doRenderEntity(ent, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F, false);
	rendermanager.setRenderShadow(true);
	ent.renderYawOffset = f;
	ent.rotationYaw = f1;
	ent.rotationPitch = f2;
	ent.prevRotationYawHead = f3;
	ent.rotationYawHead = f4;
	GlStateManager.popMatrix();
	RenderHelper.disableStandardItemLighting();
	GlStateManager.disableRescaleNormal();
	GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
	GlStateManager.disableTexture2D();
	GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
}
 
開發者ID:rafradek,項目名稱:Mods,代碼行數:38,代碼來源:GuiDisguiseKit.java

示例8: renderParticle

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
@Override
public void renderParticle(BufferBuilder buffer, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ) {
	Tessellator.getInstance().draw();

	GlStateManager.disableTexture2D();
	segments.forEach(BoltSegment::render);
	GlStateManager.enableTexture2D();

	buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP);
}
 
開發者ID:ArekkuusuJerii,項目名稱:Solar,代碼行數:11,代碼來源:ParticleBolt.java

示例9: drawNameplate

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void drawNameplate(FontRenderer fontRendererIn, String str, float x, float y, float z, int verticalShift, float viewerYaw, float viewerPitch, boolean isThirdPersonFrontal)
{
    GlStateManager.pushMatrix();
    GlStateManager.translate(x, y, z);
    GlStateManager.glNormal3f(0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(-viewerYaw, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate((float)(isThirdPersonFrontal ? -1 : 1) * viewerPitch, 1.0F, 0.0F, 0.0F);
    GlStateManager.scale(-0.025F, -0.025F, 0.025F);
    GlStateManager.disableLighting();
    GlStateManager.depthMask(false);

    GlStateManager.enableBlend();
    GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
    int i = fontRendererIn.getStringWidth(str) / 2;
    GlStateManager.disableTexture2D();
    Tessellator tessellator = Tessellator.getInstance();
    VertexBuffer vertexbuffer = tessellator.getBuffer();
    vertexbuffer.begin(7, DefaultVertexFormats.POSITION_COLOR);
    vertexbuffer.pos((double)(-i - 1), (double)(-1 + verticalShift), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex();
    vertexbuffer.pos((double)(-i - 1), (double)(8 + verticalShift), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex();
    vertexbuffer.pos((double)(i + 1), (double)(8 + verticalShift), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex();
    vertexbuffer.pos((double)(i + 1), (double)(-1 + verticalShift), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex();
    tessellator.draw();
    GlStateManager.enableTexture2D();

    GlStateManager.depthMask(true);
    fontRendererIn.drawString(str, -fontRendererIn.getStringWidth(str) / 2, verticalShift, -1);
    GlStateManager.enableLighting();
    GlStateManager.disableBlend();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.popMatrix();
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:33,代碼來源:RenderUtils.java

示例10: renderModel

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Renders the model in RenderLiving
 */
protected void renderModel(EntityDragon entitylivingbaseIn, float p_77036_2_, float p_77036_3_, float p_77036_4_, float p_77036_5_, float p_77036_6_, float p_77036_7_)
{
    if (entitylivingbaseIn.deathTicks > 0)
    {
        float f = (float)entitylivingbaseIn.deathTicks / 200.0F;
        GlStateManager.depthFunc(515);
        GlStateManager.enableAlpha();
        GlStateManager.alphaFunc(516, f);
        this.bindTexture(enderDragonExplodingTextures);
        this.mainModel.render(entitylivingbaseIn, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);
        GlStateManager.alphaFunc(516, 0.1F);
        GlStateManager.depthFunc(514);
    }

    this.bindEntityTexture(entitylivingbaseIn);
    this.mainModel.render(entitylivingbaseIn, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);

    if (entitylivingbaseIn.hurtTime > 0)
    {
        GlStateManager.depthFunc(514);
        GlStateManager.disableTexture2D();
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(770, 771);
        GlStateManager.color(1.0F, 0.0F, 0.0F, 0.5F);
        this.mainModel.render(entitylivingbaseIn, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);
        GlStateManager.enableTexture2D();
        GlStateManager.disableBlend();
        GlStateManager.depthFunc(515);
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:34,代碼來源:RenderDragon.java

示例11: drawRect

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Draws a solid color rectangle with the specified coordinates and color (ARGB format). Args: x1, y1, x2, y2, color
 */
public static void drawRect(int left, int top, int right, int bottom, int color)
{
    if (left < right)
    {
        int i = left;
        left = right;
        right = i;
    }

    if (top < bottom)
    {
        int j = top;
        top = bottom;
        bottom = j;
    }

    float f3 = (float)(color >> 24 & 255) / 255.0F;
    float f = (float)(color >> 16 & 255) / 255.0F;
    float f1 = (float)(color >> 8 & 255) / 255.0F;
    float f2 = (float)(color & 255) / 255.0F;
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    GlStateManager.enableBlend();
    GlStateManager.disableTexture2D();
    GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
    GlStateManager.color(f, f1, f2, f3);
    worldrenderer.begin(7, DefaultVertexFormats.POSITION);
    worldrenderer.pos((double)left, (double)bottom, 0.0D).endVertex();
    worldrenderer.pos((double)right, (double)bottom, 0.0D).endVertex();
    worldrenderer.pos((double)right, (double)top, 0.0D).endVertex();
    worldrenderer.pos((double)left, (double)top, 0.0D).endVertex();
    tessellator.draw();
    GlStateManager.enableTexture2D();
    GlStateManager.disableBlend();
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:39,代碼來源:Gui.java

示例12: drawRect

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public static void drawRect(float x, float y, float x1, float y1, float r, float g, float b, float a) {
	GlStateManager.enableBlend();
    GlStateManager.disableTexture2D();
    GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
    GL11.glColor4f((float)r, (float)g, (float)b, (float)a);
    RenderUtils.drawRect(x, y, x1, y1);
    GlStateManager.enableTexture2D();
    GlStateManager.disableBlend();
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:10,代碼來源:RenderUtils.java

示例13: unsetBrightness

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
protected void unsetBrightness()
{
    GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
    GlStateManager.enableTexture2D();
    GlStateManager.glTexEnvi(8960, 8704, OpenGlHelper.GL_COMBINE);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_COMBINE_RGB, 8448);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE0_RGB, OpenGlHelper.defaultTexUnit);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE1_RGB, OpenGlHelper.GL_PRIMARY_COLOR);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND0_RGB, 768);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND1_RGB, 768);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_COMBINE_ALPHA, 8448);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE0_ALPHA, OpenGlHelper.defaultTexUnit);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE1_ALPHA, OpenGlHelper.GL_PRIMARY_COLOR);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND0_ALPHA, 770);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND1_ALPHA, 770);
    GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
    GlStateManager.glTexEnvi(8960, 8704, OpenGlHelper.GL_COMBINE);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_COMBINE_RGB, 8448);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND0_RGB, 768);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND1_RGB, 768);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE0_RGB, 5890);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE1_RGB, OpenGlHelper.GL_PREVIOUS);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_COMBINE_ALPHA, 8448);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND0_ALPHA, 770);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE0_ALPHA, 5890);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.setActiveTexture(OpenGlHelper.GL_TEXTURE2);
    GlStateManager.disableTexture2D();
    GlStateManager.bindTexture(0);
    GlStateManager.glTexEnvi(8960, 8704, OpenGlHelper.GL_COMBINE);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_COMBINE_RGB, 8448);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND0_RGB, 768);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND1_RGB, 768);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE0_RGB, 5890);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE1_RGB, OpenGlHelper.GL_PREVIOUS);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_COMBINE_ALPHA, 8448);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_OPERAND0_ALPHA, 770);
    GlStateManager.glTexEnvi(8960, OpenGlHelper.GL_SOURCE0_ALPHA, 5890);
    GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:41,代碼來源:RenderLivingBase.java

示例14: drawCursorVertical

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Draws the current selection and a vertical line cursor in the text box.
 */
private void drawCursorVertical(int startX, int startY, int endX, int endY)
{
	if(startX < endX)
	{
		int i = startX;
		startX = endX;
		endX = i;
	}
	
	if(startY < endY)
	{
		int j = startY;
		startY = endY;
		endY = j;
	}
	
	if(endX > xPosition + width)
		endX = xPosition + width;
	
	if(startX > xPosition + width)
		startX = xPosition + width;
	
	Tessellator tessellator = Tessellator.getInstance();
	BufferBuilder bufferbuilder = tessellator.getBuffer();
	GlStateManager.color(0.0F, 0.0F, 255.0F, 255.0F);
	GlStateManager.disableTexture2D();
	GlStateManager.enableColorLogic();
	GlStateManager.colorLogicOp(GlStateManager.LogicOp.OR_REVERSE);
	bufferbuilder.begin(7, DefaultVertexFormats.POSITION);
	bufferbuilder.pos(startX, endY, 0.0D).endVertex();
	bufferbuilder.pos(endX, endY, 0.0D).endVertex();
	bufferbuilder.pos(endX, startY, 0.0D).endVertex();
	bufferbuilder.pos(startX, startY, 0.0D).endVertex();
	tessellator.draw();
	GlStateManager.disableColorLogic();
	GlStateManager.enableTexture2D();
}
 
開發者ID:Wurst-Imperium,項目名稱:Wurst-MC-1.12-OF,代碼行數:41,代碼來源:PasswordField.java

示例15: doRender

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * 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(EntityTNTPrimed entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
    GlStateManager.pushMatrix();
    GlStateManager.translate((float)x, (float)y + 0.5F, (float)z);

    if ((float)entity.fuse - partialTicks + 1.0F < 10.0F)
    {
        float f = 1.0F - ((float)entity.fuse - partialTicks + 1.0F) / 10.0F;
        f = MathHelper.clamp_float(f, 0.0F, 1.0F);
        f = f * f;
        f = f * f;
        float f1 = 1.0F + f * 0.3F;
        GlStateManager.scale(f1, f1, f1);
    }

    float f2 = (1.0F - ((float)entity.fuse - partialTicks + 1.0F) / 100.0F) * 0.8F;
    this.bindEntityTexture(entity);
    GlStateManager.translate(-0.5F, -0.5F, 0.5F);
    blockrendererdispatcher.renderBlockBrightness(Blocks.tnt.getDefaultState(), entity.getBrightness(partialTicks));
    GlStateManager.translate(0.0F, 0.0F, 1.0F);

    if (entity.fuse / 5 % 2 == 0)
    {
        GlStateManager.disableTexture2D();
        GlStateManager.disableLighting();
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(770, 772);
        GlStateManager.color(1.0F, 1.0F, 1.0F, f2);
        GlStateManager.doPolygonOffset(-3.0F, -3.0F);
        GlStateManager.enablePolygonOffset();
        blockrendererdispatcher.renderBlockBrightness(Blocks.tnt.getDefaultState(), 1.0F);
        GlStateManager.doPolygonOffset(0.0F, 0.0F);
        GlStateManager.disablePolygonOffset();
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.disableBlend();
        GlStateManager.enableLighting();
        GlStateManager.enableTexture2D();
    }

    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:50,代碼來源:RenderTNTPrimed.java


注:本文中的net.minecraft.client.renderer.GlStateManager.disableTexture2D方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。