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


Java GL11.glPolygonOffset方法代码示例

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


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

示例1: doPolygonOffset

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void doPolygonOffset(float factor, float units)
{
    if (factor != polygonOffsetState.field_179043_c || units != polygonOffsetState.field_179041_d)
    {
        polygonOffsetState.field_179043_c = factor;
        polygonOffsetState.field_179041_d = units;
        GL11.glPolygonOffset(factor, units);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:10,代码来源:GlStateManager.java

示例2: renderFour

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void renderFour(final Entity ent) {
    if (!checkValidity((EntityLivingBase)ent)) {
        return;
    }
    GL11.glEnable(10754);
    GL11.glPolygonOffset(1.0f, -2000000.0f);
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0f, 240.0f);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:9,代码来源:ESP.java

示例3: renderFive

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void renderFive(final Entity ent) {
    if (!checkValidity((EntityLivingBase)ent)) {
        return;
    }
    GL11.glPolygonOffset(1.0f, 2000000.0f);
    GL11.glDisable(10754);
    GL11.glDisable(2960);
    GL11.glDisable(2848);
    GL11.glHint(3154, 4352);
    GL11.glDisable(3042);
    GL11.glEnable(2896);
    GL11.glEnable(3553);
    GL11.glEnable(3008);
    GL11.glPopAttrib();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:16,代码来源:ESP.java

示例4: doPolygonOffset

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void doPolygonOffset(float factor, float units)
{
    if (factor != polygonOffsetState.factor || units != polygonOffsetState.units)
    {
        polygonOffsetState.factor = factor;
        polygonOffsetState.units = units;
        GL11.glPolygonOffset(factor, units);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:10,代码来源:GlStateManager.java

示例5: drawBlockBreaking

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void drawBlockBreaking(EntityPlayer entityplayer, MovingObjectPosition movingobjectposition, int i, ItemStack itemstack, float f)
{
    Tessellator tessellator = Tessellator.instance;
    GL11.glEnable(3042 /*GL_BLEND*/);
    GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
    GL11.glBlendFunc(770, 1);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, (MathHelper.sin((float)System.currentTimeMillis() / 100F) * 0.2F + 0.4F) * 0.5F);
    if(i == 0)
    {
        if(damagePartialTime > 0.0F)
        {
            GL11.glBlendFunc(774, 768);
            int j = renderEngine.getTexture("/terrain.png");
            GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, j);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F);
            GL11.glPushMatrix();
            int k = worldObj.getBlockId(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ);
            Block block = k <= 0 ? null : Block.blocksList[k];
            GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
            GL11.glPolygonOffset(-3F, -3F);
            GL11.glEnable(32823 /*GL_POLYGON_OFFSET_FILL*/);
            double d = entityplayer.lastTickPosX + (entityplayer.posX - entityplayer.lastTickPosX) * (double)f;
            double d1 = entityplayer.lastTickPosY + (entityplayer.posY - entityplayer.lastTickPosY) * (double)f;
            double d2 = entityplayer.lastTickPosZ + (entityplayer.posZ - entityplayer.lastTickPosZ) * (double)f;
            if(block == null)
            {
                block = Block.stone;
            }
            GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
            tessellator.startDrawingQuads();
            tessellator.setTranslationD(-d, -d1, -d2);
            tessellator.disableColor();
            globalRenderBlocks.renderBlockUsingTexture(block, movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ, 240 + (int)(damagePartialTime * 10F));
            tessellator.draw();
            tessellator.setTranslationD(0.0D, 0.0D, 0.0D);
            GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
            GL11.glPolygonOffset(0.0F, 0.0F);
            GL11.glDisable(32823 /*GL_POLYGON_OFFSET_FILL*/);
            GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
            GL11.glDepthMask(true);
            GL11.glPopMatrix();
        }
    } else
    if(itemstack != null)
    {
        GL11.glBlendFunc(770, 771);
        float f1 = MathHelper.sin((float)System.currentTimeMillis() / 100F) * 0.2F + 0.8F;
        GL11.glColor4f(f1, f1, f1, MathHelper.sin((float)System.currentTimeMillis() / 200F) * 0.2F + 0.5F);
        int l = renderEngine.getTexture("/terrain.png");
        GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, l);
        int i1 = movingobjectposition.blockX;
        int j1 = movingobjectposition.blockY;
        int k1 = movingobjectposition.blockZ;
        if(movingobjectposition.sideHit == 0)
        {
            j1--;
        }
        if(movingobjectposition.sideHit == 1)
        {
            j1++;
        }
        if(movingobjectposition.sideHit == 2)
        {
            k1--;
        }
        if(movingobjectposition.sideHit == 3)
        {
            k1++;
        }
        if(movingobjectposition.sideHit == 4)
        {
            i1--;
        }
        if(movingobjectposition.sideHit == 5)
        {
            i1++;
        }
    }
    GL11.glDisable(3042 /*GL_BLEND*/);
    GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
}
 
开发者ID:jd-lang,项目名称:betaexpansion,代码行数:82,代码来源:RenderGlobal.java


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