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


Java GL11.glDisable方法代码示例

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


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

示例1: renderPumpkinBlur

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private void renderPumpkinBlur(int i, int j)
{
    GL11.glDisable(2929 /*GL_DEPTH_TEST*/);
    GL11.glDepthMask(false);
    GL11.glBlendFunc(770, 771);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
    GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("%blur%/misc/pumpkinblur.png"));
    Tessellator tessellator = Tessellator.instance;
    tessellator.startDrawingQuads();
    tessellator.addVertexWithUV(0.0D, j, -90D, 0.0D, 1.0D);
    tessellator.addVertexWithUV(i, j, -90D, 1.0D, 1.0D);
    tessellator.addVertexWithUV(i, 0.0D, -90D, 1.0D, 0.0D);
    tessellator.addVertexWithUV(0.0D, 0.0D, -90D, 0.0D, 0.0D);
    tessellator.draw();
    GL11.glDepthMask(true);
    GL11.glEnable(2929 /*GL_DEPTH_TEST*/);
    GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
 
开发者ID:jd-lang,项目名称:betaexpansion,代码行数:21,代码来源:GuiIngame.java

示例2: drawLine

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
protected void drawLine(Vec3d p1, Vec3d p2, int colour, float alpha, float width)
{
	GL11.glPushMatrix();
	GL11.glEnable(GL11.GL_BLEND);
	GL11.glDisable(GL11.GL_DEPTH_TEST);
	float[] rgb = MathHelper.intToRGB(colour);
	GL11.glColor4f(rgb[0], rgb[1], rgb[2], alpha);
	GL11.glLineWidth(width);
	GL11.glDisable(GL11.GL_TEXTURE_2D);
	GL11.glBegin(GL11.GL_LINE_LOOP);
	GL11.glVertex3d(p1.x,p1.y,p1.z);
	GL11.glVertex3d(p2.x,p2.y,p2.z);
	GL11.glEnd();
	GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
	GL11.glEnable(GL11.GL_DEPTH_TEST);
	GL11.glEnable(GL11.GL_TEXTURE_2D);
	GL11.glDisable(GL11.GL_BLEND);
	GL11.glPopMatrix();
}
 
开发者ID:ObsidianSuite,项目名称:ObsidianSuite,代码行数:20,代码来源:GuiEntityRenderer.java

示例3: drawGradientRect

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void drawGradientRect(double x, double y, double x2, double y2, int col1, int col2) {
    GL11.glEnable((int)3042);
    GL11.glDisable((int)3553);
    GL11.glBlendFunc((int)770, (int)771);
    GL11.glEnable((int)2848);
    GL11.glShadeModel((int)7425);
    GL11.glPushMatrix();
    GL11.glBegin((int)7);
    RenderUtils.glColor(col1);
    GL11.glVertex2d((double)x2, (double)y);
    GL11.glVertex2d((double)x, (double)y);
    RenderUtils.glColor(col2);
    GL11.glVertex2d((double)x, (double)y2);
    GL11.glVertex2d((double)x2, (double)y2);
    GL11.glEnd();
    GL11.glPopMatrix();
    GL11.glEnable((int)3553);
    GL11.glDisable((int)3042);
    GL11.glDisable((int)2848);
    GL11.glShadeModel((int)7424);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:22,代码来源:RenderUtils.java

示例4: drawChestESP

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void drawChestESP(double d, double d1, double d2, double r, double b, double g, double length, double length2)
{
	GL11.glPushMatrix();
	GL11.glEnable(3042);
	GL11.glBlendFunc(770, 771);
	GL11.glLineWidth(1.5F);
	GL11.glDisable(GL11.GL_LIGHTING);
	GL11.glDisable(GL11.GL_TEXTURE_2D);
	GL11.glLineWidth(1.0F);
	GL11.glEnable(GL11.GL_LINE_SMOOTH);
	GL11.glDisable(2929);
	GL11.glDepthMask(false);
	GL11.glColor4d(r, g, b, 0.15);
	drawColorBox(new AxisAlignedBB(d, d1, d2, d + length2, d1 + 1.0, d2 + length), 0F, 0F, 0F, 0F);
	GL11.glColor4d(0, 0, 0, 0.5);
	drawSelectionBoundingBox(new AxisAlignedBB(d, d1, d2, d + length2, d1 + 1.0, d2 + length));
	GL11.glLineWidth(2.0F);
	GL11.glDisable(GL11.GL_LINE_SMOOTH);
	GL11.glEnable(GL11.GL_TEXTURE_2D);
	GL11.glEnable(GL11.GL_LIGHTING);
	GL11.glEnable(2929);
	GL11.glDepthMask(true);
	GL11.glDisable(3042);
	GL11.glPopMatrix();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:26,代码来源:RenderUtils.java

示例5: frame

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void frame(double x, double y, double z, double x2, double y2, double z2, Color color) {
	x -= Minecraft.getMinecraft().getRenderManager().renderPosX;
	y -= Minecraft.getMinecraft().getRenderManager().renderPosY;
	z -= Minecraft.getMinecraft().getRenderManager().renderPosZ;
	x2 -= Minecraft.getMinecraft().getRenderManager().renderPosX;
	y2 -= Minecraft.getMinecraft().getRenderManager().renderPosY;
	z2 -= Minecraft.getMinecraft().getRenderManager().renderPosZ;
	GL11.glBlendFunc(770, 771);
	GL11.glEnable(3042);
	GL11.glLineWidth(2.0F);
	GL11.glDisable(3553);
	GL11.glDisable(2929);
	GL11.glDepthMask(false);
	glColor(color);
	drawSelectionBoundingBox(new AxisAlignedBB(x, y, z, x2, y2, z2));
	GL11.glEnable(3553);
	GL11.glEnable(2929);
	GL11.glDepthMask(true);
	GL11.glDisable(3042);
}
 
开发者ID:Moudoux,项目名称:EMC,代码行数:21,代码来源:RenderUtils.java

示例6: initGL

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
 * Initialise the GL context
 */
protected void initGL() {
	GL11.glEnable(GL11.GL_TEXTURE_2D);
	GL11.glShadeModel(GL11.GL_SMOOTH);        
	GL11.glDisable(GL11.GL_DEPTH_TEST);
	GL11.glDisable(GL11.GL_LIGHTING);                    
       
	GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);                
       GL11.glClearDepth(1);                                       
       
       GL11.glEnable(GL11.GL_BLEND);
       GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
       
       GL11.glViewport(0,0,screenWidth,screenHeight);
	GL11.glMatrixMode(GL11.GL_MODELVIEW);               
	GL11.glLoadIdentity();
	
	enterOrtho();
}
 
开发者ID:IngSW-unipv,项目名称:Progetto-C,代码行数:22,代码来源:FBOGraphics.java

示例7: glDisableWrapper

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void glDisableWrapper(int cap)
{
    GL11.glDisable(cap);

    if (cap == 3553)
    {
        disableTexture2D();
    }
    else if (cap == 2912)
    {
        disableFog();
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:14,代码来源:Shaders.java

示例8: drawIcon

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private void drawIcon(int x, int y, boolean selected) {
    Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("sdk/plugin.png"));
    GL11.glEnable(3042);
    if (selected) {
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    } else {
        GL11.glColor4f(0.9F, 0.9F, 0.9F, 1.0F);
    }

    Gui.drawModalRectWithCustomSizedTexture(x, y, 24, 24, 24, 24, 24, 24);
    Gui.drawModalRectWithCustomSizedTexture(x, y, 120, 24, 24, 24, 24, 24);
    GL11.glDisable(3042);
}
 
开发者ID:WurstSDK-Team,项目名称:WurstSDK,代码行数:14,代码来源:GuiPluginList.java

示例9: drawScreen

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
	// middle
	int middleX = width / 2;
	int middleY = height / 2;
	
	// background positions
	int x1 = middleX - 100;
	int y1 = middleY + 15;
	int x2 = middleX + 100;
	int y2 = middleY + 26;
	
	// background
	GL11.glDisable(GL11.GL_TEXTURE_2D);
	GL11.glDisable(GL11.GL_CULL_FACE);
	GL11.glColor4f(0, 0, 0, 0.5F);
	GL11.glBegin(GL11.GL_QUADS);
	{
		GL11.glVertex2d(x1, y1);
		GL11.glVertex2d(x2, y1);
		GL11.glVertex2d(x2, y2);
		GL11.glVertex2d(x1, y2);
	}
	GL11.glEnd();
	GL11.glColor4f(1, 1, 1, 1);
	GL11.glEnable(GL11.GL_TEXTURE_2D);
	GL11.glEnable(GL11.GL_CULL_FACE);
	
	// name field
	nameField.drawTextBox();
	
	// buttons
	super.drawScreen(mouseX, mouseY, partialTicks);
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:36,代码来源:TemplateToolMod.java

示例10: drawBorderedRect

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void drawBorderedRect(double x, double y, double x2, double y2, float l1, int col1, int col2) {
       drawRect((float)x, (float)y, (float)x2, (float)y2, col2);

       float f = (float)(col1 >> 24 & 0xFF) / 255F;
       float f1 = (float)(col1 >> 16 & 0xFF) / 255F;
       float f2 = (float)(col1 >> 8 & 0xFF) / 255F;
       float f3 = (float)(col1 & 0xFF) / 255F;
       GL11.glPushMatrix();
       GL11.glEnable(GL11.GL_BLEND);
       GL11.glDisable(GL11.GL_TEXTURE_2D);
       GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
       GL11.glEnable(GL11.GL_LINE_SMOOTH);

       GL11.glColor4f(f1, f2, f3, f);
       GL11.glLineWidth(l1);
       GL11.glBegin(GL11.GL_LINES);
       GL11.glVertex2d(x, y);
       GL11.glVertex2d(x, y2);
       GL11.glVertex2d(x2, y2);
       GL11.glVertex2d(x2, y);
       GL11.glVertex2d(x, y);
       GL11.glVertex2d(x2, y);
       GL11.glVertex2d(x, y2);
       GL11.glVertex2d(x2, y2);
       GL11.glEnd();

       GL11.glEnable(GL11.GL_TEXTURE_2D);
       GL11.glDisable(GL11.GL_BLEND);
       GL11.glDisable(GL11.GL_LINE_SMOOTH);
       GL11.glPopMatrix();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:32,代码来源:RenderUtils.java

示例11: enableDefaults

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void enableDefaults() {
	GL11.glDisable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_LINE_SMOOTH);
	GL11.glBlendFunc(770, 771);
	GL11.glEnable(3042);
	GL11.glDisable(3553);
	GL11.glDisable(2929);
	GL11.glEnable(GL13.GL_MULTISAMPLE);
	GL11.glDepthMask(false);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:11,代码来源:Trajectories.java

示例12: disableLighting

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void disableLighting() {
    OpenGlHelper.setActiveTexture((int)OpenGlHelper.lightmapTexUnit);
    GL11.glDisable((int)3553);
    OpenGlHelper.setActiveTexture((int)OpenGlHelper.defaultTexUnit);
    GL11.glEnable((int)3042);
    GL11.glBlendFunc((int)770, (int)771);
    GL11.glEnable((int)2848);
    GL11.glDisable((int)2896);
    GL11.glDisable((int)3553);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:11,代码来源:RenderUtils.java

示例13: doRender

import org.lwjgl.opengl.GL11; //导入方法依赖的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 doesn't do that.
 */
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
    Icon icon = this.field_94151_a.getIconFromDamage(this.field_94150_f);

    if (icon != null)
    {
        GL11.glPushMatrix();
        GL11.glTranslatef((float)par2, (float)par4, (float)par6);
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glScalef(0.5F, 0.5F, 0.5F);
        this.bindEntityTexture(par1Entity);
        Tessellator tessellator = Tessellator.instance;

        if (icon == ItemPotion.func_94589_d("bottle_splash"))
        {
            int i = PotionHelper.func_77915_a(((EntityPotion)par1Entity).getPotionDamage(), false);
            float f2 = (float)(i >> 16 & 255) / 255.0F;
            float f3 = (float)(i >> 8 & 255) / 255.0F;
            float f4 = (float)(i & 255) / 255.0F;
            GL11.glColor3f(f2, f3, f4);
            GL11.glPushMatrix();
            this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
            GL11.glPopMatrix();
            GL11.glColor3f(1.0F, 1.0F, 1.0F);
        }

        this.func_77026_a(tessellator, icon);
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        GL11.glPopMatrix();
    }
}
 
开发者ID:marcus8448,项目名称:IceMod,代码行数:38,代码来源:RenderHunkOIce.java

示例14: renderPreview

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private void renderPreview() {
    if (!hasTicked) {
        TileEntityPneumaticBase tile = (TileEntityPneumaticBase) getTube();
        NetworkHandler.sendToServer(new PacketDescriptionPacketRequest(tile.getPos()));
        TileEntity neighbor = tile.getWorld().getTileEntity(tile.getPos().offset(dir));
        inLine = neighbor instanceof IPneumaticMachine;
        if (inLine) {
            IAirHandler neighborHandler = ((IPneumaticMachine) neighbor).getAirHandler(dir);
            inverted = neighborHandler != null && neighborHandler.getPressure() > tile.getAirHandler(null).getPressure();
            NetworkHandler.sendToServer(new PacketDescriptionPacketRequest(neighbor.getPos()));
        }
        hasTicked = true;
    }

    GL11.glEnable(GL11.GL_BLEND);
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    if (inLine && !inverted) {
        GL11.glColor4d(0, 1, 0, 0.3);
    } else {
        GL11.glColor4d(1, 0, 0, 0.3);
    }
    GL11.glPushMatrix();
    GL11.glTranslated(0, 1, 0.2 + ClientTickHandler.TICKS % 20 * 0.015);
    GL11.glRotated(90, 1, 0, 0);

    RenderUtils.render3DArrow();
    GL11.glColor4d(1, 1, 1, 0.5);  // 0.5 because we're rendering a preview
    GL11.glPopMatrix();
    GL11.glDisable(GL11.GL_BLEND);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:32,代码来源:ModuleRegulatorTube.java

示例15: renderClouds

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void renderClouds(float f)
{
    if(mc.theWorld.worldProvider.isNether)
    {
        return;
    }
    if(mc.gameSettings.g_Clouds == 3)
    {
    	return;
    }
    if(mc.gameSettings.g_Clouds == 2 || (mc.gameSettings.fancyGraphics && mc.gameSettings.g_Clouds != 1))
    {
        renderCloudsFancy(f);
        return;
    }
    GL11.glDisable(2884 /*GL_CULL_FACE*/);
    float f1 = (float)(mc.renderViewEntity.lastTickPosY + (mc.renderViewEntity.posY - mc.renderViewEntity.lastTickPosY) * (double)f);
    byte byte0 = 32;
    int i = 256 / byte0;
    Tessellator tessellator = Tessellator.instance;
    GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, renderEngine.getTexture("/environment/clouds.png"));
    GL11.glEnable(3042 /*GL_BLEND*/);
    GL11.glBlendFunc(770, 771);
    Vec3D vec3d = worldObj.func_628_d(f);
    float f2 = (float)vec3d.xCoord;
    float f3 = (float)vec3d.yCoord;
    float f4 = (float)vec3d.zCoord;
    if(mc.gameSettings.anaglyph)
    {
        float f5 = (f2 * 30F + f3 * 59F + f4 * 11F) / 100F;
        float f7 = (f2 * 30F + f3 * 70F) / 100F;
        float f8 = (f2 * 30F + f4 * 70F) / 100F;
        f2 = f5;
        f3 = f7;
        f4 = f8;
    }
    float f6 = 0.0004882813F;
    double d = mc.renderViewEntity.prevPosX + (mc.renderViewEntity.posX - mc.renderViewEntity.prevPosX) * (double)f + (double)(((float)cloudOffsetX + f) * 0.03F);
    double d1 = mc.renderViewEntity.prevPosZ + (mc.renderViewEntity.posZ - mc.renderViewEntity.prevPosZ) * (double)f;
    int j = MathHelper.floor_double(d / 2048D);
    int k = MathHelper.floor_double(d1 / 2048D);
    d -= j * 2048 /*GL_EXP*/;
    d1 -= k * 2048 /*GL_EXP*/;
    float f9 = (worldObj.worldProvider.getCloudHeight() - f1) + 0.33F;
    float f10 = (float)(d * (double)f6);
    float f11 = (float)(d1 * (double)f6);
    tessellator.startDrawingQuads();
    tessellator.setColorRGBA_F(f2, f3, f4, 0.8F);
    for(int l = -byte0 * i; l < byte0 * i; l += byte0)
    {
        for(int i1 = -byte0 * i; i1 < byte0 * i; i1 += byte0)
        {
            tessellator.addVertexWithUV(l + 0, f9, i1 + byte0, (float)(l + 0) * f6 + f10, (float)(i1 + byte0) * f6 + f11);
            tessellator.addVertexWithUV(l + byte0, f9, i1 + byte0, (float)(l + byte0) * f6 + f10, (float)(i1 + byte0) * f6 + f11);
            tessellator.addVertexWithUV(l + byte0, f9, i1 + 0, (float)(l + byte0) * f6 + f10, (float)(i1 + 0) * f6 + f11);
            tessellator.addVertexWithUV(l + 0, f9, i1 + 0, (float)(l + 0) * f6 + f10, (float)(i1 + 0) * f6 + f11);
        }

    }

    tessellator.draw();
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glDisable(3042 /*GL_BLEND*/);
    GL11.glEnable(2884 /*GL_CULL_FACE*/);
}
 
开发者ID:jd-lang,项目名称:betaexpansion,代码行数:66,代码来源:RenderGlobal.java


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