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:net.smert.frameworkgl.opengl.helpers.TextureHelper.java

License:Apache License

public void delete(int textureID) {
    GL11.glDeleteTextures(textureID);
}

From source file:net.wolf.wljglplayground.object.Texture.java

License:Open Source License

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

From source file:org.free.jake2.render.lwjgl.Image.java

License:Open Source License

void GL_FreeUnusedImages() {

    // never free r_notexture or particle texture
    r_notexture.registration_sequence = registration_sequence;
    r_particletexture.registration_sequence = registration_sequence;

    image_t image = null;//www.  j av a2 s  .  c  o  m

    for (int i = 0; i < numgltextures; i++) {
        image = gltextures[i];
        // used this sequence
        if (image.registration_sequence == registration_sequence) {
            continue;
        }
        // free image_t slot
        if (image.registration_sequence == 0) {
            continue;
        }
        // don't free pics
        if (image.type == it_pic) {
            continue;
        }

        // free it
        // TODO jogl bug
        texnumBuffer.clear();
        texnumBuffer.put(0, image.texnum);
        GL11.glDeleteTextures(texnumBuffer);
        image.clear();
    }
}

From source file:org.free.jake2.render.lwjgl.Image.java

License:Open Source License

void GL_ShutdownImages() {
    image_t image;/*  ww  w .  j a  v a2 s  . c  o m*/

    for (int i = 0; i < numgltextures; i++) {
        image = gltextures[i];

        if (image.registration_sequence == 0) {
            continue; // free image_t slot
        } // free it
        // TODO jogl bug
        texnumBuffer.clear();
        texnumBuffer.put(0, image.texnum);
        GL11.glDeleteTextures(texnumBuffer);
        image.clear();
    }
}

From source file:org.oscim.gdx.LwjglGL20.java

License:Apache License

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

From source file:org.oscim.gdx.LwjglGL20.java

License:Apache License

public void deleteTexture(int texture) {
    GL11.glDeleteTextures(texture);
}

From source file:org.spout.engine.filesystem.resource.ClientTexture.java

License:Open Source License

public void unload() {
    if (!isLoaded()) {
        throw new IllegalStateException("Cannot delete an unloaded texture!");
    }/*  ww w . j a  v  a  2 s.  c om*/

    GL11.glDeleteTextures(textureID);
    SpoutRenderer.checkGLError();
    textureID = -1;
}

From source file:org.spout.engine.resources.ClientTexture.java

License:Open Source License

public void unload() {
    if (textureID == -1) {
        throw new IllegalStateException("Cannot delete an unloaded texture!");
    }//from   w  w  w.  ja v a2 s  .c o  m

    GL11.glDeleteTextures(textureID);
    textureID = -1;
}

From source file:org.terasology.logic.manager.DefaultRenderingProcess.java

License:Apache License

public void deleteFBO(String title) {
    if (_FBOs.containsKey(title)) {
        FBO fbo = _FBOs.get(title);//from w  ww  . ja v a  2s.  c  om

        EXTFramebufferObject.glDeleteFramebuffersEXT(fbo.fboId);
        EXTFramebufferObject.glDeleteRenderbuffersEXT(fbo.depthRboId);
        GL11.glDeleteTextures(fbo.normalsTextureId);
        GL11.glDeleteTextures(fbo.depthTextureId);
        GL11.glDeleteTextures(fbo.textureId);
    }
}

From source file:org.terasology.logic.manager.PostProcessingRenderer.java

License:Apache License

public void deleteFBO(String title) {
    if (_FBOs.containsKey(title)) {
        FBO fbo = _FBOs.get(title);// ww w .j a v a 2 s. c o  m

        EXTFramebufferObject.glDeleteFramebuffersEXT(fbo._fboId);
        EXTFramebufferObject.glDeleteRenderbuffersEXT(fbo._depthRboId);
        GL11.glDeleteTextures(fbo._depthTextureId);
        GL11.glDeleteTextures(fbo._textureId);
    }
}