当前位置: 首页>>代码示例>>Java>>正文


Java GlStateManager.matrixMode方法代码示例

本文整理汇总了Java中net.minecraft.client.renderer.GlStateManager.matrixMode方法的典型用法代码示例。如果您正苦于以下问题:Java GlStateManager.matrixMode方法的具体用法?Java GlStateManager.matrixMode怎么用?Java GlStateManager.matrixMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.renderer.GlStateManager的用法示例。


在下文中一共展示了GlStateManager.matrixMode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: apply2

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void apply2(IBakedModel model, int color) {
	GlStateManager.enableAlpha();
	GlStateManager.enableBlend();
	GlStateManager.depthMask(false);
	GlStateManager.depthFunc(514);
	GlStateManager.disableLighting();
	GlStateManager.blendFunc(SourceFactor.SRC_COLOR, DestFactor.ONE);
	Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("minecraft", "textures/misc/enchanted_item_glint.png"));
	GlStateManager.matrixMode(5890);
	GlStateManager.pushMatrix();
	GlStateManager.scale(8.0F, 8.0F, 8.0F);
	float f = Minecraft.getSystemTime() % 3000L / 3000.0F / 8.0F;
	GlStateManager.translate(f, 0.0F, 0.0F);
	GlStateManager.rotate(-50.0F, 0.0F, 0.0F, 1.0F);
	RenderModel.render(model, color);
	GlStateManager.popMatrix();
	GlStateManager.matrixMode(5888);
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
	GlStateManager.enableLighting();
	GlStateManager.depthFunc(515);
	GlStateManager.depthMask(true);
	Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
}
 
开发者ID:p455w0rd,项目名称:DankNull,代码行数:24,代码来源:GlintEffectRenderer.java

