I have a question:
In the Processing 2.0 revisions.txt it reads for
PROCESSING 2.0a6
+ Fix whitespace issue with XML http://code.google.com/p/processing/issues/detail?id=975
I know it has been discussed before, but somehow I am still confused and don't
understand this: If I open the "LoadingXMLObjects" example on Processing 2.08
and add println(xml.getChildCount()); or println(xml.getChildren().length);
(which is equivalent) I both times get the result "7",
allthough it should be "3".
It seems a whitespace is still counted as a child.
Is that a known bug that is not fixable?
Hey folks,
I usually run my programs on Mac, but want to export an application that will run both on Mac and Windows. My exported application which runs well on Mac doesnt run on Windows.
I downloaded Processing 2.06alpha for windows and tried to run any OpenGL examples on there and I always get the same mistake, see below. Any ideas? Thanks for your help!
GLException: Method "glBlendEquation" not available
My configurations: Processing 2.06alpha on Windows 7
Java Build 1.6.0_33-b03
Graphic Card: NVIDIA GeForce 7025/NVIDIA nForce 630a
The error code:
java.lang.NullPointerException
at processing.mode.java.runner.Runner.findException(Runner.java:618)
at processing.mode.java.runner.Runner.reportException(Runner.java:563)
at processing.mode.java.runner.Runner.exception(Runner.java:503)
at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367)
at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255)
at processing.mode.java.runner.EventThread.run(EventThread.java:89)
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Method "glBlendEquation" not available
at jogamp.opengl.gl4.GL4bcImpl.glBlendEquation(GL4bcImpl.java:688)
at processing.opengl.PGL.glBlendEquation(Unknown Source)
at processing.opengl.PGraphicsOpenGL.getGLParameters(Unknown Source)
at processing.opengl.PGraphicsOpenGL.beginDraw(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.opengl.PGL$PGLListener.display(Unknown Source)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:189)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:177)
at javax.media.opengl.awt.GLCanvas$DisplayAction.run(GLCanvas.java:934)
java.lang.NullPointerException
at processing.mode.java.runner.Runner.findException(Runner.java:618)
at processing.mode.java.runner.Runner.reportException(Runner.java:563)
at processing.mode.java.runner.Runner.exception(Runner.java:503)
at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367)
at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255)
at processing.mode.java.runner.EventThread.run(EventThread.java:89)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364)
at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:833)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:419)
at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:519)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:310)
at java.awt.Component.dispatchEventImpl(Component.java:4727)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "Animation Thread" javax.media.opengl.GLException: javax.media.opengl.GLException: Method "glBlendEquation" not available
at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:98)
at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:196)
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:164)
at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:831)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:419)
at processing.opengl.PGL.requestDraw(Unknown Source)
at processing.opengl.PGraphicsOpenGL.requestDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.media.opengl.GLException: Method "glBlendEquation" not available
at jogamp.opengl.gl4.GL4bcImpl.glBlendEquation(GL4bcImpl.java:688)
at processing.opengl.PGL.glBlendEquation(Unknown Source)
at processing.opengl.PGraphicsOpenGL.getGLParameters(Unknown Source)
at processing.opengl.PGraphicsOpenGL.beginDraw(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.opengl.PGL$PGLListener.display(Unknown Source)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:189)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:177)
at javax.media.opengl.awt.GLCanvas$DisplayAction.run(GLCanvas.java:934)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364)
at javax.media.opengl.awt.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:951)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:641)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:611)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
java.lang.NullPointerException
at processing.mode.java.runner.Runner.findException(Runner.java:618)
at processing.mode.java.runner.Runner.reportException(Runner.java:563)
at processing.mode.java.runner.Runner.exception(Runner.java:503)
at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367)
at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255)
at processing.mode.java.runner.EventThread.run(EventThread.java:89)
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Method "glBlendEquation" not available
at jogamp.opengl.gl4.GL4bcImpl.glBlendEquation(GL4bcImpl.java:688)
at processing.opengl.PGL.glBlendEquation(Unknown Source)
at processing.opengl.PGraphicsOpenGL.getGLParameters(Unknown Source)
at processing.opengl.PGraphicsOpenGL.beginDraw(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.opengl.PGL$PGLListener.display(Unknown Source)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:189)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:177)
at javax.media.opengl.awt.GLCanvas$DisplayAction.run(GLCanvas.java:934)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364)
at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:833)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:419)
at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:519)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:310)
at java.awt.Component.dispatchEventImpl(Component.java:4727)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
java.lang.NullPointerException
at processing.mode.java.runner.Runner.findException(Runner.java:618)
at processing.mode.java.runner.Runner.reportException(Runner.java:563)
at processing.mode.java.runner.Runner.exception(Runner.java:503)
at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367)
at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255)
at processing.mode.java.runner.EventThread.run(EventThread.java:89)
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Method "glBlendEquation" not available
at jogamp.opengl.gl4.GL4bcImpl.glBlendEquation(GL4bcImpl.java:688)
at processing.opengl.PGL.glBlendEquation(Unknown Source)
at processing.opengl.PGraphicsOpenGL.getGLParameters(Unknown Source)
at processing.opengl.PGraphicsOpenGL.beginDraw(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.opengl.PGL$PGLListener.display(Unknown Source)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:189)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:177)
at javax.media.opengl.awt.GLCanvas$DisplayAction.run(GLCanvas.java:934)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364)
at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:833)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:419)
at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:519)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:310)
at java.awt.Component.dispatchEventImpl(Component.java:4727)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
java.lang.NullPointerException
at processing.mode.java.runner.Runner.findException(Runner.java:618)
at processing.mode.java.runner.Runner.reportException(Runner.java:563)
at processing.mode.java.runner.Runner.exception(Runner.java:503)
at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367)
at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255)
at processing.mode.java.runner.EventThread.run(EventThread.java:89)
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Method "glBlendEquation" not available
at jogamp.opengl.gl4.GL4bcImpl.glBlendEquation(GL4bcImpl.java:688)
at processing.opengl.PGL.glBlendEquation(Unknown Source)
at processing.opengl.PGraphicsOpenGL.getGLParameters(Unknown Source)
at processing.opengl.PGraphicsOpenGL.beginDraw(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.opengl.PGL$PGLListener.display(Unknown Source)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:189)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:177)
at javax.media.opengl.awt.GLCanvas$DisplayAction.run(GLCanvas.java:934)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364)
at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:833)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:419)
at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:519)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:310)
at java.awt.Component.dispatchEventImpl(Component.java:4727)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
java.lang.NullPointerException
at processing.mode.java.runner.Runner.findException(Runner.java:618)
at processing.mode.java.runner.Runner.reportException(Runner.java:563)
at processing.mode.java.runner.Runner.exception(Runner.java:503)
at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367)
at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255)
at processing.mode.java.runner.EventThread.run(EventThread.java:89)
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Method "glBlendEquation" not available
at jogamp.opengl.gl4.GL4bcImpl.glBlendEquation(GL4bcImpl.java:688)
at processing.opengl.PGL.glBlendEquation(Unknown Source)
at processing.opengl.PGraphicsOpenGL.getGLParameters(Unknown Source)
at processing.opengl.PGraphicsOpenGL.beginDraw(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.opengl.PGL$PGLListener.display(Unknown Source)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:189)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:177)
at javax.media.opengl.awt.GLCanvas$DisplayAction.run(GLCanvas.java:934)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364)
at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:833)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:419)
at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:519)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:310)
at java.awt.Component.dispatchEventImpl(Component.java:4727)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
float[][] points = new float[3][2]; points[0][0] = 120; // first point, x points[0][1] = 230; // first point, y points[1][0] = 150; // second point, x points[1][1] = 105; // second point, y points[2][0] = 320; // third point, x points[2][1] = 113; // third point, y Voronoi myVoronoi = new Voronoi( points );
MPolygon[] myRegions = myVoronoi.getRegions(); for(int i=0; i<myRegions.length; i++) { // an array of points float[][] regionCoordinates = myRegions[i].getCoords(); fill(255,0,0); myRegions[i].draw(this); // draw this shape }