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


Java GlStateManager.disablePolygonOffset方法代码示例

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


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

示例1: postRenderDamagedBlocks

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void postRenderDamagedBlocks() {
    GlStateManager.disableAlpha();
    GlStateManager.doPolygonOffset(0.0F, 0.0F);
    GlStateManager.disablePolygonOffset();
    GlStateManager.enableAlpha();
    GlStateManager.depthMask(true);
    GlStateManager.popMatrix();
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:9,代码来源:ExtraBlockBreakHandler.java

示例2: doRender

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(AbstractClientPlayer entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    if (!entity.isUser() || this.renderManager.renderViewEntity == entity)
    {
        double d0 = y;

        if (entity.isSneaking() && !(entity instanceof EntityPlayerSP))
        {
            d0 = y - 0.125D;
        }

        this.setModelVisibilities(entity);
        
        GlStateManager.enableBlendProfile(GlStateManager.Profile.PLAYER_SKIN);
        if (Hacks.findMod(Chams.class).isEnabled()) {
        	GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL);
        	GlStateManager.enablePolygonOffset();
        	GlStateManager.doPolygonOffset(1.0F, -1000000);
        	super.doRender(entity, x, d0, z, entityYaw, partialTicks);
        	GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL);
        	GlStateManager.doPolygonOffset(1.0F, 1000000);
        	GlStateManager.disablePolygonOffset();
        }else{
        	super.doRender(entity, x, d0, z, entityYaw, partialTicks);
        }
        
        GlStateManager.disableBlendProfile(GlStateManager.Profile.PLAYER_SKIN);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:33,代码来源:RenderPlayer.java

示例3: doRender

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityChatBombPrimed 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.getFuse() - partialTicks + 1.0F < 10.0F)
    {
        float f = 1.0F - ((float)entity.getFuse() - partialTicks + 1.0F) / 10.0F;
        f = MathHelper.clamp(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.getFuse() - partialTicks + 1.0F) / 100.0F) * 0.8F;
    this.bindEntityTexture(entity);
    GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.translate(-0.5F, -0.5F, 0.5F);
    blockrendererdispatcher.renderBlockBrightness(ModBlocks.blockChatBomb.getDefaultState(), entity.getBrightness(partialTicks));
    GlStateManager.translate(0.0F, 0.0F, 1.0F);

    if (this.renderOutlines)
    {
        GlStateManager.enableColorMaterial();
        GlStateManager.enableOutlineMode(this.getTeamColor(entity));
        blockrendererdispatcher.renderBlockBrightness(ModBlocks.blockChatBomb.getDefaultState(), 1.0F);
        GlStateManager.disableOutlineMode();
        GlStateManager.disableColorMaterial();
    }
    else if (entity.getFuse() / 5 % 2 == 0)
    {
        GlStateManager.disableTexture2D();
        GlStateManager.disableLighting();
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.DST_ALPHA);
        GlStateManager.color(1.0F, 1.0F, 1.0F, f2);
        GlStateManager.doPolygonOffset(-3.0F, -3.0F);
        GlStateManager.enablePolygonOffset();
        blockrendererdispatcher.renderBlockBrightness(ModBlocks.blockChatBomb.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:MasterEric,项目名称:ChatBomb,代码行数:55,代码来源:RenderChatBombPrimed.java

示例4: onPostRenderLiving

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
@SubscribeEvent
public void onPostRenderLiving(RenderLivingEvent.Post event) {
    GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL);
    GlStateManager.doPolygonOffset(1.0F, 1000000);
    GlStateManager.disablePolygonOffset();
}
 
开发者ID:fr1kin,项目名称:ForgeHax,代码行数:7,代码来源:ChamsMod.java

示例5: 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

示例6: disablePolygonOffset

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void disablePolygonOffset() {
	GlStateManager.disablePolygonOffset();
}
 
开发者ID:Moudoux,项目名称:EMC,代码行数:4,代码来源:IGlStateManager.java

示例7: doRender

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * Renders the desired {@code T} type Entity.
 */
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.getFuse() - partialTicks + 1.0F < 10.0F)
    {
        float f = 1.0F - ((float)entity.getFuse() - partialTicks + 1.0F) / 10.0F;
        f = MathHelper.clamp(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.getFuse() - partialTicks + 1.0F) / 100.0F) * 0.8F;
    this.bindEntityTexture(entity);
    GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
    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 (this.renderOutlines)
    {
        GlStateManager.enableColorMaterial();
        GlStateManager.enableOutlineMode(this.getTeamColor(entity));
        blockrendererdispatcher.renderBlockBrightness(Blocks.TNT.getDefaultState(), 1.0F);
        GlStateManager.disableOutlineMode();
        GlStateManager.disableColorMaterial();
    }
    else if (entity.getFuse() / 5 % 2 == 0)
    {
        GlStateManager.disableTexture2D();
        GlStateManager.disableLighting();
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.DST_ALPHA);
        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:sudofox,项目名称:Backmemed,代码行数:56,代码来源:RenderTNTPrimed.java

示例8: doRender

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * Renders the desired {@code T} type Entity.
 */
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.getFuse() - partialTicks + 1.0F < 10.0F)
    {
        float f = 1.0F - ((float)entity.getFuse() - 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.getFuse() - partialTicks + 1.0F) / 100.0F) * 0.8F;
    this.bindEntityTexture(entity);
    GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
    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 (this.renderOutlines)
    {
        GlStateManager.enableColorMaterial();
        GlStateManager.enableOutlineMode(this.getTeamColor(entity));
        blockrendererdispatcher.renderBlockBrightness(Blocks.TNT.getDefaultState(), 1.0F);
        GlStateManager.disableOutlineMode();
        GlStateManager.disableColorMaterial();
    }
    else if (entity.getFuse() / 5 % 2 == 0)
    {
        GlStateManager.disableTexture2D();
        GlStateManager.disableLighting();
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.DST_ALPHA);
        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:F1r3w477,项目名称:CustomWorldGen,代码行数:56,代码来源:RenderTNTPrimed.java


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