示例2: updateAchievementWindowScale

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void updateAchievementWindowScale()
{
    GlStateManager.viewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
    GlStateManager.matrixMode(5889);
    GlStateManager.loadIdentity();
    GlStateManager.matrixMode(5888);
    GlStateManager.loadIdentity();
    this.width = this.mc.displayWidth;
    this.height = this.mc.displayHeight;
    ScaledResolution scaledresolution = new ScaledResolution(this.mc);
    this.width = scaledresolution.getScaledWidth();
    this.height = scaledresolution.getScaledHeight();
    GlStateManager.clear(256);
    GlStateManager.matrixMode(5889);
    GlStateManager.loadIdentity();
    GlStateManager.ortho(0.0D, (double)this.width, (double)this.height, 0.0D, 1000.0D, 3000.0D);
    GlStateManager.matrixMode(5888);
    GlStateManager.loadIdentity();
    GlStateManager.translate(0.0F, 0.0F, -2000.0F);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:21,代码来源:GuiAchievement.java

示例3: setupOverlayRendering

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void setupOverlayRendering(double sw, double sh) {
    GlStateManager.clear(256);
    GlStateManager.matrixMode(GL11.GL_PROJECTION);
    GlStateManager.loadIdentity();
    GlStateManager.ortho(0.0D, sw, sh, 0.0D, 1000.0D, 3000.0D);
    GlStateManager.matrixMode(GL11.GL_MODELVIEW);
    GlStateManager.loadIdentity();
    GlStateManager.translate(0.0F, 0.0F, -2000.0F);
}
 
开发者ID:McJty,项目名称:MeeCreeps,代码行数:10,代码来源:BalloonRenderer.java

示例4: displayString

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void displayString(String message)
{
    this.currentlyDisplayedText = message;

    if (!this.mc.running)
    {
        if (!this.loadingSuccess)
        {
            throw new MinecraftError();
        }
    }
    else
    {
        GlStateManager.clear(256);
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();

        if (OpenGlHelper.isFramebufferEnabled())
        {
            int i = this.scaledResolution.getScaleFactor();
            GlStateManager.ortho(0.0D, (double)(this.scaledResolution.getScaledWidth() * i), (double)(this.scaledResolution.getScaledHeight() * i), 0.0D, 100.0D, 300.0D);
        }
        else
        {
            ScaledResolution scaledresolution = new ScaledResolution(this.mc);
            GlStateManager.ortho(0.0D, scaledresolution.getScaledWidth_double(), scaledresolution.getScaledHeight_double(), 0.0D, 100.0D, 300.0D);
        }

        GlStateManager.matrixMode(5888);
        GlStateManager.loadIdentity();
        GlStateManager.translate(0.0F, 0.0F, -200.0F);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:34,代码来源:LoadingScreenRenderer.java

示例5: renderEffect

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void renderEffect(IBakedModel model)
{
    if (!Config.isCustomItems() || CustomItems.isUseGlint())
    {
        GlStateManager.depthMask(false);
        GlStateManager.depthFunc(514);
        GlStateManager.disableLighting();
        GlStateManager.blendFunc(768, 1);
        this.textureManager.bindTexture(RES_ITEM_GLINT);
        GlStateManager.matrixMode(5890);
        GlStateManager.pushMatrix();
        GlStateManager.scale(8.0F, 8.0F, 8.0F);
        float f = (float)(Minecraft.getSystemTime() % 3000L) / 3000.0F / 8.0F;
        GlStateManager.translate(f, 0.0F, 0.0F);
        GlStateManager.rotate(-50.0F, 0.0F, 0.0F, 1.0F);
        this.renderModel(model, -8372020);
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        GlStateManager.scale(8.0F, 8.0F, 8.0F);
        float f1 = (float)(Minecraft.getSystemTime() % 4873L) / 4873.0F / 8.0F;
        GlStateManager.translate(-f1, 0.0F, 0.0F);
        GlStateManager.rotate(10.0F, 0.0F, 0.0F, 1.0F);
        this.renderModel(model, -8372020);
        GlStateManager.popMatrix();
        GlStateManager.matrixMode(5888);
        GlStateManager.blendFunc(770, 771);
        GlStateManager.enableLighting();
        GlStateManager.depthFunc(515);
        GlStateManager.depthMask(true);
        this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:33,代码来源:RenderItem.java

示例6: renderEnchantedGlint

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void renderEnchantedGlint(RenderLivingBase<?> p_188364_0_, EntityLivingBase p_188364_1_, ModelBase model, float p_188364_3_, float p_188364_4_, float p_188364_5_, float p_188364_6_, float p_188364_7_, float p_188364_8_, float p_188364_9_)
{
    float f = (float)p_188364_1_.ticksExisted + p_188364_5_;
    p_188364_0_.bindTexture(ENCHANTED_ITEM_GLINT_RES);
    GlStateManager.enableBlend();
    GlStateManager.depthFunc(514);
    GlStateManager.depthMask(false);
    float f1 = 0.5F;
    GlStateManager.color(0.5F, 0.5F, 0.5F, 1.0F);

    for (int i = 0; i < 2; ++i)
    {
        GlStateManager.disableLighting();
        GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_COLOR, GlStateManager.DestFactor.ONE);
        float f2 = 0.76F;
        GlStateManager.color(0.38F, 0.19F, 0.608F, 1.0F);
        GlStateManager.matrixMode(5890);
        GlStateManager.loadIdentity();
        float f3 = 0.33333334F;
        GlStateManager.scale(0.33333334F, 0.33333334F, 0.33333334F);
        GlStateManager.rotate(30.0F - (float)i * 60.0F, 0.0F, 0.0F, 1.0F);
        GlStateManager.translate(0.0F, f * (0.001F + (float)i * 0.003F) * 20.0F, 0.0F);
        GlStateManager.matrixMode(5888);
        model.render(p_188364_1_, p_188364_3_, p_188364_4_, p_188364_6_, p_188364_7_, p_188364_8_, p_188364_9_);
    }

    GlStateManager.matrixMode(5890);
    GlStateManager.loadIdentity();
    GlStateManager.matrixMode(5888);
    GlStateManager.enableLighting();
    GlStateManager.depthMask(true);
    GlStateManager.depthFunc(515);
    GlStateManager.disableBlend();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:35,代码来源:LayerArmorBase.java

示例7: doRenderLayer

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void doRenderLayer(EntityCreeper 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.getPowered())
    {
        boolean flag = entitylivingbaseIn.isInvisible();
        GlStateManager.depthMask(!flag);
        this.creeperRenderer.bindTexture(LIGHTNING_TEXTURE);
        GlStateManager.matrixMode(5890);
        GlStateManager.loadIdentity();
        float f = (float)entitylivingbaseIn.ticksExisted + partialTicks;
        GlStateManager.translate(f * 0.01F, f * 0.01F, 0.0F);
        GlStateManager.matrixMode(5888);
        GlStateManager.enableBlend();
        float f1 = 0.5F;
        GlStateManager.color(f1, f1, f1, 1.0F);
        GlStateManager.disableLighting();
        GlStateManager.blendFunc(1, 1);
        this.creeperModel.setModelAttributes(this.creeperRenderer.getMainModel());
        this.creeperModel.render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
        GlStateManager.matrixMode(5890);
        GlStateManager.loadIdentity();
        GlStateManager.matrixMode(5888);
        GlStateManager.enableLighting();
        GlStateManager.disableBlend();
        GlStateManager.depthMask(flag);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:28,代码来源:LayerCreeperCharge.java

示例8: func_177183_a

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void func_177183_a(EntityLivingBase entitylivingbaseIn, T modelbaseIn, float p_177183_3_, float p_177183_4_, float p_177183_5_, float p_177183_6_, float p_177183_7_, float p_177183_8_, float p_177183_9_)
{
    float f = (float)entitylivingbaseIn.ticksExisted + p_177183_5_;
    this.renderer.bindTexture(ENCHANTED_ITEM_GLINT_RES);
    GlStateManager.enableBlend();
    GlStateManager.depthFunc(514);
    GlStateManager.depthMask(false);
    float f1 = 0.5F;
    GlStateManager.color(f1, f1, f1, 1.0F);

    for (int i = 0; i < 2; ++i)
    {
        GlStateManager.disableLighting();
        GlStateManager.blendFunc(768, 1);
        float f2 = 0.76F;
        GlStateManager.color(0.5F * f2, 0.25F * f2, 0.8F * f2, 1.0F);
        GlStateManager.matrixMode(5890);
        GlStateManager.loadIdentity();
        float f3 = 0.33333334F;
        GlStateManager.scale(f3, f3, f3);
        GlStateManager.rotate(30.0F - (float)i * 60.0F, 0.0F, 0.0F, 1.0F);
        GlStateManager.translate(0.0F, f * (0.001F + (float)i * 0.003F) * 20.0F, 0.0F);
        GlStateManager.matrixMode(5888);
        modelbaseIn.render(entitylivingbaseIn, p_177183_3_, p_177183_4_, p_177183_6_, p_177183_7_, p_177183_8_, p_177183_9_);
    }

    GlStateManager.matrixMode(5890);
    GlStateManager.loadIdentity();
    GlStateManager.matrixMode(5888);
    GlStateManager.enableLighting();
    GlStateManager.depthMask(true);
    GlStateManager.depthFunc(515);
    GlStateManager.disableBlend();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:35,代码来源:LayerArmorBase.java

示例9: doRenderLayer

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void doRenderLayer(EntityWither 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.isArmored())
    {
        GlStateManager.depthMask(!entitylivingbaseIn.isInvisible());
        this.witherRenderer.bindTexture(WITHER_ARMOR);
        GlStateManager.matrixMode(5890);
        GlStateManager.loadIdentity();
        float f = (float)entitylivingbaseIn.ticksExisted + partialTicks;
        float f1 = MathHelper.cos(f * 0.02F) * 3.0F;
        float f2 = f * 0.01F;
        GlStateManager.translate(f1, f2, 0.0F);
        GlStateManager.matrixMode(5888);
        GlStateManager.enableBlend();
        float f3 = 0.5F;
        GlStateManager.color(f3, f3, f3, 1.0F);
        GlStateManager.disableLighting();
        GlStateManager.blendFunc(1, 1);
        this.witherModel.setLivingAnimations(entitylivingbaseIn, p_177141_2_, p_177141_3_, partialTicks);
        this.witherModel.setModelAttributes(this.witherRenderer.getMainModel());
        this.witherModel.render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
        GlStateManager.matrixMode(5890);
        GlStateManager.loadIdentity();
        GlStateManager.matrixMode(5888);
        GlStateManager.enableLighting();
        GlStateManager.disableBlend();
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:29,代码来源:LayerWitherAura.java

示例10: renderTileEntityAt

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
@Override
public void renderTileEntityAt(TileDankNullDock te, double x, double y, double z, float partialTicks, int destroyStage) {

	GlStateManager.enableDepth();
	GlStateManager.depthFunc(515);
	GlStateManager.depthMask(true);

	if (destroyStage >= 0) {
		bindTexture(DESTROY_STAGES[destroyStage]);
		GlStateManager.matrixMode(5890);
		GlStateManager.pushMatrix();
		GlStateManager.scale(4.0F, 4.0F, 1.0F);
		GlStateManager.translate(0.0625F, 0.0625F, 0.0625F);
		GlStateManager.matrixMode(5888);
	}
	else {
		GuiUtils.bindTexture(DankTextures.DOCK_TEXTURE);
	}
	GlStateManager.pushMatrix();
	GlStateManager.enableRescaleNormal();
	GlStateManager.translate((float) x, (float) y + 1.0F, (float) z + 1.0F);
	GlStateManager.scale(1.0F, -1.0F, -1.0F);

	GlStateManager.translate(0.5F, -0.5F, 0.5F);

	if (destroyStage < 0) {
		GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
	}

	MODEL.render(0.0625F);

	GlStateManager.translate(-0.5F, 0.5F, -0.5F);

	GlStateManager.disableRescaleNormal();
	GlStateManager.popMatrix();
	GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

	if (destroyStage >= 0) {
		GlStateManager.matrixMode(5890);
		GlStateManager.popMatrix();
		GlStateManager.matrixMode(5888);
	}

	ItemStack stack = te.getStack();
	if (!stack.isEmpty()) {
		GlStateManager.pushMatrix();
		GlStateManager.translate(x + 0.5, y + 0.45, z + 0.5);
		GlStateManager.scale(0.55D, 0.55D, 0.55D);
		//DankNullRenderer.getInstance().renderItem(stack);
		Minecraft.getMinecraft().getItemRenderer().renderItem(EasyMappings.player(), stack, ItemCameraTransforms.TransformType.NONE);
		GlStateManager.translate(-x, -y, -z);
		GlStateManager.popMatrix();
	}
}
 
开发者ID:p455w0rd,项目名称:DankNull,代码行数:55,代码来源:TESRDankNullDock.java

示例11: framebufferRenderExt

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void framebufferRenderExt(int width, int height, boolean p_178038_3_)
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        GlStateManager.colorMask(true, true, true, false);
        GlStateManager.disableDepth();
        GlStateManager.depthMask(false);
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        GlStateManager.ortho(0.0D, (double)width, (double)height, 0.0D, 1000.0D, 3000.0D);
        GlStateManager.matrixMode(5888);
        GlStateManager.loadIdentity();
        GlStateManager.translate(0.0F, 0.0F, -2000.0F);
        GlStateManager.viewport(0, 0, width, height);
        GlStateManager.enableTexture2D();
        GlStateManager.disableLighting();
        GlStateManager.disableAlpha();

        if (p_178038_3_)
        {
            GlStateManager.disableBlend();
            GlStateManager.enableColorMaterial();
        }

        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.bindFramebufferTexture();
        float f = (float)width;
        float f1 = (float)height;
        float f2 = (float)this.framebufferWidth / (float)this.framebufferTextureWidth;
        float f3 = (float)this.framebufferHeight / (float)this.framebufferTextureHeight;
        Tessellator tessellator = Tessellator.getInstance();
        VertexBuffer vertexbuffer = tessellator.getBuffer();
        vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
        vertexbuffer.pos(0.0D, (double)f1, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
        vertexbuffer.pos((double)f, (double)f1, 0.0D).tex((double)f2, 0.0D).color(255, 255, 255, 255).endVertex();
        vertexbuffer.pos((double)f, 0.0D, 0.0D).tex((double)f2, (double)f3).color(255, 255, 255, 255).endVertex();
        vertexbuffer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, (double)f3).color(255, 255, 255, 255).endVertex();
        tessellator.draw();
        this.unbindFramebufferTexture();
        GlStateManager.depthMask(true);
        GlStateManager.colorMask(true, true, true, true);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:44,代码来源:Framebuffer.java

示例12: framebufferRenderExt

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void framebufferRenderExt(int p_178038_1_, int p_178038_2_, boolean p_178038_3_)
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        GlStateManager.colorMask(true, true, true, false);
        GlStateManager.disableDepth();
        GlStateManager.depthMask(false);
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        GlStateManager.ortho(0.0D, (double)p_178038_1_, (double)p_178038_2_, 0.0D, 1000.0D, 3000.0D);
        GlStateManager.matrixMode(5888);
        GlStateManager.loadIdentity();
        GlStateManager.translate(0.0F, 0.0F, -2000.0F);
        GlStateManager.viewport(0, 0, p_178038_1_, p_178038_2_);
        GlStateManager.enableTexture2D();
        GlStateManager.disableLighting();
        GlStateManager.disableAlpha();

        if (p_178038_3_)
        {
            GlStateManager.disableBlend();
            GlStateManager.enableColorMaterial();
        }

        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.bindFramebufferTexture();
        float f = (float)p_178038_1_;
        float f1 = (float)p_178038_2_;
        float f2 = (float)this.framebufferWidth / (float)this.framebufferTextureWidth;
        float f3 = (float)this.framebufferHeight / (float)this.framebufferTextureHeight;
        Tessellator tessellator = Tessellator.getInstance();
        WorldRenderer worldrenderer = tessellator.getWorldRenderer();
        worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
        worldrenderer.pos(0.0D, (double)f1, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
        worldrenderer.pos((double)f, (double)f1, 0.0D).tex((double)f2, 0.0D).color(255, 255, 255, 255).endVertex();
        worldrenderer.pos((double)f, 0.0D, 0.0D).tex((double)f2, (double)f3).color(255, 255, 255, 255).endVertex();
        worldrenderer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, (double)f3).color(255, 255, 255, 255).endVertex();
        tessellator.draw();
        this.unbindFramebufferTexture();
        GlStateManager.depthMask(true);
        GlStateManager.colorMask(true, true, true, true);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:44,代码来源:Framebuffer.java

示例13: renderEnchantedGlint

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void renderEnchantedGlint(RenderLivingBase<?> p_188364_0_, EntityLivingBase p_188364_1_, ModelBase model, float p_188364_3_, float p_188364_4_, float p_188364_5_, float p_188364_6_, float p_188364_7_, float p_188364_8_, float p_188364_9_)
{
    if (!Config.isShaders() || !Shaders.isShadowPass)
    {
        float f = (float)p_188364_1_.ticksExisted + p_188364_5_;
        p_188364_0_.bindTexture(ENCHANTED_ITEM_GLINT_RES);

        if (Config.isShaders())
        {
            ShadersRender.renderEnchantedGlintBegin();
        }

        Minecraft.getMinecraft().entityRenderer.func_191514_d(true);
        GlStateManager.enableBlend();
        GlStateManager.depthFunc(514);
        GlStateManager.depthMask(false);
        float f1 = 0.5F;
        GlStateManager.color(0.5F, 0.5F, 0.5F, 1.0F);

        for (int i = 0; i < 2; ++i)
        {
            GlStateManager.disableLighting();
            GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_COLOR, GlStateManager.DestFactor.ONE);
            float f2 = 0.76F;
            GlStateManager.color(0.38F, 0.19F, 0.608F, 1.0F);
            GlStateManager.matrixMode(5890);
            GlStateManager.loadIdentity();
            float f3 = 0.33333334F;
            GlStateManager.scale(0.33333334F, 0.33333334F, 0.33333334F);
            GlStateManager.rotate(30.0F - (float)i * 60.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.translate(0.0F, f * (0.001F + (float)i * 0.003F) * 20.0F, 0.0F);
            GlStateManager.matrixMode(5888);
            model.render(p_188364_1_, p_188364_3_, p_188364_4_, p_188364_6_, p_188364_7_, p_188364_8_, p_188364_9_);
            GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
        }

        GlStateManager.matrixMode(5890);
        GlStateManager.loadIdentity();
        GlStateManager.matrixMode(5888);
        GlStateManager.enableLighting();
        GlStateManager.depthMask(true);
        GlStateManager.depthFunc(515);
        GlStateManager.disableBlend();
        Minecraft.getMinecraft().entityRenderer.func_191514_d(false);

        if (Config.isShaders())
        {
            ShadersRender.renderEnchantedGlintEnd();
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:52,代码来源:LayerArmorBase.java

示例14: render

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
@Override
public void render(TileEntityPrimalChestAdvanced te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
    if(te == null || te.isInvalid()) {
        return;
    }
    
    EnumFacing facing = te.getFacing();
    
    if(destroyStage >= 0) {
        this.bindTexture(DESTROY_STAGES[destroyStage]);
        GlStateManager.matrixMode(5890);
        GlStateManager.pushMatrix();
        GlStateManager.scale(4F, 4F, 1F);
        GlStateManager.translate(0.0625F, 0.0625F, 0.0625F);
        GlStateManager.matrixMode(5888);
    } else {
        this.bindTexture(new ResourceLocation(Reference.MOD_ID, "textures/models/primal_chest_advanced.png"));
    }
    
    GlStateManager.pushMatrix();
    
    
    GlStateManager.color(1F, 1F, 1F, 1F);
    GlStateManager.translate((float) x, (float) y + 1F, (float) z + 1F);
    GlStateManager.scale(1F, -1F, -1F);
    GlStateManager.translate(0.5F, 0.5F, 0.5F);
    
    switch(facing) {
        case NORTH: {
            GlStateManager.rotate(180F, 0F, 1F, 0F);
            break;
        }
        case SOUTH: {
            GlStateManager.rotate(0F, 0F, 1F, 0F);
            break;
        }
        case WEST: {
            GlStateManager.rotate(90F, 0F, 1F, 0F);
            break;
        }
        case EAST: {
            GlStateManager.rotate(270F, 0F, 1F, 0F);
            break;
        }
        default: {
            GlStateManager.rotate(0F, 0F, 1F, 0F);
            break;
        }
    }
    
    GlStateManager.translate(-0.5F, -0.5F, -0.5F);
    
    float lidangle = 0;//te.prevLidAngle + (te.lidAngle - te.prevLidAngle) * partialTicks;
    
    lidangle = 1F - lidangle;
    lidangle = 1F - lidangle * lidangle * lidangle;
    
    
    this.model.chestLid.rotateAngleX = -lidangle * halfPI;
    // Render the chest itself
    this.model.renderAll();
    
    if(destroyStage >= 0) {
        GlStateManager.matrixMode(5890);
        GlStateManager.popMatrix();
        GlStateManager.matrixMode(5888);
    }
    
    GlStateManager.popMatrix();
    GlStateManager.color(1F, 1F, 1F, 1F);
    
}
 
开发者ID:jaredlll08,项目名称:PrimalChests,代码行数:73,代码来源:RenderTileEntityPrimalChestAdvanced.java

示例15: drawSplashScreen

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void drawSplashScreen(TextureManager textureManagerInstance) throws LWJGLException
{
    ScaledResolution scaledresolution = new ScaledResolution(this);
    int i = scaledresolution.getScaleFactor();
    Framebuffer framebuffer = new Framebuffer(scaledresolution.getScaledWidth() * i, scaledresolution.getScaledHeight() * i, true);
    framebuffer.bindFramebuffer(false);
    GlStateManager.matrixMode(5889);
    GlStateManager.loadIdentity();
    GlStateManager.ortho(0.0D, (double)scaledresolution.getScaledWidth(), (double)scaledresolution.getScaledHeight(), 0.0D, 1000.0D, 3000.0D);
    GlStateManager.matrixMode(5888);
    GlStateManager.loadIdentity();
    GlStateManager.translate(0.0F, 0.0F, -2000.0F);
    GlStateManager.disableLighting();
    GlStateManager.disableFog();
    GlStateManager.disableDepth();
    GlStateManager.enableTexture2D();
    InputStream inputstream = null;

    try
    {
        inputstream = this.mcDefaultResourcePack.getInputStream(LOCATION_MOJANG_PNG);
        this.mojangLogo = textureManagerInstance.getDynamicTextureLocation("logo", new DynamicTexture(ImageIO.read(inputstream)));
        textureManagerInstance.bindTexture(this.mojangLogo);
    }
    catch (IOException ioexception)
    {
        LOGGER.error("Unable to load logo: {}", new Object[] {LOCATION_MOJANG_PNG, ioexception});
    }
    finally
    {
        IOUtils.closeQuietly(inputstream);
    }

    Tessellator tessellator = Tessellator.getInstance();
    VertexBuffer vertexbuffer = tessellator.getBuffer();
    vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
    vertexbuffer.pos(0.0D, (double)this.displayHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
    vertexbuffer.pos((double)this.displayWidth, (double)this.displayHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
    vertexbuffer.pos((double)this.displayWidth, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
    vertexbuffer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
    tessellator.draw();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    int j = 256;
    int k = 256;
    this.draw((scaledresolution.getScaledWidth() - 256) / 2, (scaledresolution.getScaledHeight() - 256) / 2, 0, 0, 256, 256, 255, 255, 255, 255);
    GlStateManager.disableLighting();
    GlStateManager.disableFog();
    framebuffer.unbindFramebuffer();
    framebuffer.framebufferRender(scaledresolution.getScaledWidth() * i, scaledresolution.getScaledHeight() * i);
    GlStateManager.enableAlpha();
    GlStateManager.alphaFunc(516, 0.1F);
    this.updateDisplay();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:54,代码来源:Minecraft.java


注:本文中的net.minecraft.client.renderer.GlStateManager.matrixMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。