Code example for GL11

Methods: glDeleteTextures

0
 
    protected abstract void freeBitmap(Bitmap bitmap);
 
    public void deleteFromGL() { 
        if (mState == STATE_LOADED) {
            mGL.glDeleteTextures(1, new int[]{mId}, 0);
        } 
        mState = STATE_UNLOADED;
    } 
 
    private void uploadToGL(GL11 gl) throws GLOutOfMemoryException {
        Bitmap bitmap = getBitmap();
        int glError = GL11.GL_NO_ERROR;
        if (bitmap != null) {
            int[] textureId = new int[1];
            try { 
                // Define a vertically flipped crop rectangle for 
                // OES_draw_texture. 
                int[] cropRect = {0,  mHeight, mWidth, - mHeight};