Example usage for org.lwjgl.opengl GL11 glDeleteTextures

List of usage examples for org.lwjgl.opengl GL11 glDeleteTextures

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL11 glDeleteTextures.

Prototype

public static void glDeleteTextures(@NativeType("GLuint const *") int[] textures) 

Source Link

Document

Array version of: #glDeleteTextures DeleteTextures

Usage

From source file:com.samrj.devil.gl.Texture.java

License:Open Source License

@Override
final void delete() {
    Profiler.removeUsedVRAM(vramUsage);
    GL11.glDeleteTextures(id);
    deleted = true;
}

From source file:com.telinc1.rpjg.texture.Texture.java

License:Apache License

public void dispose() {
    if (this.exists()) {
        Logger.info("Destroying texture {}.", this.getID());

        GL11.glDeleteTextures(this.getID());
        this.setID(0);
    }/*from  www  . j ava  2s  . c  o  m*/
}

From source file:com.voxelplugineering.voxelsniper.render.TextureManager.java

License:Open Source License

public void destroy() {
    for (String t : this.textures.keySet()) {
        GL11.glDeleteTextures(this.textures.get(t));
    }
}

From source file:com.xrbpowered.gl.res.buffers.OffscreenBuffers.java

License:Open Source License

@Override
public void destroy() {
    GL30.glDeleteFramebuffers(fbo);
    GL11.glDeleteTextures(colorTexId);
    if (depthTexId > 0)
        GL11.glDeleteTextures(depthTexId);
}

From source file:com.xrbpowered.gl.res.textures.ArrayTexture.java

License:Open Source License

public void destroy() {
    GL11.glDeleteTextures(texId);
}

From source file:cuchaz.jfxgl.prism.JFXGLContext.java

License:Open Source License

@Override
public int createTexture(int width, int height) {

    int texId = GL11.glGenTextures();
    if (texId == 0) {
        return 0;
    }//from   w  w  w . ja v a2 s.c  om

    GL11.glBindTexture(GL11.GL_TEXTURE_2D, texId);

    // make the texture
    clearGLErrors();
    GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA, width, height, 0, GL11.GL_RGBA,
            GL11.GL_UNSIGNED_BYTE, 0);

    // if something bad happened, delete the texture
    if (hasGLError()) {
        GL11.glDeleteTextures(texId);
        return 0;
    }

    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);

    return texId;
}

From source file:cuchaz.jfxgl.prism.JFXGLContext.java

License:Open Source License

@Override
public void deleteTexture(int texId) {
    GL11.glDeleteTextures(texId);
}

From source file:dataAccess.lwjgl.VAO_Loader.java

/**
 * Cleans the memory of all VAO's and VBO's.
 *//*  w  ww.j  ava  2 s . com*/
public static void cleanUp() {
    vaos.forEach(x -> GL30.glDeleteVertexArrays(x));
    vbos.forEach(x -> GL15.glDeleteBuffers(x));
    textureMap.values().forEach(x -> GL11.glDeleteTextures(x));
}

From source file:de.sanandrew.mods.turretmod.client.render.world.RenderTurretCam.java

License:Creative Commons License

public static void cleanupRenderers(final boolean clearAll) {
    TURRETS.forEach((turret, camEntry) -> {
        if (clearAll) {
            camEntry.active = false;//  w  w w.jav  a  2  s.  com
        }
        if (!camEntry.active) {
            GL11.glDeleteTextures(camEntry.textureId);
        }
    });
    TURRETS.entrySet()
            .removeIf(entry -> entry.getKey() == null || entry.getValue() == null || !entry.getValue().active);
}

From source file:edu.csun.ecs.cs.multitouchj.ui.graphic.image.TextureHandler.java

License:Apache License

private boolean deleteTextureId(Integer textureId) {
    textureIdBuffer.clear();/*from  www. j  a  va 2 s .c o  m*/
    textureIdBuffer.put(textureId.intValue());
    textureIdBuffer.flip();
    GL11.glDeleteTextures(textureIdBuffer);

    System.out.println("Deleting texture id: " + textureId.intValue());

    return true;
}