Oops, did not know that !
And yes, it was worth trying: The exception disappears when I follow your advice !
Thnx - but:
The sketch now runs for a few seconds (2-3 sec) and then I get an OutOfMemoryError in this
small sketch. My Memory setting in the Prefs is 1600MB.
If I REDUCE my available memory setting in the Preference to 1000MB the sketch runs longer (20 sec)but then I get again an OutOfMemorryError...
Any ideas on that ?
..and strange enough sometimes a get an java.lang.outofmemoryerror, this one
Exception in thread "Animation Thread" java.lang.OutOfMemoryError.
This happens again on vista and xp...
Exception in thread "Animation Thread" java.lang.OutOfMemoryError
at sun.misc.Unsafe.allocateMemory(Native Method)
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:102)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
at com.sun.opengl.util.BufferUtil.newByteBuffer(BufferUtil.java:65)
at com.sun.opengl.util.BufferUtil.copyIntBufferAsByteBuffer(BufferUtil.java:229)
at javax.media.opengl.glu.GLU.copyToByteBuffer(GLU.java:1450)
at javax.media.opengl.glu.GLU.gluBuild2DMipmapsJava(GLU.java:1524)
at javax.media.opengl.glu.GLU.gluBuild2DMipmaps(GLU.java:1581)
at processing.opengl.PGraphicsOpenGL$ImageCache.rebind(Unknown Source)
at processing.opengl.PGraphicsOpenGL.bindTexture(Unknown Source)
at codeanticode.glgraphics.GLGraphics.renderTriangles(Unknown Source)
at processing.core.PGraphics3D.endShape(Unknown Source)
at processing.core.PGraphics.endShape(Unknown Source)
at processing.core.PGraphics.imageImpl(Unknown Source)
at processing.core.PGraphics.image(Unknown Source)
at processing.core.PApplet.image(Unknown Source)
at testOpenNiGLGraphics.draw(testOpenNiGLGraphics.java:47)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError