Java Code Examples for org.lwjgl.opengl.GL11#glColor4f()
The following examples show how to use
org.lwjgl.opengl.GL11#glColor4f() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MoCRenderWraith.java From mocreaturesdev with GNU General Public License v3.0 | 6 votes |
@Override public void doRenderLiving(EntityLiving entityliving, double d, double d1, double d2, float f, float f1) { MoCEntityWraith wraith = (MoCEntityWraith) entityliving; //boolean flag = wraith.isGlowing(); boolean flag = false; GL11.glPushMatrix(); GL11.glEnable(3042 /*GL_BLEND*/); if (!flag) { float transparency = 0.6F; GL11.glBlendFunc(770, 771); GL11.glColor4f(0.8F, 0.8F, 0.8F, transparency); } else { GL11.glBlendFunc(770, 1); } super.doRenderLiving(entityliving, d, d1, d2, f, f1); GL11.glDisable(3042/*GL_BLEND*/); GL11.glPopMatrix(); }
Example 2
Source File: PlayerInventory.java From TFC2 with GNU General Public License v3.0 | 6 votes |
public static void drawInventory(GuiContainer container, int screenWidth, int screenHeight, int upperGuiHeight) { Core.bindTexture(invTexture); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int guiX = (screenWidth - invXSize) / 2; int guiY = (screenHeight - (upperGuiHeight+invYSize)) / 2 + upperGuiHeight; container.drawTexturedModalRect(guiX, guiY, 0, 0, invXSize, invYSize); //encumbrance bar float eMult = Math.min(Core.getEncumbrance(net.minecraft.client.Minecraft.getMinecraft().player.inventory.mainInventory) / 80f, 1.0f); if(eMult < 0.5) GL11.glColor4f(0.0F, 0.8F, 0.0F, 1.0F); else if(eMult < 0.75) GL11.glColor4f(1.0F, 0.8F, 0.0F, 1.0F); else GL11.glColor4f(0.8F, 0.0F, 0.0F, 1.0F); container.drawTexturedModalRect(guiX+8, guiY+5, 2, 245, (int)(160 * eMult), 3); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); //encumbrance meter container.drawTexturedModalRect(guiX+7, guiY+4, 1, 249, 162, 5); }
Example 3
Source File: ModelWandPart.java From Gadomancy with GNU Lesser General Public License v3.0 | 6 votes |
private void drawRune(double x, double y, double z, int rune, EntityPlayer player) { GL11.glPushMatrix(); UtilsFX.bindTexture("textures/misc/script.png"); float r = MathHelper.sin((player.ticksExisted + rune * 5) / 5.0F) * 0.1F + 0.88F; float g = MathHelper.sin((player.ticksExisted + rune * 5) / 7.0F) * 0.1F + 0.63F; float alpha = MathHelper.sin((player.ticksExisted + rune * 5) / 10.0F) * 0.2F; GL11.glColor4f(r, g, 0.2F, alpha + 0.6F); GL11.glRotated(90.0D, 0.0D, 0.0D, 1.0D); GL11.glTranslated(x, y, z); Tessellator tessellator = Tessellator.instance; float var8 = 0.0625F * rune; float var9 = var8 + 0.0625F; float var10 = 0.0F; float var11 = 1.0F; tessellator.startDrawingQuads(); tessellator.setColorRGBA_F(r, g, 0.2F, alpha + 0.6F); tessellator.addVertexWithUV(-0.06D - alpha / 40.0F, 0.06D + alpha / 40.0F, 0.0D, var9, var11); tessellator.addVertexWithUV(0.06D + alpha / 40.0F, 0.06D + alpha / 40.0F, 0.0D, var9, var10); tessellator.addVertexWithUV(0.06D + alpha / 40.0F, -0.06D - alpha / 40.0F, 0.0D, var8, var10); tessellator.addVertexWithUV(-0.06D - alpha / 40.0F, -0.06D - alpha / 40.0F, 0.0D, var8, var11); tessellator.draw(); GL11.glPopMatrix(); }
Example 4
Source File: GLUtils.java From ehacks-pro with GNU General Public License v3.0 | 5 votes |
public static void drawCheck(int x, int y) { GL11.glEnable(3042); GL11.glDisable(3553); GL11.glColor4f(0.0f, 0.0f, 0.75f, 0.5f); GL11.glBlendFunc(770, 771); GL11.glLineWidth(2.0f); GL11.glBegin(3); GL11.glVertex2f((x + 1), (y + 4)); GL11.glVertex2f((x + 3), (y + 6.5f)); GL11.glVertex2f((x + 7), (y + 2)); GL11.glEnd(); GL11.glDisable(3042); GL11.glEnable(3553); }
Example 5
Source File: AutoBuildHack.java From Wurst7 with GNU General Public License v3.0 | 5 votes |
private void drawGreenBox() { GL11.glDepthMask(false); GL11.glColor4f(0F, 1F, 0F, 0.15F); RenderUtils.drawSolidBox(); GL11.glDepthMask(true); GL11.glColor4f(0F, 0F, 0F, 0.5F); RenderUtils.drawOutlinedBox(); }
Example 6
Source File: ImmediateModeOGLRenderer.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * @see org.newdawn.slick.opengl.renderer.SGL#glColor4f(float, float, float, float) */ public void glColor4f(float r, float g, float b, float a) { a *= alphaScale; current[0] = r; current[1] = g; current[2] = b; current[3] = a; GL11.glColor4f(r, g, b, a); }
Example 7
Source File: ComboBoxPopup.java From Wurst7 with GNU General Public License v3.0 | 5 votes |
private void drawValueBackground(int x1, int x2, int yi1, int yi2, boolean hValue) { float[] bgColor = gui.getBgColor(); float alpha = gui.getOpacity() * (hValue ? 1.5F : 1); GL11.glColor4f(bgColor[0], bgColor[1], bgColor[2], alpha); GL11.glBegin(GL11.GL_QUADS); GL11.glVertex2i(x1, yi1); GL11.glVertex2i(x1, yi2); GL11.glVertex2i(x2, yi2); GL11.glVertex2i(x2, yi1); GL11.glEnd(); }
Example 8
Source File: GuiConfig.java From CraftingKeys with MIT License | 5 votes |
@Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { //Setting up GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); drawDefaultBackground(); //drawWorldBackground(0); //Title drawCenteredString(fontRenderer, LanguageLocalizer.localize("craftingkeys.config.title"), width / 2, height / 2 - 115, pureWhite.getRGB()); // Info-text and fake line drawCenteredString(fontRenderer, LanguageLocalizer.localize("craftingkeys.config.description"), width / 2, height / 2 - 10, pureWhite.getRGB()); drawCenteredString(fontRenderer, "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -", width / 2, height / 2 + 8, lightGray.getRGB()); // Key Info drawCenteredString(fontRenderer, LanguageLocalizer.localize("craftingkeys.config.stack"), guiBasePosition + 130, height / 2 - 96, pureWhite.getRGB()); drawCenteredString(fontRenderer, LanguageLocalizer.localize("craftingkeys.config.drop"), guiBasePosition + 130, height / 2 - 58, pureWhite.getRGB()); //Draw line to let it look better drawHorizontalLine(guiBasePosition - 86, guiBasePosition + 85, height / 2 - 20, pureWhite.getRGB()); // Draw Crafting Table drawCraftingTable(); // Draw info drawInfo(); //Draw line to let it look better drawHorizontalLine(guiShowBasePosX - 86, guiShowBasePosX + 85, guiShowBasePosY + 80, lightGray.getRGB()); // Super super.drawScreen(mouseX, mouseY, partialTicks); }
Example 9
Source File: GeneralClient.java From Chisel-2 with GNU General Public License v2.0 | 5 votes |
public static void setGLColorFromInt(int color) { float red = (color >> 16 & 255) / 255.0F; float green = (color >> 8 & 255) / 255.0F; float blue = (color & 255) / 255.0F; GL11.glColor4f(red, green, blue, 1.0F); }
Example 10
Source File: GData4.java From ldparteditor with MIT License | 5 votes |
@Override public void drawGL20_RandomColours(Composite3D c3d) { if (!visible) return; if (a < 1f && c3d.isDrawingSolidMaterials() || !c3d.isDrawingSolidMaterials() && a == 1f) return; final float r = MathHelper.randomFloat(ID, 0); final float g = MathHelper.randomFloat(ID, 1); final float b = MathHelper.randomFloat(ID, 2); GL11.glBegin(GL11.GL_QUADS); if (GData.globalNegativeDeterminant) { GL11.glColor4f(r, g, b, a); GL11.glNormal3f(xn, yn, zn); GL11.glVertex3f(x1, y1, z1); GL11.glVertex3f(x4, y4, z4); GL11.glVertex3f(x3, y3, z3); GL11.glVertex3f(x2, y2, z2); GL11.glNormal3f(-xn, -yn, -zn); GL11.glVertex3f(x1, y1, z1); GL11.glVertex3f(x2, y2, z2); GL11.glVertex3f(x3, y3, z3); GL11.glVertex3f(x4, y4, z4); } else { GL11.glColor4f(r, g, b, a); GL11.glNormal3f(-xn, -yn, -zn); GL11.glVertex3f(x1, y1, z1); GL11.glVertex3f(x4, y4, z4); GL11.glVertex3f(x3, y3, z3); GL11.glVertex3f(x2, y2, z2); GL11.glNormal3f(xn, yn, zn); GL11.glVertex3f(x1, y1, z1); GL11.glVertex3f(x2, y2, z2); GL11.glVertex3f(x3, y3, z3); GL11.glVertex3f(x4, y4, z4); } GL11.glEnd(); }
Example 11
Source File: IngameHUD.java From Wurst7 with GNU General Public License v3.0 | 5 votes |
@Override public void onRenderGUI(MatrixStack matrixStack, float partialTicks) { if(!WurstClient.INSTANCE.isEnabled()) return; if(tabGui == null) tabGui = new TabGui(); boolean blend = GL11.glGetBoolean(GL11.GL_BLEND); ClickGui clickGui = WurstClient.INSTANCE.getGui(); // GL settings GL11.glDisable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_TEXTURE_2D); clickGui.updateColors(); wurstLogo.render(matrixStack); hackList.render(matrixStack, partialTicks); tabGui.render(matrixStack, partialTicks); // pinned windows if(!(WurstClient.MC.currentScreen instanceof ClickGuiScreen)) clickGui.renderPinnedWindows(matrixStack, partialTicks); // GL resets GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glColor4f(1, 1, 1, 1); if(blend) GL11.glEnable(GL11.GL_BLEND); else GL11.glDisable(GL11.GL_BLEND); }
Example 12
Source File: RenderUtil.java From seppuku with GNU General Public License v3.0 | 5 votes |
public static void drawTriangle(float x, float y, float size, float theta, int color) { GL11.glTranslated(x, y, 0); GL11.glRotatef(180 + theta, 0F, 0F, 1.0F); float alpha = (float) (color >> 24 & 255) / 255.0F; float red = (float) (color >> 16 & 255) / 255.0F; float green = (float) (color >> 8 & 255) / 255.0F; float blue = (float) (color & 255) / 255.0F; GL11.glColor4f(red, green, blue, alpha); GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glBlendFunc(770, 771); GL11.glLineWidth(1); GL11.glBegin(GL11.GL_TRIANGLE_FAN); GL11.glVertex2d(0, (1.0F * size)); GL11.glVertex2d((1 * size), -(1.0F * size)); GL11.glVertex2d(-(1 * size), -(1.0F * size)); GL11.glEnd(); GL11.glDisable(GL11.GL_LINE_SMOOTH); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_BLEND); GL11.glRotatef(-180 - theta, 0F, 0F, 1.0F); GL11.glTranslated(-x, -y, 0); }
Example 13
Source File: GuiTerminalFluid.java From ExtraCells1 with MIT License | 5 votes |
@Override protected void drawGuiContainerBackgroundLayer(float alpha, int sizeX, int sizeY) { if (tileEntity != null && !tileEntity.getFluids().isEmpty()) { Fluid currentSelected = tileEntity.getCurrentFluid(); List<SpecialFluidStack> currentFluids = tileEntity.getFluids(); List<Fluid> currentCraftables = tileEntity.getCurrentCraftables(); if (oldSelected != currentSelected || oldFluids != currentFluids || oldCraftables != currentCraftables) { oldSelected = currentSelected; oldFluids = currentFluids; oldCraftables = currentCraftables; initGui(); } } else { oldFluids = new ArrayList<SpecialFluidStack>(); oldCraftables = new ArrayList<Fluid>(); oldSelected = null; currentFluidName = "-"; currentFluidAmount = 0; initGui(); } GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Minecraft.getMinecraft().renderEngine.bindTexture(guiTexture); drawTexturedModalRect(guiLeft, guiTop - 18, 0, 0, xSize, ySize); searchbar.drawTextBox(); }
Example 14
Source File: GuiSaveSlotButton.java From NBTEdit with GNU General Public License v3.0 | 5 votes |
private void renderVanillaButton(int x, int y, int u, int v, int width, int height){ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(TEXTURE); //Top Left this.drawTexturedModalRect(x, y, u, v, width/2, height/2); //Top Right this.drawTexturedModalRect(x+width/2, y, u +200 - width /2, v, width/2, height/2); //Bottom Left this.drawTexturedModalRect(x, y+height/2, u, v+20-height/2, width/2, height/2); //Bottom Right this.drawTexturedModalRect(x+width/2, y+height/2, u + 200-width/2, v+20-height/2, width/2, height/2); }
Example 15
Source File: MoCRenderShark.java From mocreaturesdev with GNU General Public License v3.0 | 4 votes |
@Override public void doRenderLiving(EntityLiving entityliving, double d, double d1, double d2, float f, float f1) { MoCEntityShark entityshark = (MoCEntityShark) entityliving; super.doRenderLiving(entityshark, d, d1, d2, f, f1); boolean flag = MoCreatures.proxy.getDisplayPetName() && !(entityshark.getName()).isEmpty(); boolean flag1 = MoCreatures.proxy.getDisplayPetHealth(); boolean flag2 = MoCreatures.proxy.getDisplayPetIcons(); if (entityshark.renderName()) { float f2 = 1.6F; float f3 = 0.01666667F * f2; float f4 = entityshark.getDistanceToEntity(renderManager.livingPlayer); if (f4 < 16F) { String s = ""; s = (new StringBuilder()).append(s).append(entityshark.getName()).toString(); float f5 = 0.1F; FontRenderer fontrenderer = getFontRendererFromRenderManager(); GL11.glPushMatrix(); GL11.glTranslatef((float) d + 0.0F, (float) d1 + f5, (float) d2); GL11.glNormal3f(0.0F, 1.0F, 0.0F); GL11.glRotatef(-renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GL11.glScalef(-f3, -f3, f3); GL11.glDisable(2896 /* GL_LIGHTING */); Tessellator tessellator = Tessellator.instance; byte byte0 = -50; if (flag1) { GL11.glDisable(3553 /* GL_TEXTURE_2D */); if (!flag) { byte0 += 8; } tessellator.startDrawingQuads(); // might break SSP float f6 = entityshark.getHealth(); float f7 = entityshark.getMaxHealth(); float f8 = f6 / f7; float f9 = 40F * f8; tessellator.setColorRGBA_F(0.7F, 0.0F, 0.0F, 1.0F); tessellator.addVertex(-20F + f9, -10 + byte0, 0.0D); tessellator.addVertex(-20F + f9, -6 + byte0, 0.0D); tessellator.addVertex(20D, -6 + byte0, 0.0D); tessellator.addVertex(20D, -10 + byte0, 0.0D); tessellator.setColorRGBA_F(0.0F, 0.7F, 0.0F, 1.0F); tessellator.addVertex(-20D, -10 + byte0, 0.0D); tessellator.addVertex(-20D, -6 + byte0, 0.0D); tessellator.addVertex(f9 - 20F, -6 + byte0, 0.0D); tessellator.addVertex(f9 - 20F, -10 + byte0, 0.0D); tessellator.draw(); GL11.glEnable(3553 /* GL_TEXTURE_2D */); } if (flag) { GL11.glDepthMask(false); GL11.glDisable(2929 /* GL_DEPTH_TEST */); GL11.glEnable(3042 /* GL_BLEND */); GL11.glBlendFunc(770, 771); GL11.glDisable(3553 /* GL_TEXTURE_2D */); tessellator.startDrawingQuads(); int i = fontrenderer.getStringWidth(s) / 2; tessellator.setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F); tessellator.addVertex(-i - 1, -1 + byte0, 0.0D); tessellator.addVertex(-i - 1, 8 + byte0, 0.0D); tessellator.addVertex(i + 1, 8 + byte0, 0.0D); tessellator.addVertex(i + 1, -1 + byte0, 0.0D); tessellator.draw(); GL11.glEnable(3553 /* GL_TEXTURE_2D */); fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, byte0, 0x20ffffff); GL11.glEnable(2929 /* GL_DEPTH_TEST */); GL11.glDepthMask(true); fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, byte0, -1); GL11.glDisable(3042 /* GL_BLEND */); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); } GL11.glEnable(2896 /* GL_LIGHTING */); GL11.glPopMatrix(); } } }
Example 16
Source File: Graphics.java From AnyaBasic with MIT License | 4 votes |
public void drawSpriteOnLine( int x1, int y1, int x2, int y2, int width, int type, float r, float g, float b, float a ) { SpriteGL sprite = glowImages.getSprite(type % glowImages.getNumImages()); // Only change active texture when there is a need // Speeds up the rendering by batching textures if ( sprite.textureID != currentTexture ) { GL11.glBindTexture( GL11.GL_TEXTURE_2D, sprite.textureID ); currentTexture = sprite.textureID; } GL11.glColor4f( r, g, b, a ) ; float u1 = sprite.u1; float v1 = sprite.v1; float u2 = sprite.u2; float v2 = sprite.v2; float uh = (u1 + u2)/2.0f; float nx,ny; nx = -( y2-y1 ); ny = ( x2-x1 ); float leng; leng = (float)Math.sqrt( nx * nx + ny * ny ); nx = nx / leng; ny = ny / leng; nx *= width / 2.0; ny *= width / 2.0; float lx1, ly1, lx2, ly2, lx3, ly3, lx4, ly4; lx1 = x2 + nx; ly1 = y2 + ny; lx2 = x2 - nx; ly2 = y2 - ny; lx3 = x1 - nx; ly3 = y1 - ny; lx4 = x1 + nx; ly4 = y1 + ny; // MAIN GL11.glBegin( GL11.GL_QUADS ); GL11.glTexCoord2f( uh, v1 ); GL11.glVertex3f( lx1, ly1, 0.0f ); GL11.glTexCoord2f( uh, v2 ); GL11.glVertex3f( lx2, ly2, 0.0f ); GL11.glTexCoord2f( uh, v2 ); GL11.glVertex3f( lx3, ly3, 0.0f ); GL11.glTexCoord2f( uh, v1 ); GL11.glVertex3f( lx4, ly4, 0.0f ); GL11.glEnd(); //RIGHT float lx5, ly5, lx6, ly6, vx, vy; vx = ( x2-x1 ); vy = ( y2-y1 ); leng = (float)Math.sqrt( vx * vx + vy * vy ); vx = vx / leng; vy = vy / leng; vx *= width / 2.0; vy *= width / 2.0; lx5 = lx1 + vx; ly5 = ly1 + vy; lx6 = lx2 + vx; ly6 = ly2 + vy; GL11.glBegin( GL11.GL_QUADS ); GL11.glTexCoord2f( uh, v1 ); GL11.glVertex3f( lx1, ly1,0.0f ); GL11.glTexCoord2f( u2, v1 ); GL11.glVertex3f( lx5, ly5,0.0f ); GL11.glTexCoord2f( u2, v2 ); GL11.glVertex3f( lx6, ly6,0.0f ); GL11.glTexCoord2f( uh, v2 ); GL11.glVertex3f( lx2, ly2,0.0f ); GL11.glEnd(); // LEFT lx5 = lx4 - vx; ly5 = ly4 - vy; lx6 = lx3 - vx; ly6 = ly3 - vy; GL11.glBegin( GL11.GL_QUADS ); GL11.glTexCoord2f( uh, v1 ); GL11.glVertex3f( lx4, ly4, 0.0f ); GL11.glTexCoord2f( uh, v2 ); GL11.glVertex3f( lx3, ly3 ,0.0f ); GL11.glTexCoord2f( u2, v2 ); GL11.glVertex3f( lx6, ly6, 0.0f ); GL11.glTexCoord2f( u2, v1 ); GL11.glVertex3f( lx5, ly5, 0.0f ); GL11.glEnd(); }
Example 17
Source File: RenderState.java From tribaltrouble with GNU General Public License v2.0 | 4 votes |
public void transform(ElementRenderState render_state) { RenderTools.translateAndRotate(render_state.getModel()); GL11.glColor4f(1f, 1f, 1f, 1f); }
Example 18
Source File: AltManagerScreen.java From Wurst7 with GNU General Public License v3.0 | 4 votes |
@Override public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) { renderBackground(matrixStack); listGui.render(matrixStack, mouseX, mouseY, partialTicks); // skin preview if(listGui.getSelectedSlot() != -1 && listGui.getSelectedSlot() < altManager.getList().size()) { Alt alt = listGui.getSelectedAlt(); AltRenderer.drawAltBack(matrixStack, alt.getNameOrEmail(), (width / 2 - 125) / 2 - 32, height / 2 - 64 - 9, 64, 128); AltRenderer.drawAltBody(matrixStack, alt.getNameOrEmail(), width - (width / 2 - 140) / 2 - 32, height / 2 - 64 - 9, 64, 128); } // title text drawCenteredString(matrixStack, textRenderer, "Alt Manager", width / 2, 4, 16777215); drawCenteredString(matrixStack, textRenderer, "Alts: " + altManager.getList().size(), width / 2, 14, 10526880); drawCenteredString( matrixStack, textRenderer, "premium: " + altManager.getNumPremium() + ", cracked: " + altManager.getNumCracked(), width / 2, 24, 10526880); // red flash for errors if(errorTimer > 0) { GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_BLEND); GL11.glColor4f(1, 0, 0, errorTimer / 16F); GL11.glBegin(GL11.GL_QUADS); { GL11.glVertex2d(0, 0); GL11.glVertex2d(width, 0); GL11.glVertex2d(width, height); GL11.glVertex2d(0, height); } GL11.glEnd(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_BLEND); errorTimer--; } super.render(matrixStack, mouseX, mouseY, partialTicks); }
Example 19
Source File: MoCModelCricket.java From mocreaturesdev with GNU General Public License v3.0 | 4 votes |
@Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { //super.render(entity, f, f1, f2, f3, f4, f5); MoCEntityCricket entitycricket = (MoCEntityCricket) entity; //boolean onGround = entitycricket.onGround; boolean isFlying = (entitycricket.getIsFlying() || entitycricket.isOnAir());// entitycricket.getIsFlying(); setRotationAngles(f, f1, f2, f3, f4, f5, isFlying); Head.render(f5); Antenna.render(f5); AntennaB.render(f5); Thorax.render(f5); Abdomen.render(f5); TailA.render(f5); TailB.render(f5); FrontLegs.render(f5); MidLegs.render(f5); if (!isFlying) { ThighLeft.render(f5); ThighRight.render(f5); LegLeft.render(f5); LegRight.render(f5); FoldedWings.render(f5); } else { ThighLeftB.render(f5); ThighRightB.render(f5); LegLeftB.render(f5); LegRightB.render(f5); GL11.glPushMatrix(); GL11.glEnable(3042 /*GL_BLEND*/); float transparency = 0.6F; GL11.glBlendFunc(770, 771); GL11.glColor4f(0.8F, 0.8F, 0.8F, transparency); LeftWing.render(f5); RightWing.render(f5); GL11.glDisable(3042/*GL_BLEND*/); GL11.glPopMatrix(); } /*if (isFlying) { }else { }*/ }
Example 20
Source File: ColorUtil.java From EnderZoo with Creative Commons Zero v1.0 Universal | 4 votes |
public static void setGLColorFromInt(int color) { float red = (color >> 16 & 255) / 255.0F; float green = (color >> 8 & 255) / 255.0F; float blue = (color & 255) / 255.0F; GL11.glColor4f(red, green, blue, 1.0F); }