Java Code Examples for org.lwjgl.opengl.GL11#glGenLists()
The following examples show how to use
org.lwjgl.opengl.GL11#glGenLists() .
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: ItemEspHack.java From Wurst7 with GNU General Public License v3.0 | 6 votes |
@Override public void onEnable() { EVENTS.add(UpdateListener.class, this); EVENTS.add(CameraTransformViewBobbingListener.class, this); EVENTS.add(RenderListener.class, this); itemBox = GL11.glGenLists(1); GL11.glNewList(itemBox, GL11.GL_COMPILE); GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_LIGHTING); GL11.glColor4f(1, 1, 0, 0.5F); RenderUtils.drawOutlinedBox(new Box(-0.5, 0, -0.5, 0.5, 1, 0.5)); GL11.glEndList(); }
Example 2
Source File: TunnellerHack.java From Wurst7 with GNU General Public License v3.0 | 6 votes |
@Override public void onEnable() { WURST.getHax().autoMineHack.setEnabled(false); WURST.getHax().excavatorHack.setEnabled(false); WURST.getHax().nukerHack.setEnabled(false); WURST.getHax().nukerLegitHack.setEnabled(false); WURST.getHax().speedNukerHack.setEnabled(false); // add listeners EVENTS.add(UpdateListener.class, this); EVENTS.add(RenderListener.class, this); for(int i = 0; i < displayLists.length; i++) displayLists[i] = GL11.glGenLists(1); ClientPlayerEntity player = MC.player; start = new BlockPos(player.getPos()); direction = player.getHorizontalFacing(); length = 0; tasks = new Task[]{new DodgeLiquidTask(), new FillInFloorTask(), new PlaceTorchTask(), new DigTunnelTask(), new WalkForwardTask()}; updateCyanList(); }
Example 3
Source File: SearchHack.java From Wurst7 with GNU General Public License v3.0 | 6 votes |
@Override public void onEnable() { prevLimit = limit.getValueI(); notify = true; pool1 = MinPriorityThreadFactory.newFixedThreadPool(); pool2 = new ForkJoinPool(); displayList = GL11.glGenLists(1); displayListUpToDate = false; EVENTS.add(UpdateListener.class, this); EVENTS.add(PacketInputListener.class, this); EVENTS.add(RenderListener.class, this); }
Example 4
Source File: CaveFinderHack.java From Wurst7 with GNU General Public License v3.0 | 6 votes |
@Override public void onEnable() { prevLimit = limit.getValueI(); notify = true; pool1 = MinPriorityThreadFactory.newFixedThreadPool(); pool2 = new ForkJoinPool(); displayList = GL11.glGenLists(1); displayListUpToDate = false; EVENTS.add(UpdateListener.class, this); EVENTS.add(PacketInputListener.class, this); EVENTS.add(RenderListener.class, this); }
Example 5
Source File: TunnellerHack.java From ForgeWurst with GNU General Public License v3.0 | 6 votes |
@Override protected void onEnable() { MinecraftForge.EVENT_BUS.register(this); for(int i = 0; i < displayLists.length; i++) displayLists[i] = GL11.glGenLists(1); EntityPlayerSP player = WMinecraft.getPlayer(); start = new BlockPos(player); direction = player.getHorizontalFacing(); length = 0; tasks = new Task[]{new DodgeLiquidTask(), new FillInFloorTask(), new PlaceTorchTask(), new DigTunnelTask(), new WalkForwardTask()}; updateCyanList(); }
Example 6
Source File: AutoFishHack.java From ForgeWurst with GNU General Public License v3.0 | 6 votes |
@Override protected void onEnable() { timer = 0; lastSoundPos = null; box = GL11.glGenLists(1); cross = GL11.glGenLists(1); GL11.glNewList(cross, GL11.GL_COMPILE); GL11.glColor4f(1, 0, 0, 0.5F); GL11.glBegin(GL11.GL_LINES); GL11.glVertex3d(-0.125, 0, -0.125); GL11.glVertex3d(0.125, 0, 0.125); GL11.glVertex3d(0.125, 0, -0.125); GL11.glVertex3d(-0.125, 0, 0.125); GL11.glEnd(); GL11.glEndList(); MinecraftForge.EVENT_BUS.register(this); }
Example 7
Source File: DisplayListWrapper.java From OpenModsLib with MIT License | 5 votes |
public void render() { if (pendingInvalidate) reset(); if (!isValid) { displayList = GL11.glGenLists(1); GL11.glNewList(displayList, GL11.GL_COMPILE); compile(); GL11.glEndList(); isValid = true; } GL11.glCallList(displayList); }
Example 8
Source File: CachedRendererFactory.java From OpenModsLib with MIT License | 5 votes |
public DisplayListRenderer(Tessellator tes) { displayList = GL11.glGenLists(1); if (isDisplayListValid()) { GL11.glNewList(displayList, GL11.GL_COMPILE); tes.draw(); GL11.glEndList(); } }
Example 9
Source File: MobEspHack.java From ForgeWurst with GNU General Public License v3.0 | 5 votes |
@Override protected void onEnable() { MinecraftForge.EVENT_BUS.register(this); mobBox = GL11.glGenLists(1); GL11.glNewList(mobBox, GL11.GL_COMPILE); GL11.glBegin(GL11.GL_LINES); AxisAlignedBB bb = new AxisAlignedBB(-0.5, 0, -0.5, 0.5, 1, 0.5); RenderUtils.drawOutlinedBox(bb); GL11.glEnd(); GL11.glEndList(); }
Example 10
Source File: PlayerEspHack.java From ForgeWurst with GNU General Public License v3.0 | 5 votes |
@Override protected void onEnable() { MinecraftForge.EVENT_BUS.register(this); playerBox = GL11.glGenLists(1); GL11.glNewList(playerBox, GL11.GL_COMPILE); GL11.glBegin(GL11.GL_LINES); AxisAlignedBB bb = new AxisAlignedBB(-0.5, 0, -0.5, 0.5, 1, 0.5); RenderUtils.drawOutlinedBox(bb); GL11.glEnd(); GL11.glEndList(); }
Example 11
Source File: ChestEspHack.java From Wurst7 with GNU General Public License v3.0 | 5 votes |
private void setupDisplayLists() { Box box = new Box(BlockPos.ORIGIN); greenBox = GL11.glGenLists(1); GL11.glNewList(greenBox, GL11.GL_COMPILE); GL11.glColor4f(0, 1, 0, 0.25F); RenderUtils.drawSolidBox(box); GL11.glColor4f(0, 1, 0, 0.5F); RenderUtils.drawOutlinedBox(box); GL11.glEndList(); orangeBox = GL11.glGenLists(1); GL11.glNewList(orangeBox, GL11.GL_COMPILE); GL11.glColor4f(1, 0.5F, 0, 0.25F); RenderUtils.drawSolidBox(box); GL11.glColor4f(1, 0.5F, 0, 0.5F); RenderUtils.drawOutlinedBox(box); GL11.glEndList(); cyanBox = GL11.glGenLists(1); GL11.glNewList(cyanBox, GL11.GL_COMPILE); GL11.glColor4f(0, 1, 1, 0.25F); RenderUtils.drawSolidBox(box); GL11.glColor4f(0, 1, 1, 0.5F); RenderUtils.drawOutlinedBox(box); GL11.glEndList(); purpleBox = GL11.glGenLists(1); GL11.glNewList(purpleBox, GL11.GL_COMPILE); GL11.glColor4f(1, 0, 1, 0.25F); RenderUtils.drawSolidBox(box); GL11.glColor4f(1, 0, 1, 0.5F); RenderUtils.drawOutlinedBox(box); GL11.glEndList(); normalChests = GL11.glGenLists(1); }
Example 12
Source File: MobEspHack.java From Wurst7 with GNU General Public License v3.0 | 5 votes |
@Override public void onEnable() { EVENTS.add(UpdateListener.class, this); EVENTS.add(CameraTransformViewBobbingListener.class, this); EVENTS.add(RenderListener.class, this); mobBox = GL11.glGenLists(1); GL11.glNewList(mobBox, GL11.GL_COMPILE); Box bb = new Box(-0.5, 0, -0.5, 0.5, 1, 0.5); RenderUtils.drawOutlinedBox(bb); GL11.glEndList(); }
Example 13
Source File: PlayerEspHack.java From Wurst7 with GNU General Public License v3.0 | 5 votes |
@Override public void onEnable() { EVENTS.add(UpdateListener.class, this); EVENTS.add(CameraTransformViewBobbingListener.class, this); EVENTS.add(RenderListener.class, this); playerBox = GL11.glGenLists(1); GL11.glNewList(playerBox, GL11.GL_COMPILE); Box bb = new Box(-0.5, 0, -0.5, 0.5, 1, 0.5); RenderUtils.drawOutlinedBox(bb); GL11.glEndList(); }
Example 14
Source File: FreecamHack.java From Wurst7 with GNU General Public License v3.0 | 5 votes |
@Override public void onEnable() { EVENTS.add(UpdateListener.class, this); EVENTS.add(PacketOutputListener.class, this); EVENTS.add(IsPlayerInWaterListener.class, this); EVENTS.add(PlayerMoveListener.class, this); EVENTS.add(CameraTransformViewBobbingListener.class, this); EVENTS.add(IsNormalCubeListener.class, this); EVENTS.add(SetOpaqueCubeListener.class, this); EVENTS.add(RenderListener.class, this); fakePlayer = new FakePlayerEntity(); GameOptions gs = MC.options; KeyBinding[] bindings = {gs.keyForward, gs.keyBack, gs.keyLeft, gs.keyRight, gs.keyJump, gs.keySneak}; for(KeyBinding binding : bindings) binding.setPressed(((IKeyBinding)binding).isActallyPressed()); playerBox = GL11.glGenLists(1); GL11.glNewList(playerBox, GL11.GL_COMPILE); Box bb = new Box(-0.5, 0, -0.5, 0.5, 1, 0.5); RenderUtils.drawOutlinedBox(bb); GL11.glEndList(); }
Example 15
Source File: AutoFishHack.java From Wurst7 with GNU General Public License v3.0 | 5 votes |
@Override public void onEnable() { bestRodValue = -1; bestRodSlot = -1; castRodTimer = 0; reelInTimer = -1; scheduledWindowClick = -1; lastSoundPos = null; box = GL11.glGenLists(1); cross = GL11.glGenLists(1); GL11.glNewList(cross, GL11.GL_COMPILE); GL11.glColor4f(1, 0, 0, 0.5F); GL11.glBegin(GL11.GL_LINES); GL11.glVertex3d(-0.125, 0, -0.125); GL11.glVertex3d(0.125, 0, 0.125); GL11.glVertex3d(0.125, 0, -0.125); GL11.glVertex3d(-0.125, 0, 0.125); GL11.glEnd(); GL11.glEndList(); EVENTS.add(UpdateListener.class, this); EVENTS.add(PacketInputListener.class, this); EVENTS.add(RenderListener.class, this); }
Example 16
Source File: ImmediateModeOGLRenderer.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 4 votes |
/** * @see org.newdawn.slick.opengl.renderer.SGL#glGenLists(int) */ public int glGenLists(int count) { return GL11.glGenLists(count); }
Example 17
Source File: ChestEspHack.java From ForgeWurst with GNU General Public License v3.0 | 4 votes |
@Override protected void onEnable() { MinecraftForge.EVENT_BUS.register(this); AxisAlignedBB bb = new AxisAlignedBB(BlockPos.ORIGIN); greenBox = GL11.glGenLists(1); GL11.glNewList(greenBox, GL11.GL_COMPILE); GL11.glColor4f(0, 1, 0, 0.25F); GL11.glBegin(GL11.GL_QUADS); RenderUtils.drawSolidBox(bb); GL11.glEnd(); GL11.glColor4f(0, 1, 0, 0.5F); GL11.glBegin(GL11.GL_LINES); RenderUtils.drawOutlinedBox(bb); GL11.glEnd(); GL11.glEndList(); orangeBox = GL11.glGenLists(1); GL11.glNewList(orangeBox, GL11.GL_COMPILE); GL11.glColor4f(1, 0.5F, 0, 0.25F); GL11.glBegin(GL11.GL_QUADS); RenderUtils.drawSolidBox(bb); GL11.glEnd(); GL11.glColor4f(1, 0.5F, 0, 0.5F); GL11.glBegin(GL11.GL_LINES); RenderUtils.drawOutlinedBox(bb); GL11.glEnd(); GL11.glEndList(); cyanBox = GL11.glGenLists(1); GL11.glNewList(cyanBox, GL11.GL_COMPILE); GL11.glColor4f(0, 1, 1, 0.25F); GL11.glBegin(GL11.GL_QUADS); RenderUtils.drawSolidBox(bb); GL11.glEnd(); GL11.glColor4f(0, 1, 1, 0.5F); GL11.glBegin(GL11.GL_LINES); RenderUtils.drawOutlinedBox(bb); GL11.glEnd(); GL11.glEndList(); normalChests = GL11.glGenLists(1); }
Example 18
Source File: Model.java From pycode-minecraft with MIT License | 4 votes |
public void genList() { this.glList = GL11.glGenLists(1); GL11.glNewList(this.glList, GL11.GL_COMPILE); // if use_texture: glEnable(GL_TEXTURE_2D) GL11.glFrontFace(GL11.GL_CCW); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glPolygonMode(GL11.GL_FRONT, GL11.GL_FILL); GL11.glDepthFunc(GL11.GL_LESS); GL11.glCullFace(GL11.GL_BACK); String currentMaterial = ""; Material mtl; for (Face face : this.faces) { if (!face.material.equals(currentMaterial)) { currentMaterial = face.material; mtl = this.materials.get(face.material); if (mtl == null) { GL11.glColor3f(1, 1, 1); } else { // if 'texture_Kd' in mtl: // # use diffuse texmap // glBindTexture(GL_TEXTURE_2D, mtl['texture_Kd']) GL11.glColor3f(mtl.diffuse.x, mtl.diffuse.y, mtl.diffuse.z); } } GL11.glBegin(GL11.GL_POLYGON); for (int i = 0; i < face.vertexes.size(); i++) { if (face.normals.get(i) != 0) { Vector3f n = this.normals.get(face.normals.get(i)); GL11.glNormal3f(n.x, n.y, n.z); } // if texture_coords[i]: // glTexCoord2fv(self.texcoords[texture_coords[i] - 1]) Vector3f v = this.vertices.get(face.vertexes.get(i)); GL11.glVertex3f(v.x, v.y, v.z); } GL11.glEnd(); } GL11.glCullFace(GL11.GL_BACK); GL11.glPolygonMode(GL11.GL_FRONT, GL11.GL_FILL); GL11.glDisable(GL11.GL_CULL_FACE); // if use_texture: glDisable(GL11.GL_TEXTURE_2D); GL11.glEndList(); }
Example 19
Source File: LwJglRenderingEngine.java From Gaalop with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void run() { startEngine(); //long start = System.currentTimeMillis(); while (!Display.isCloseRequested()) { //System.out.println(System.currentTimeMillis()-start); //start = System.currentTimeMillis(); if (rendering.isNewDataSetAvailable()) { if (list != -1) GL11.glDeleteLists(list, 1); list = GL11.glGenLists(1); GL11.glNewList(list, GL11.GL_COMPILE); draw(rendering.getDataSet(), rendering.getVisibleObjects(), rendering.getLoadedPointClouds()); GL11.glEndList(); changed = true; } GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); // clear the screen GL11.glLoadIdentity(); // apply camPos before rotation GL11.glTranslatef(0.0f, 0.0f, -5.0f); // draw GLU.gluLookAt(camPos.x, camPos.y, camPos.z, // Position camPos.x + camDir.x, camPos.y + camDir.y, camPos.z + camDir.z, // Lookat camUp.x, camUp.y, camUp.z); // Up-direction // apply rotation GL11.glRotatef(camAngleX, 0, 1, 0); // window x axis rotates around up vector GL11.glRotatef(camAngleY, 1, 0, 0); // window y axis rotates around x //Render the scene if (list != -1) GL11.glCallList(list); pollInput(); Display.update(); if (recorder != null) { if (changed || firstFrame) { recorder.makeScreenshot(); changed = false; } firstFrame = false; Display.sync(25); // cap fps to 60fps } else Display.sync(60); } Display.destroy(); }
Example 20
Source File: RenderModelBase.java From PneumaticCraft with GNU General Public License v3.0 | 4 votes |
public void renderModelAt(TileEntity tile, double d, double d1, double d2, float f){ GL11.glPushMatrix(); { if(model.getModelTexture(tile) != null) FMLClientHandler.instance().getClient().getTextureManager().bindTexture(model.getModelTexture(tile)); GL11.glTranslatef((float)d + 0.5F, (float)d1 + 1.5F, (float)d2 + 0.5F); GL11.glScalef(1.0F, -1F, -1F); if(model.rotateModelBasedOnBlockMeta()) { PneumaticCraftUtils.rotateMatrixByMetadata(tile.getBlockMetadata() % 6); } else { PneumaticCraftUtils.rotateMatrixByMetadata(2); } //TODO refactor when all models are converted: if(model instanceof BaseModel) { GL11.glTranslated(0, 24 / 16D, 0); GL11.glScalef(0.0625F, 0.0625F, 0.0625F); GL11.glEnable(GL12.GL_RESCALE_NORMAL); } model.renderDynamic(0.0625F, tile, f); //Get the right render list Integer renderList = renderLists.get(tile); if(renderList == null) { renderList = GL11.glGenLists(1); renderLists.put(tile, renderList); tilesRequiringRerender.add(tile); } //Rerender onto the list if necessary /* if(tilesRequiringRerender.contains(tile)) { tilesRequiringRerender.remove(tile); GL11.glNewList(renderList, GL11.GL_COMPILE);*/ GL11.glPushMatrix(); { model.renderStatic(0.0625F, tile); } GL11.glPopMatrix(); /* GL11.glEndList(); } //and actually render the static render GL11.glPushMatrix(); GL11.glCallList(renderList); GL11.glPopMatrix();*/ } GL11.glPopMatrix(); }