List of usage examples for org.lwjgl.opengl GL11 glBlendFunc
public static void glBlendFunc(@NativeType("GLenum") int sfactor, @NativeType("GLenum") int dfactor)
From source file:org.mudraker.blockplacer.Event.java
License:Open Source License
/** * Draws the selection box for the player. * <p>Args: entityPlayer, rayTraceHit, i, partialTickTime * <p>Based on net.minecraft.client.renderer.RenderGlobal.java. * Which is called by net.minecraft.client.renderer.entityRenderer.java. * @@MCVERSION164@@//from w w w . j a v a 2s. com */ private void drawSelectionBox(EntityPlayer par1EntityPlayer, MovingObjectPosition par2MovingObjectPosition, int par3, float par4) { // Add config instance declaration Config config = Config.getInstance(); if (par3 == 0 && par2MovingObjectPosition.typeOfHit == EnumMovingObjectType.TILE) { GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); // Replaced to configure colour and width // GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F); // GL11.glLineWidth(2.0F); if (config.frameSwapInNether && par1EntityPlayer.dimension == DIMENSION_NETHER) { GL11.glColor4f(config.frameGreenF, config.frameRedF, config.frameBlueF, config.frameAlphaF); } else { GL11.glColor4f(config.frameRedF, config.frameGreenF, config.frameBlueF, config.frameAlphaF); } GL11.glLineWidth((float) config.frameLineWidth); // end change GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDepthMask(false); // Replaced to configure expansion //float f1 = 0.002F; float f1 = config.frameExpand; // end change int j = this.theWorld.getBlockId(par2MovingObjectPosition.blockX, par2MovingObjectPosition.blockY, par2MovingObjectPosition.blockZ); if (j > 0) { // Removed - Don't need to get block specific bounds // Block.blocksList[j].setBlockBoundsBasedOnState(this.theWorld, par2MovingObjectPosition.blockX, par2MovingObjectPosition.blockY, par2MovingObjectPosition.blockZ); double d0 = par1EntityPlayer.lastTickPosX + (par1EntityPlayer.posX - par1EntityPlayer.lastTickPosX) * (double) par4; double d1 = par1EntityPlayer.lastTickPosY + (par1EntityPlayer.posY - par1EntityPlayer.lastTickPosY) * (double) par4; double d2 = par1EntityPlayer.lastTickPosZ + (par1EntityPlayer.posZ - par1EntityPlayer.lastTickPosZ) * (double) par4; // Replaced - Don't need to get block specific box // But do need to use the BlockPlacer position instead. //this.drawOutlinedBoundingBox(Block.blocksList[j].getSelectedBoundingBoxFromPool(this.theWorld, par2MovingObjectPosition.blockX, par2MovingObjectPosition.blockY, par2MovingObjectPosition.blockZ).expand((double)f1, (double)f1, (double)f1).getOffsetBoundingBox(-d0, -d1, -d2)); this.drawOutlinedBoundingBox( this.getFullBoundingBoxFromPool(drawPosition.x, drawPosition.y, drawPosition.z) .expand((double) f1, (double) f1, (double) f1).getOffsetBoundingBox(-d0, -d1, -d2)); // end change } GL11.glDepthMask(true); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_BLEND); } }
From source file:org.obsidianbox.obsidian.renderer.GuiRenderer.java
License:MIT License
@Override public void render() { // Snapshot Minecraft rendering final int mcProgId = GL11.glGetInteger(GL20.GL_CURRENT_PROGRAM); final int mcVAID = GL11.glGetInteger(GL11.GL_VERTEX_ARRAY); updateScaledAttributes();/*from w ww. ja v a 2 s . co m*/ LWJGLUtil.checkForGLError(); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); pipeline.run(context); GL11.glDisable(GL11.GL_BLEND); LWJGLUtil.checkForGLError(); GL20.glUseProgram(mcProgId); GL30.glBindVertexArray(mcVAID); LWJGLUtil.checkForGLError(); }
From source file:org.ode4j.drawstuff.internal.DrawStuffGL.java
License:Open Source License
private void setupDrawingMode() { GL11.glEnable(GL11.GL_LIGHTING);/*from w w w. j a v a2 s.c o m*/ if (tnum != DS_TEXTURE_NUMBER.DS_NONE) { if (use_textures) { GL11.glEnable(GL11.GL_TEXTURE_2D); texture[tnum.ordinal()].bind(true); GL11.glEnable(GL11.GL_TEXTURE_GEN_S); GL11.glEnable(GL11.GL_TEXTURE_GEN_T); GL11.glTexGeni(GL11.GL_S, GL11.GL_TEXTURE_GEN_MODE, GL11.GL_OBJECT_LINEAR); GL11.glTexGeni(GL11.GL_T, GL11.GL_TEXTURE_GEN_MODE, GL11.GL_OBJECT_LINEAR); // static GLfloat s_params[4] = {1.0f,1.0f,0.0f,1}; // static GLfloat t_params[4] = {0.817f,-0.817f,0.817f,1}; GL11.glTexGen(GL11.GL_S, GL11.GL_OBJECT_PLANE, s_params_SDM); GL11.glTexGen(GL11.GL_T, GL11.GL_OBJECT_PLANE, t_params_SDM); } else { GL11.glDisable(GL11.GL_TEXTURE_2D); } } else { GL11.glDisable(GL11.GL_TEXTURE_2D); } setColor(color[0], color[1], color[2], color[3]); if (color[3] < 1) { GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); } else { GL11.glDisable(GL11.GL_BLEND); } }
From source file:org.oscim.gdx.LwjglGL20.java
License:Apache License
public void blendFunc(int sfactor, int dfactor) { GL11.glBlendFunc(sfactor, dfactor); }
From source file:org.spout.engine.SpoutRenderer.java
License:Open Source License
public void initRenderer(Canvas parent) { createWindow(parent);/*from w w w . j av a 2 s . c om*/ if (Spout.debugMode()) { client.getLogger().info("SpoutClient Information"); client.getLogger().info("Operating System: " + System.getProperty("os.name")); client.getLogger().info("Renderer Mode: " + client.getRenderMode().toString()); client.getLogger().info("GL21: " + GLContext.getCapabilities().OpenGL21 + " GL32: " + GLContext.getCapabilities().OpenGL32); client.getLogger().info("Resolution: " + Display.getWidth() + "x" + Display.getHeight()); client.getLogger().info("OpenGL Information"); client.getLogger().info("Vendor: " + GL11.glGetString(GL11.GL_VENDOR)); client.getLogger().info("OpenGL Version: " + GL11.glGetString(GL11.GL_VERSION)); client.getLogger().info("GLSL Version: " + GL11.glGetString(GL20.GL_SHADING_LANGUAGE_VERSION)); client.getLogger().info("Max Textures: " + GL11.glGetInteger(GL20.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS)); String extensions = "Extensions Supported: "; if (client.getRenderMode() == RenderMode.GL30 || client.getRenderMode() == RenderMode.GL40) { for (int i = 0; i < GL11.glGetInteger(GL30.GL_NUM_EXTENSIONS); i++) { extensions += GL30.glGetStringi(GL11.GL_EXTENSIONS, i) + " "; } } else { extensions += GL11.glGetString(GL11.GL_EXTENSIONS); } client.getLogger().info(extensions); } SpoutRenderer.checkGLError(); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glFrontFace(GL11.GL_CW); GL11.glCullFace(GL11.GL_BACK); SpoutRenderer.checkGLError(); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glClearColor((135.f / 255.0f), 206.f / 255.f, 250.f / 255.f, 1); SpoutRenderer.checkGLError(); //Init pool of BatchVertexRenderer BatchVertexRenderer.initPool(GL11.GL_TRIANGLES, 500); if (useReflexion) { reflected = new ClientRenderTexture(true, false, true); reflected.writeGPU(); // Test reflectedDebugBatch = new SpriteBatch(); Shader s1 = client.getFileSystem().getResource("shader://Spout/shaders/diffuse.ssf"); HashMap<String, Object> map1 = new HashMap<>(); map1.put("Diffuse", reflected); reflectedDebugMat = new ClientRenderMaterial(s1, map1); RenderPart screenPart1 = new RenderPart(); screenPart1.setSprite(new Rectangle(-1, -1, 0.5f, 0.5f)); screenPart1.setSource(new Rectangle(0, 1, 1, -1)); RenderPartPack pack1 = new RenderPartPack(reflectedDebugMat); pack1.add(screenPart1); reflectedDebugBatch.flush(pack1); // Test end } screenBatcher = new SpriteBatch(); t = new ClientRenderTexture(true, false, true); t.writeGPU(); Shader s = client.getFileSystem().getResource("shader://Spout/shaders/diffuse.ssf"); HashMap<String, Object> map = new HashMap<>(); map.put("Diffuse", t); mat = new ClientRenderMaterial(s, map); RenderPart screenPart = new RenderPart(); screenPart.setSprite(new Rectangle(-1, -1, 2, 2)); screenPart.setSource(new Rectangle(0, 1, 1, -1)); RenderPartPack pack = new RenderPartPack(mat); pack.add(screenPart); screenBatcher.flush(pack); }
From source file:org.spoutcraft.api.gui.GenericPolygon.java
License:Open Source License
public void render() { GL11.glDisable(GL11.GL_TEXTURE_2D);//from w w w. ja v a 2 s . c o m GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glBlendFunc(770, 771); GL11.glShadeModel(GL11.GL_SMOOTH); MinecraftTessellator t = Spoutcraft.getTessellator(); GL11.glTranslated(getActualX(), getActualY(), 0); t.startDrawingQuads(); for (Pair<Point, Color> point : points) { Point p = point.getLeft(); Color c = point.getRight(); t.setColorRGBAFloat(c.getRedF(), c.getGreenF(), c.getBlueF(), c.getAlphaF()); t.addVertex(p.getX(), p.getY(), 0); } t.draw(); GL11.glShadeModel(GL11.GL_FLAT); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_TEXTURE_2D); }
From source file:org.spoutcraft.api.gui.renderer.GuiRendererFBO.java
License:MIT License
@Override public void drawScreen(Gui gui, RootContainer root, int mouseX, int mouseY, float partialTick) { GL11.glPushAttrib(GL11.GL_STENCIL_BUFFER_BIT); GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, fbo); GL11.glClearColor(0, 0, 0, 0F);// w w w . ja va 2s.co m GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT | GL11.GL_STENCIL_BUFFER_BIT); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glEnable(GL11.GL_STENCIL_TEST); root.render(); GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, 0); TextureUtil.bind(guiTex); GL11.glDisable(GL11.GL_BLEND); Tessellator tes = Tessellator.instance; tes.startDrawingQuads(); tes.addVertexWithUV(0, 0, 0, 0, 1); tes.addVertexWithUV(0, gui.height, 0, 0, 0); tes.addVertexWithUV(gui.width, gui.height, 0, 1, 0); tes.addVertexWithUV(gui.width, 0, 0, 1, 1); tes.draw(); GL11.glEnable(GL11.GL_BLEND); GL11.glPopAttrib(); }
From source file:org.spoutcraft.api.gui.RenderUtil.java
License:Open Source License
public static void drawRectangle(int x, int y, int width, int height, int color) { int temp;/*from w w w .java2 s . c o m*/ if (x < width) { temp = x; x = width; width = temp; } if (y < height) { temp = y; y = height; height = temp; } 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.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glBlendFunc(770, 771); GL11.glColor4f(red, green, blue, alpha); MinecraftTessellator tessellator = Spoutcraft.getTessellator(); tessellator.startDrawingQuads(); tessellator.addVertex((double) x, (double) height, 0.0D); tessellator.addVertex((double) width, (double) height, 0.0D); tessellator.addVertex((double) width, (double) y, 0.0D); tessellator.addVertex((double) x, (double) y, 0.0D); tessellator.draw(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_BLEND); }
From source file:org.spoutcraft.api.gui.RenderUtil.java
License:Open Source License
public static void drawGradientRectangle(int x, int y, int gradientX, int gradientY, int colorOne, int colorTwo) { float alphaOne = (float) (colorOne >> 24 & 255) / 255.0F; float redOne = (float) (colorOne >> 16 & 255) / 255.0F; float greenOne = (float) (colorOne >> 8 & 255) / 255.0F; float blueOne = (float) (colorOne & 255) / 255.0F; float alphaTwo = (float) (colorTwo >> 24 & 255) / 255.0F; float redTwo = (float) (colorTwo >> 16 & 255) / 255.0F; float greenTwo = (float) (colorTwo >> 8 & 255) / 255.0F; float blueTwo = (float) (colorTwo & 255) / 255.0F; GL11.glDisable(GL11.GL_TEXTURE_2D);//w ww. j a v a 2 s .c o m GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glBlendFunc(770, 771); GL11.glShadeModel(GL11.GL_SMOOTH); MinecraftTessellator tessellator = Spoutcraft.getTessellator(); tessellator.startDrawingQuads(); tessellator.setColorRGBAFloat(redOne, greenOne, blueOne, alphaOne); tessellator.addVertex((double) gradientX, (double) y, 0.0D); tessellator.addVertex((double) x, (double) y, 0.0D); tessellator.setColorRGBAFloat(redTwo, greenTwo, blueTwo, alphaTwo); tessellator.addVertex((double) x, (double) gradientY, 0.0D); tessellator.addVertex((double) gradientX, (double) gradientY, 0.0D); tessellator.draw(); GL11.glShadeModel(GL11.GL_FLAT); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_TEXTURE_2D); }
From source file:org.spoutcraft.client.gui.about.GuiAbout.java
License:Open Source License
@Override public void drawScreen(int x, int y, float z) { super.drawBackground(0); GL11.glPushMatrix();//from w w w . ja v a 2 s . com GL11.glDisable(2896 /*GL_LIGHTING*/); GL11.glDisable(2912 /*GL_FOG*/); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); bg.setTopColor(background1); bg.setBottomColor(background2); bg.setY(30); bg.setHeight(this.height - 50); bg.setX(0); bg.setWidth(this.width - 12); bg.render(); scrollArea.setY(30); scrollArea.setHeight(this.height - 50); scrollArea.setX(this.width - 12); scrollArea.setWidth(16); scrollArea.setTopColor(scrollBarColor); scrollArea.setBottomColor(scrollBarColor2); scrollArea.render(); // Right half int top = 0; drawScaledString("What is Spoutcraft?", this.width / 2 - 200, top, 0xffffff); top += 10; drawScaledString("Spoutcraft is a modification for the", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("Minecraft client that plays exactly", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("like the official game. Its goal is", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("to give developers an easy to use", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("platform for building and distributing", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("mods, while providing a rich", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("gameplay experience for users.", this.width / 2 - 200, top, 0x808080); top += 10; top += 20; drawScaledString("What is Spout?", this.width / 2 - 200, top, 0xffffff); top += 10; drawScaledString("Spout is a Bukkit plugin development", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("platform that allows for previously", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("impossible tasks, such as custom items", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("blocks, mobs, animals, and vehicles. ", this.width / 2 - 200, top, 0x808080); top += 10; top += 20; drawScaledString("Who is SpoutDev?", this.width / 2 - 200, top, 0xffffff); top += 10; drawScaledString("SpoutDev is the team behind Spout, ", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("SpoutAPI, Spoutcraft,", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("and Spoutcraft Launcher.", this.width / 2 - 200, top, 0x808080); top += 10; top += 20; drawScaledString("Contributors", this.width / 2 - 200, top, 0xffffff); top += 10; drawScaledString("The Bukkit Team - Bukkit Server API", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("lahwran - Fast Events Code", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("lahwran - Minimap Logic", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("Celtic Minstrel - Code", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("Zeerix - Threading Code", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("Karlthepagan - OptiTick Code", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("Kahr - HD Textures Code", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("Jeckari - Custom Texture Code", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("Rycochet - GUI Code", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("knowbuddy - GUI Optimizations", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("TomyLobo - Mipmapping Code", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("Apache Foundation - Code", this.width / 2 - 200, top, 0x808080); top += 10; drawScaledString("ThVortex - FontRenderer fixes", this.width / 2 - 200, top, 0x808080); top += 10; // Left half top = 0; drawScaledString("Sponsors", this.width / 2 + 30, top, 0xffffff); top += 10; top = 130; drawScaledString("Team", this.width / 2 + 30, top, 0xffffff); top += 10; drawScaledString("Afforess - Lead Developer", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("Wulfspider - Co-Lead & Support", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("alta189 - Co-Lead & Developer", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("Top_Cat - Developer", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("raphfrk - Developer", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("narrowtux - Developer", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("Olloth - Developer", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("Rycochet - Developer", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("RoyAwesome - Developer", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("zml2008 - Developer", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("Zidane - Developer", this.width / 2 + 30, top, 0x808080); top += 10; top += 20; drawScaledString("Contact", this.width / 2 + 30, top, 0xffffff); top += 10; drawScaledString("Email: dev@spout.org", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("Website: spout.org", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("#spout on irc.esper.net", this.width / 2 + 30, top, 0x808080); top += 10; top += 20; drawScaledString("Note", this.width / 2 + 30, top, 0xffffff); top += 10; drawScaledString("Spoutcraft, Spout, and related", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("projects are open source. You", this.width / 2 + 30, top, 0x808080); top += 10; drawScaledString("can browse the source code at", this.width / 2 + 30, top, 0x808080); top += 10; sourceY = top; sourceWidth = this.fontRenderer.getStringWidth("https://github.com/SpoutDev"); drawScaledString("https://github.com/SpoutDev", this.width / 2 + 30, sourceY, hoveringLink ? 0x65A5D1 : 0x176093); top += 10; top += 20; int beastNodeX = (this.width / 2 + 30); int beastNodeY = getScaledHeight(15); if (beastNodeLogo != null) { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_BLEND); GL11.glDepthMask(false); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glTranslatef(beastNodeX, beastNodeY, 0); // Moves texture into place SpoutClient.getHandle().renderEngine.bindTexture(beastNodeLogo.getTextureID()); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST); Tessellator tessellator = Tessellator.instance; //GL11.glScalef(0.5f, 0.5f, 0.5f); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(0.0D, 33, -90, 0.0D, 0.0D); // Draw corners tessellator.addVertexWithUV(147, 33, -90, beastNodeLogo.getWidth(), 0.0D); tessellator.addVertexWithUV(147, 0.0D, -90, beastNodeLogo.getWidth(), beastNodeLogo.getHeight()); tessellator.addVertexWithUV(0.0D, 0.0D, -90, 0.0D, beastNodeLogo.getHeight()); tessellator.draw(); GL11.glDepthMask(true); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glPopMatrix(); } int minecraftBizX = (this.width / 2 + 30); int minecraftBizY = getScaledHeight(85); if (minecraftBizLogo != null) { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_BLEND); GL11.glDepthMask(false); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glTranslatef(minecraftBizX, minecraftBizY, 0); // Moves texture into place SpoutClient.getHandle().renderEngine.bindTexture(minecraftBizLogo.getTextureID()); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST); Tessellator tessellator = Tessellator.instance; //GL11.glScalef(0.5f, 0.5f, 0.5f); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(0.0D, 33, -90, 0.0D, 0.0D); // Draw corners tessellator.addVertexWithUV(147, 33, -90, minecraftBizLogo.getWidth(), 0.0D); tessellator.addVertexWithUV(147, 0.0D, -90, minecraftBizLogo.getWidth(), minecraftBizLogo.getHeight()); tessellator.addVertexWithUV(0.0D, 0.0D, -90, 0.0D, minecraftBizLogo.getHeight()); tessellator.draw(); GL11.glDepthMask(true); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glPopMatrix(); } // Draw tooltips if (isInBoundingRect(beastNodeX, beastNodeY, 33, 147, x, y)) { drawTooltip("BeastNode provides high quality Minecraft and web hosting at affordable\n" + "prices and is generously sponsoring the Spout project with its hosting\n" + "& server needs. Mine, build, craft, and chat with your own high quality\n" + "Minecraft server with FREE mumble voice server and web hosting.", x, y); } else if (isInBoundingRect(minecraftBizX, minecraftBizY, 33, 147, x, y)) { drawTooltip("Your Minecraft community in a new dimension!", x, y); } GL11.glDisable(2896 /*GL_LIGHTING*/); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); SpoutClient.getHandle().renderEngine.bindTexture("/gui/gui.png"); RenderUtil.drawTexturedModalRectangle(this.width - 14, getInvertedScaledHeight(this.height), 0, 208, 16, 16, 0f); GL11.glDisable(2912 /*GL_FOG*/); GL11.glDisable(2929 /*GL_DEPTH_TEST*/); this.overlayBackground(0, 30, 255, 255); this.overlayBackground(this.height - 50, this.height, 255, 255); drawCenteredString(this.fontRenderer, "About", this.width / 2, 16, 0xffffff); SpoutClient.getHandle().renderEngine.bindTexture("/title/mclogo.png"); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glPushMatrix(); GL11.glTranslatef((0.0325f * this.width), (this.height - 40), 0); GL11.glScalef(0.4f, 0.4f, 0.4f); this.drawTexturedModalRect(0, 0, 0, 0, 155, 44); this.drawTexturedModalRect(155, 0, 0, 45, 155, 44); GL11.glPopMatrix(); if (spoutcraftTexture != null) { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_BLEND); GL11.glDepthMask(false); GL11.glEnable(3008 /*GL_ALPHA_TEST*/); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glTranslatef((this.width - 140), (this.height - 45), 0); // Moves texture into place SpoutClient.getHandle().renderEngine.bindTexture(spoutcraftTexture.getTextureID()); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST); Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.addVertexWithUV(0.0D, 32, -90, 0.0D, 0.0D); // Draw corners tessellator.addVertexWithUV(128, 32, -90, spoutcraftTexture.getWidth(), 0.0D); tessellator.addVertexWithUV(128, 0.0D, -90, spoutcraftTexture.getWidth(), spoutcraftTexture.getHeight()); tessellator.addVertexWithUV(0.0D, 0.0D, -90, 0.0D, spoutcraftTexture.getHeight()); tessellator.draw(); GL11.glDepthMask(true); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glPopMatrix(); } drawString(this.fontRenderer, "Unknown Version", (int) (this.width * 0.034f), this.height - 20, 0xffffff); drawString(this.fontRenderer, "Copyright Mojang AB", (int) (this.width * 0.034f), this.height - 10, 0x808080); String version = SpoutClient.getClientVersion(); drawString(this.fontRenderer, version, (int) (this.width - 45) - fontRenderer.getStringWidth(version) + fontRenderer.getStringWidth("0"), this.height - 20, 0xffffff); drawString(this.fontRenderer, "Licensed under LGPLv3", (int) (this.width - 129), this.height - 10, 0x808080); ((GuiButton) this.buttonList.get(0)).xPosition = this.width / 2 - 50; ((GuiButton) this.buttonList.get(0)).yPosition = this.height - 25; ((GuiButton) this.buttonList.get(0)).drawButton(this.mc, x, y); //super.drawScreen(x, x, z); // Shadow magic GL11.glEnable(3042 /*GL_BLEND*/); GL11.glBlendFunc(770, 771); GL11.glDisable(3008 /*GL_ALPHA_TEST*/); GL11.glShadeModel(7425 /*GL_SMOOTH*/); GL11.glDisable(3553 /*GL_TEXTURE_2D*/); Tessellator var16 = Tessellator.instance; byte var19 = 4; var16.startDrawingQuads(); var16.setColorRGBA_I(0, 0); var16.addVertexWithUV(0, (double) (30 + var19), 0.0D, 0.0D, 1.0D); var16.addVertexWithUV(this.width - 12, (double) (30 + var19), 0.0D, 1.0D, 1.0D); var16.setColorRGBA_I(0, 255); var16.addVertexWithUV(this.width - 12, 30, 0.0D, 1.0D, 0.0D); var16.addVertexWithUV(0, 30, 0.0D, 0.0D, 0.0D); var16.draw(); var16.startDrawingQuads(); var16.setColorRGBA_I(0, 255); var16.addVertexWithUV(0, this.height - 50, 0.0D, 0.0D, 1.0D); var16.addVertexWithUV(this.width - 12, this.height - 50, 0.0D, 1.0D, 1.0D); var16.setColorRGBA_I(0, 0); var16.addVertexWithUV(this.width - 12, (double) (this.height - 50 - var19), 0.0D, 1.0D, 0.0D); var16.addVertexWithUV(0, (double) (this.height - 50 - var19), 0.0D, 0.0D, 0.0D); var16.draw(); GL11.glEnable(3008 /*GL_ALPHA_TEST*/); GL11.glPopMatrix(); }