@Override public void newTextureReady(int texture, GLTextureOutputRenderer source) { if (filterLocations.size() < 2 || !source.equals(filterLocations.get(0))) { clearRegisteredFilterLocations(); registerFilterLocation(source, 0); registerFilterLocation(this, 1); } if (lookup_texture == 0) { lookup_texture = ImageHelper.bitmapToTexture(lookupBitmap); } super.newTextureReady(lookup_texture, this); super.newTextureReady(texture, source); }
@Override public void destroy() { super.destroy(); if (lookup_texture != 0) { int[] tex = new int[1]; tex[0] = lookup_texture; GLES20.glDeleteTextures(1, tex, 0); lookup_texture = 0; } }