diff --git a/core/todo.txt b/core/todo.txt index 46139da55..0fc7a5ac0 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -71,6 +71,22 @@ X http://dev.processing.org/bugs/show_bug.cgi?id=564 X added min() and max() for float and int arrays _ need to update reference X moved around min/max functions +X opengl image memory leaking +X when creating a new PImage on every frame, slurps a ton of memory +X workaround is to write the code properly, but suggests something bad +X http://dev.processing.org/bugs/show_bug.cgi?id=150 + +new bugs (organize later) +_ opengl crashes when depth sorting more than two textured shapes +_ http://dev.processing.org/bugs/show_bug.cgi?id=560 +_ replaceAll() not supported by 1.1 +_ http://dev.processing.org/bugs/show_bug.cgi?id=561 + +ewjordan stuff +_ Polygons parallel to z-axis not always filling with nonzero x or y +_ http://dev.processing.org/bugs/show_bug.cgi?id=547 +_ strange texture warping in P3D +_ http://dev.processing.org/bugs/show_bug.cgi?id=103 _ loadBytes() doesn't do auto gunzip? but loadStrings and createReader do? _ this might be a good solution for dealing with the differences @@ -897,9 +913,6 @@ _ otherwise can crash the whole browser _ get rid of some of the sillier IntBuffer stuff where it's not needed _ use the version of the prototypes that use an offset into the array _ need to test performance either way -_ when creating a new PImage on every frame, slurps a ton of memory -_ workaround is to write the code properly, but suggests something bad -_ http://dev.processing.org/bugs/show_bug.cgi?id=150 _ make a note about the anti-aliasing types in the faq _ polygon vs line etc.. may want to enable lines but disable polys _ invocationtargetexception in gl with aioobe: diff --git a/opengl/src/processing/opengl/PGraphicsOpenGL.java b/opengl/src/processing/opengl/PGraphicsOpenGL.java index e5853b439..b76912aa5 100644 --- a/opengl/src/processing/opengl/PGraphicsOpenGL.java +++ b/opengl/src/processing/opengl/PGraphicsOpenGL.java @@ -810,29 +810,37 @@ public class PGraphicsOpenGL extends PGraphics3D { static int maxTextureSize; + int[] deleteQueue = new int[10]; + int deleteQueueCount = 0; + class ImageCache { int tindex = -1; // not yet ready int tpixels[]; IntBuffer tbuffer; int twidth, theight; - /* - public ImageCache(PImage image) { - tindex = -1; // mark the texture as uninited - prepare(image); + int[] tp; - // first-time binding of entire texture - gl.glEnable(GL.GL_TEXTURE_2D); - - gl.glDisable(GL.GL_TEXTURE_2D); + protected void finalize() { + if (deleteQueue.length == deleteQueueCount) { + deleteQueue = (int[]) PApplet.expand(deleteQueue); + } + if (tindex != -1) { + deleteQueue[deleteQueueCount++] = tindex; + } } - */ /** * Generate a texture ID and do the necessary bitshifting for the image. */ public void rebind(PImage source) { + if (deleteQueueCount != 0) { + //gl.glDeleteTextures(1, new int[] { tindex }, 0); + gl.glDeleteTextures(deleteQueueCount, deleteQueue, 0); + deleteQueueCount = 0; + } + //System.out.println("rebinding texture for " + source); if (tindex != -1) { // free up the old memory @@ -842,6 +850,7 @@ public class PGraphicsOpenGL extends PGraphics3D { int[] tmp = new int[1]; gl.glGenTextures(1, tmp, 0); tindex = tmp[0]; + //System.out.println("got index " + tindex); // bit shifting this might be more efficient int width2 = nextPowerOfTwo(source.width); diff --git a/todo.txt b/todo.txt index 486bcea19..81f40a47e 100644 --- a/todo.txt +++ b/todo.txt @@ -42,6 +42,16 @@ X http://dev.processing.org/bugs/show_bug.cgi?id=357 X ignore ._ files when reading jar and zip X Ignoring /Users/fry/coconut/processing/build/macosx/work/libraries/opengl/library/._jogl-natives-linux-i586.jar (error in opening zip file) +new bugs +_ huge jar files from 0124 export +_ http://dev.processing.org/bugs/show_bug.cgi?id=541 +_ if someone has monaco disabled in font book, the app won't start +_ http://dev.processing.org/bugs/show_bug.cgi?id=562 + + +0126 +_ do the big move to multiple sketches open +_ finish up debian package support (see the processing.mess folder) _ xml element needs to be readable from other charsets _ same with the other methods like loadStrings()