There have been earlier discussions
here about using using enums in processing, now I've found a half decent reason to use them in processing-2.0 to control state. In this example at
openprocessing I avoid unnecessarily updating the retained shape (Vertex Buffer Object see Andres
blog) using enums as a crude state control. I hope that this sketch is useful for anyone who wants to take advantage of the new retained shape functionality. It was expected with the introduction of processing-2.0 that opengl sketches would display in the browser, sadly this is still not the case at openprocessing (although for a brief period my sketches did work there as Andres
mentions).
Processing Forum