public void drawString (float x, float y, String text, Color color, int startIndex, int endIndex) { if (text == null) throw new IllegalArgumentException("text cannot be null."); if (text.length() == 0) return; if (color == null) throw new IllegalArgumentException("color cannot be null."); x -= paddingLeft; y -= paddingTop; GL11.glColor4f(color.r, color.g, color.b, color.a); GL11.glTranslatef(x, y, 0); if (renderType == RenderType.FreeType && bitmapFont != null) drawBitmap(text, startIndex, endIndex); else drawUnicode(text, startIndex, endIndex); GL11.glTranslatef(-x, -y, 0); }
public void drawString (float x, float y, String text, Color color, int startIndex, int endIndex) { if (text == null) throw new IllegalArgumentException("text cannot be null."); if (text.length() == 0) return; if (color == null) throw new IllegalArgumentException("color cannot be null."); x -= paddingLeft; y -= paddingTop; GL11.glColor4f(color.r, color.g, color.b, color.a); GL11.glTranslatef(x, y, 0); if (renderType == RenderType.FreeType && bitmapFont != null) drawBitmap(text, startIndex, endIndex); else drawUnicode(text, startIndex, endIndex); GL11.glTranslatef(-x, -y, 0); }
GL11.glColor4f(1, 1, 1, 1); texture.bind();
GL11.glColor4f(1, 1, 1, 1); texture.bind();
@Override public void drawScreen(int mouseX, int mouseY, float par3) { int x = (this.width - this.backgroundWidth) / 2; int y = (this.height - this.backgroundHeight) / 2 - this.closeButton.height; GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.renderEngine.bindTexture(new ResourceLocation(ForgeWorldEdit.MOD_ID, "textures/gui/reference.png")); this.drawTexturedModalRect(x, y, 0, 0, this.backgroundWidth, this.backgroundHeight); super.drawScreen(mouseX, mouseY, par3); }
private static void renderQuad() { if (displayListQuad == -1) { displayListQuad = glGenLists(1); glNewList(displayListQuad, GL11.GL_COMPILE); glBegin(GL_QUADS); glColor4f(1.0f, 1.0f, 1.0f, 1.0f); glTexCoord2d(0.0, 0.0); glVertex3i(-1, -1, -1); glTexCoord2d(1.0, 0.0); glVertex3i(1, -1, -1); glTexCoord2d(1.0, 1.0); glVertex3i(1, 1, -1); glTexCoord2d(0.0, 1.0); glVertex3i(-1, 1, -1); glEnd(); glEndList(); } glCallList(displayListQuad); } }
glColor4f(solidColor.x, solidColor.y, solidColor.z, solidColor.w);
glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
/** * @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); }
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(GuiSatellitePipe.TEXTURE); int j = guiLeft; int k = guiTop; drawTexturedModalRect(j, k, 0, 0, xSize, ySize); } }
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(GuiProviderPipe.TEXTURE); int j = guiLeft; int k = guiTop; drawTexturedModalRect(j, k, 0, 0, xSize, ySize); } }
@Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.bindGuiTexture(); int l = (width - xSize) / 2; int i1 = (height - ySize) / 2; this.drawTexturedModalRect(l, i1, 0, 0, xSize, ySize); }
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(GuiProvider.TEXTURE); int j = guiLeft; int k = guiTop; drawTexturedModalRect(j, k, 0, 0, xSize, ySize); }
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(GuiFluidSupplier.TEXTURE); int j = guiLeft; int k = guiTop; drawTexturedModalRect(j, k, 0, 0, xSize, ySize); } }
@Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(GuiExtractor.TEXTURE); int j = guiLeft; int k = guiTop; //drawRect(width/2 - xSize / 2, height / 2 - ySize /2, width/2 + xSize / 2, height / 2 + ySize /2, 0xFF404040); drawTexturedModalRect(j, k, 0, 0, xSize, ySize); }
@Override protected void drawGuiContainerBackgroundLayer(float f, int i, int j) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(gui); int l = (width - xSize) / 2; int i1 = (height - ySize) / 2; this.drawTexturedModalRect(l, i1, 0, 0, xSize, ySize); }
@Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { this.drawDefaultBackground();//dim the background as normal GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(getBackground()); this.drawTexturedModalRect((this.width - this.xSize) / 2, (this.height - this.ySize) / 2, 0, 0, this.xSize, this.ySize); }
@Override public void render(Laptop laptop, Minecraft mc, int x, int y, int mouseX, int mouseY, boolean active, float partialTicks) { GL11.glEnable(GL11.GL_SCISSOR_TEST); GLHelper.pushScissor(x, y, width, height); customLayout.render(laptop, mc, x, y, mouseX, mouseY, active, partialTicks); GLHelper.popScissor(); GL11.glDisable(GL11.GL_SCISSOR_TEST); customLayout.renderOverlay(laptop, mc, mouseX, mouseY, active); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); RenderHelper.disableStandardItemLighting(); }