The GUI
The GUI ( Graphical User Interface ) was the single most difficult aspect of the entire assignment. There are at least six different GUI libraries available for processing, however almost none of them worked in OpenGL mode. The only one that was available to me was one called "controlp5". Essentially the GUI had to allow a few things. It had to allow users to add and edit objects - so it had to be able to draw gui elements dynamically. It also had to be *seen* in openGL mode, without graphical corruption. Finally it had to be lightweight, and non obtrusive.
Problems
The GUI could have killed me. Originally I experimented with creating my own GUI library, but this would take forever. I switched quickly to the most acceptable of the GUI Libraries - "controlp5". I encountered every problem underneath the sun. GUI elements not working with OpenGL, Crashes, Missing Library Methods and Features. I must have posted about 20 times on the processing forums for help. Sojamo, creator of controlp5 was an immense help and edited the GUI Library for me personally about 5 times. Eventually I came up with something which wasn't great, but which worked.
The Implementation
The Final GUI was a compromise. I used the controlp5 "tabs" system for each of the elements, but the menu creations were not as dynamic as I would have liked. Each "element" had its own 'create/edit element' function which drew the gui and all the elements on it. Unfortunately I was only able to code these in such a way that only one Tab could be opened at a time. The ability to create, edit, and reference GUI elements on-the-fly is something which controlp5 lacks. One of the features I also added was the menu which controls the adding/removing/editing and selection of presets, this was the one aspect I had little, to no problems with. The only problem being when an element was removed, it is impossible to remove one of those elements from the menu. Intsead, I renamed it to -removed-. This was an ugly solution, but it worked. Other issues included text not appearing in textboxes until something was typed, and objects not being removed correctly.