Java Code Examples for org.lwjgl.opengl.GL11#glDeleteLists()

The following examples show how to use org.lwjgl.opengl.GL11#glDeleteLists() . 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: AutoFarmHack.java    From Wurst7 with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void onDisable()
{
	EVENTS.remove(UpdateListener.class, this);
	EVENTS.remove(RenderListener.class, this);
	
	if(currentBlock != null)
	{
		IMC.getInteractionManager().setBreakingBlock(true);
		MC.interactionManager.cancelBlockBreaking();
		currentBlock = null;
	}
	
	prevBlocks.clear();
	GL11.glDeleteLists(displayList, 1);
	GL11.glDeleteLists(box, 1);
	GL11.glDeleteLists(node, 1);
}
 
Example 2
Source File: FreecamHack.java    From Wurst7 with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void onDisable()
{
	EVENTS.remove(UpdateListener.class, this);
	EVENTS.remove(PacketOutputListener.class, this);
	EVENTS.remove(IsPlayerInWaterListener.class, this);
	EVENTS.remove(PlayerMoveListener.class, this);
	EVENTS.remove(CameraTransformViewBobbingListener.class, this);
	EVENTS.remove(IsNormalCubeListener.class, this);
	EVENTS.remove(SetOpaqueCubeListener.class, this);
	EVENTS.remove(RenderListener.class, this);
	
	fakePlayer.resetPlayerPosition();
	fakePlayer.despawn();
	
	ClientPlayerEntity player = MC.player;
	player.setVelocity(Vec3d.ZERO);
	
	MC.worldRenderer.reload();
	
	GL11.glDeleteLists(playerBox, 1);
	playerBox = 0;
}
 
Example 3
Source File: MobSpawnEspHack.java    From Wurst7 with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void onDisable()
{
	EVENTS.remove(UpdateListener.class, this);
	EVENTS.remove(PacketInputListener.class, this);
	EVENTS.remove(RenderListener.class, this);
	
	for(ChunkScanner scanner : new ArrayList<>(scanners.values()))
	{
		if(scanner.displayList != 0)
			GL11.glDeleteLists(scanner.displayList, 1);
		
		scanners.remove(scanner.chunk);
	}
	
	pool.shutdownNow();
}
 
Example 4
Source File: ManualDisplayList.java    From OpenModsLib with MIT License 5 votes vote down vote up
public void compile(Renderer renderer) {
	if (isAllocated) GL11.glDeleteLists(displayList, 1);

	displayList = GL11.glGenLists(1);
	GL11.glNewList(displayList, GL11.GL_COMPILE);
	renderer.render();
	GL11.glEndList();

	isAllocated = isValid = true;
}
 
Example 5
Source File: LwjglMesh.java    From tectonicus with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void destroy()
{
	if (hasDisplayList)
	{
		GL11.glDeleteLists(displayList, 1);
		displayList = 0;
		hasDisplayList = false;
	}
}
 
Example 6
Source File: SearchHack.java    From Wurst7 with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onDisable()
{
	EVENTS.remove(UpdateListener.class, this);
	EVENTS.remove(PacketInputListener.class, this);
	EVENTS.remove(RenderListener.class, this);
	
	stopPool2Tasks();
	pool1.shutdownNow();
	pool2.shutdownNow();
	GL11.glDeleteLists(displayList, 1);
	chunksToUpdate.clear();
}
 
Example 7
Source File: PlayerEspHack.java    From Wurst7 with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onDisable()
{
	EVENTS.remove(UpdateListener.class, this);
	EVENTS.remove(CameraTransformViewBobbingListener.class, this);
	EVENTS.remove(RenderListener.class, this);
	
	GL11.glDeleteLists(playerBox, 1);
	playerBox = 0;
}
 
Example 8
Source File: MobEspHack.java    From Wurst7 with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onDisable()
{
	EVENTS.remove(UpdateListener.class, this);
	EVENTS.remove(CameraTransformViewBobbingListener.class, this);
	EVENTS.remove(RenderListener.class, this);
	
	GL11.glDeleteLists(mobBox, 1);
	mobBox = 0;
}
 
Example 9
Source File: CaveFinderHack.java    From Wurst7 with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onDisable()
{
	EVENTS.remove(UpdateListener.class, this);
	EVENTS.remove(PacketInputListener.class, this);
	EVENTS.remove(RenderListener.class, this);
	
	stopPool2Tasks();
	pool1.shutdownNow();
	pool2.shutdownNow();
	GL11.glDeleteLists(displayList, 1);
	chunksToUpdate.clear();
}
 
Example 10
Source File: ChestEspHack.java    From Wurst7 with GNU General Public License v3.0 5 votes vote down vote up
private void deleteDisplayLists()
{
	GL11.glDeleteLists(greenBox, 1);
	GL11.glDeleteLists(orangeBox, 1);
	GL11.glDeleteLists(cyanBox, 1);
	GL11.glDeleteLists(purpleBox, 1);
	GL11.glDeleteLists(normalChests, 1);
}
 
Example 11
Source File: MobSpawnEspHack.java    From ForgeWurst with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void onDisable()
{
	MinecraftForge.EVENT_BUS.unregister(this);
	
	for(ChunkScanner scanner : new ArrayList<>(scanners.values()))
	{
		if(scanner.displayList != 0)
			GL11.glDeleteLists(scanner.displayList, 1);
		
		scanners.remove(scanner.chunk);
	}
	
	pool.shutdownNow();
}
 
Example 12
Source File: ItemEspHack.java    From ForgeWurst with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void onDisable()
{
	MinecraftForge.EVENT_BUS.unregister(this);
	
	GL11.glDeleteLists(itemBox, 1);
	itemBox = 0;
}
 
Example 13
Source File: AutoFishHack.java    From ForgeWurst with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void onDisable()
{
	MinecraftForge.EVENT_BUS.unregister(this);
	GL11.glDeleteLists(box, 1);
	GL11.glDeleteLists(cross, 1);
}
 
Example 14
Source File: PlayerEspHack.java    From ForgeWurst with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void onDisable()
{
	MinecraftForge.EVENT_BUS.unregister(this);
	
	GL11.glDeleteLists(playerBox, 1);
	playerBox = 0;
}
 
Example 15
Source File: MobEspHack.java    From ForgeWurst with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void onDisable()
{
	MinecraftForge.EVENT_BUS.unregister(this);
	
	GL11.glDeleteLists(mobBox, 1);
	mobBox = 0;
}
 
Example 16
Source File: DisplayListWrapper.java    From OpenModsLib with MIT License 4 votes vote down vote up
/**
 * WARNING: this method can be only used in client (rendering) thread. If not possible, use {@link #invalidate()}.
 */
public void reset() {
	if (isValid) GL11.glDeleteLists(displayList, 1);
	pendingInvalidate = isValid = false;
}
 
Example 17
Source File: XRay.java    From ehacks-pro with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onModuleDisabled() {
    if (displayListId != 0) {
        GL11.glDeleteLists(displayListId, 1);
    }
}
 
Example 18
Source File: LwJglRenderingEngine.java    From Gaalop with GNU Lesser General Public License v3.0 4 votes vote down vote up
@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();
}