List of usage examples for org.lwjgl.opengl GL11 glColor4f
public static native void glColor4f(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha);
From source file:boilerplate.client.utils.EffectUtils.java
License:Minecraft Mod Public
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); }
From source file:buildcraft.additionalpipes.gui.GuiAdvancedWoodPipe.java
License:Open Source License
@Override protected void drawGuiContainerBackgroundLayer(float f, int i, int j) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(Textures.GUI_ADVANCEDWOOD); int j1 = (width - xSize) / 2; int k = (height - ySize) / 2; drawTexturedModalRect(j1, k, 0, 0, xSize, ySize); }
From source file:buildcraft.builders.gui.GuiArchitect.java
License:Minecraft Mod Public
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(TEXTURE); int j = (width - xSize) / 2; int k = (height - ySize) / 2; drawTexturedModalRect(j, k, 0, 0, xSize, ySize); int i1 = architect.getComputingProgressScaled(24); drawTexturedModalRect(j + 159, k + 34, 0, 166, i1 + 1, 16); }
From source file:buildcraft.builders.gui.GuiArchitectOld.java
License:Minecraft Mod Public
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(TEXTURE); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); int i1 = ((ContainerArchitect) container).computingTime; drawTexturedModalRect(guiLeft + 159, guiTop + 34, 0, 166, i1 + 1, 16); }
From source file:buildcraft.builders.gui.GuiBlueprintLibrary.java
License:Minecraft Mod Public
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(TEXTURE); int j = (width - xSize) / 2; int k = (height - ySize) / 2; drawTexturedModalRect(j, k, 0, 0, xSize, ySize); int inP = (int) (library.progressIn / 100.0 * 22.0); int outP = (int) (library.progressOut / 100.0 * 22.0); drawTexturedModalRect(j + 186 + 22 - inP, k + 61, 234 + 22 - inP, 16, inP, 16); drawTexturedModalRect(j + 186, k + 78, 234, 0, outP, 16); }
From source file:buildcraft.builders.gui.GuiBuilder.java
License:Minecraft Mod Public
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int j = (width - xSize) / 2; int k = (height - ySize) / 2; int realXSize = 0; // if (builder.isBuildingBlueprint()) { mc.renderEngine.bindTexture(BLUEPRINT_TEXTURE); realXSize = 256;/*from ww w. j a v a2s. c o m*/ // } else { // mc.renderEngine.bindTexture(TEXTURE); // realXSize = 176; // } drawTexturedModalRect(j, k, 0, 0, realXSize, ySize); for (int s = 0; s < slots.length; ++s) { ((ItemSlot) slots[s]).stack = null; } Collection<ItemStack> needs = builder.getNeededItems(); if (needs != null) { int s = 0; for (ItemStack stack : needs) { if (s >= slots.length) { break; } ((ItemSlot) slots[s]).stack = stack.copy(); s++; } } drawBackgroundSlots(); }
From source file:buildcraft.builders.gui.GuiFiller.java
License:Minecraft Mod Public
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { int i = mc.renderEngine.getTexture(DefaultProps.TEXTURE_PATH_GUI + "/filler.png"); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(i);/*from www.ja v a 2 s . c o m*/ drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); if (filler.currentPattern != null) { i = mc.renderEngine.getTexture(filler.currentPattern.getTextureFile()); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(i); int textureI = filler.currentPattern.getTextureIndex() >> 4; int textureJ = filler.currentPattern.getTextureIndex() - textureI * 16; drawTexturedModalRect(guiLeft + patternSymbolX, guiTop + patternSymbolY, 16 * textureJ, 16 * textureI, 16, 16); } }
From source file:buildcraft.builders.gui.GuiTemplate.java
License:Minecraft Mod Public
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { int i = mc.renderEngine.getTexture(DefaultProps.TEXTURE_PATH_GUI + "/template_gui.png"); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(i);/* w w w .j a v a 2 s .co m*/ int j = (width - xSize) / 2; int k = (height - ySize) / 2; drawTexturedModalRect(j, k, 0, 0, xSize, ySize); int i1 = template.getComputingProgressScaled(24); drawTexturedModalRect(j + 79, k + 34, 176, 14, i1 + 1, 16); }
From source file:buildcraft.builders.GuiBlueprintLibrary.java
License:Minecraft Mod Public
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { int i = 0;//from w w w . ja v a 2 s. c o m // if (library.owner.equals(player.username)) { i = mc.renderEngine.getTexture(DefaultProps.TEXTURE_PATH_GUI + "/library_rw.png"); // } else { // i = mc.renderEngine // .getTexture("/net/minecraft/src/buildcraft/builders/gui/library_r.png"); // } GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(i); int j = (width - xSize) / 2; int k = (height - ySize) / 2; drawTexturedModalRect(j, k, 0, 0, xSize, ySize); int inP = (int) (library.progressIn / 100.0 * 22.0); int outP = (int) (library.progressOut / 100.0 * 22.0); if (inP != 0) computeInput = true; else if (computeInput) { // In this case, there was a store computation that has finished. if (container.contents.size() == 0) container.contents = library.getNextPage(null); else container.contents = library .getNextPage(index.prevBpt(container.contents.getFirst().file.getName())); computeInput = false; } drawTexturedModalRect(j + 128 + 22 - inP, k + 61, 176 + 22 - inP, 16, inP, 16); drawTexturedModalRect(j + 128, k + 78, 176, 0, outP, 16); }
From source file:buildcraft.builders.GuiBuilder.java
License:Minecraft Mod Public
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { int i = 0;/*from w ww. j a va2 s . co m*/ int j = (width - xSize) / 2; int k = (height - ySize) / 2; int realXSize = 0; if (builder.isBuildingBlueprint()) { i = mc.renderEngine.getTexture(DefaultProps.TEXTURE_PATH_GUI + "/builder_blueprint.png"); realXSize = 256; } else { i = mc.renderEngine.getTexture(DefaultProps.TEXTURE_PATH_GUI + "/builder.png"); realXSize = 176; } GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(i); drawTexturedModalRect(j, k, 0, 0, realXSize, ySize); for (int s = 0; s < slots.length; ++s) ((ItemSlot) slots[s]).stack = null; Collection<ItemStack> needs = builder.getNeededItems(); if (needs != null) { int s = 0; for (ItemStack stack : needs) { if (s >= slots.length) break; ((ItemSlot) slots[s]).stack = stack.copy(); s++; } } drawBackgroundSlots(); }