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:aphelion.client.resource.AsyncTextureLoader.java

License:Open Source License

@Override
public void loop(long systemNanoTime, long sourceNanoTime) {
    Integer textureID;//from   w ww  . java 2  s .c  o  m
    while ((textureID = releaseQueue.poll()) != null) {
        ByteBuffer temp = ByteBuffer.allocateDirect(4);
        temp.order(ByteOrder.nativeOrder());
        IntBuffer texBuf = temp.asIntBuffer();
        texBuf.put(textureID);
        texBuf.flip();

        GL11.glDeleteTextures(texBuf);
    }
}

From source file:ar.com.quark.backend.lwjgl.opengl.DesktopGLES20.java

License:Apache License

/**
 * {@inheritDoc}
 */
@Override
public void glDeleteTextures(int name) {
    GL11.glDeleteTextures(name);
}

From source file:com.adavr.player.globjects.Texture.java

License:Open Source License

@Override
public void destroy() {
    GL11.glDeleteTextures(id);
}

From source file:com.ardor3d.scene.state.lwjgl.LwjglTextureStateUtil.java

License:Open Source License

public static void deleteTexture(final Texture texture) {
    // ask for the current state record
    final RenderContext context = ContextManager.getCurrentContext();
    final TextureStateRecord record = (TextureStateRecord) context.getStateRecord(StateType.Texture);

    final Integer id = texture.getTextureIdForContextAsInteger(context.getGlContextRep());
    if (id.intValue() == 0) {
        // Not on card... return.
        return;//from ww  w. j a v  a2 s .  com
    }

    final IntBuffer idBuffer = BufferUtils.createIntBuffer(1);
    idBuffer.clear();
    idBuffer.put(id.intValue());
    idBuffer.rewind();
    GL11.glDeleteTextures(idBuffer);
    record.removeTextureRecord(id);
    texture.removeFromIdCache(context.getGlContextRep());
}

From source file:com.ardor3d.scene.state.lwjgl.LwjglTextureStateUtil.java

License:Open Source License

public static void deleteTextureIds(final Collection<Integer> ids) {
    // ask for the current state record
    final RenderContext context = ContextManager.getCurrentContext();
    final TextureStateRecord record = (TextureStateRecord) context.getStateRecord(StateType.Texture);

    final IntBuffer idBuffer = BufferUtils.createIntBuffer(ids.size());
    idBuffer.clear();//from   w  w w . jav  a  2 s  . c om
    for (final Integer i : ids) {
        if (i != null) {
            idBuffer.put(i);
            record.removeTextureRecord(i);
        }
    }
    idBuffer.flip();
    if (idBuffer.remaining() > 0) {
        GL11.glDeleteTextures(idBuffer);
    }
}

From source file:com.auroraengine.opengl.GLTexture.java

License:Open Source License

@Override
public void destroy() {
    if (tex_ref != 0) {
        GL11.glDeleteTextures(tex_ref);
        tex_ref = 0;
    }
}

From source file:com.badlogic.gdx.backends.jglfw.JglfwGL20.java

License:Apache License

public void glDeleteTextures(int n, IntBuffer textures) {
    GL11.glDeleteTextures(textures);
}

From source file:com.badlogic.gdx.backends.lwjgl.LwjglGL10.java

License:Apache License

public final void glDeleteTextures(int n, IntBuffer textures) {
    GL11.glDeleteTextures(textures);
}

From source file:com.badlogic.gdx.backends.lwjgl.LwjglGL10.java

License:Apache License

public final void glDeleteTextures(int n, int[] textures, int offset) {
    GL11.glDeleteTextures(toBuffer(n, textures, offset));
}

From source file:com.badlogic.gdx.backends.lwjgl.LwjglGL20.java

License:Apache License

@Override
public void glDeleteTexture(int texture) {
    GL11.glDeleteTextures(texture);
}