I am trying to develop a multitouch application for vjing ant trying to make Processing and vvvv talk. what I am trying to do is to send a video from vvvv to Processing in some way, maybe as a streaming via UDP.
First of all, I am new to the forum and I would like to thank everybody for the great work!
and here is my question...
I am trying to develop a multitouch application that make use of fiducials as well. I would like to create a menu with controlP5 every time I add a fiducial to my application. For developing I am using the TUIO simulator. As starting point I am using the TUIO demo sketch that comes with the TUIO library.
the problem is that most of the time (but not always!) when I initiate a new controller inside the addTuioObject() function I get a 'java.lang.NullPointerException'
my doubt is if it's possible to create a controller outside the setup() function and if I am doing it the right way...
moreover, after I've added a certain number of controllers to my sketch I also get this other exception 'Exception in thread "Animation Thread" java.lang.RuntimeException: pushMatrix() cannot use push more than 32 times'.
I am not sure, but I think those two errors are connected.
Here is the code, hope someone could help me out!
thanx in advance
import TUIO.*;
import controlP5.*;
TuioProcessing tuioClient;
ControlP5 controlP5;
Button menu;
ListBox lista;
// these are some helper variables which are used
// to create scalable graphical feedback
float cursor_size = 15;
float object_size = 60;
float table_size = 760;
float scale_factor = 1;
PFont font;
void setup()
{
//size(screen.width,screen.height);
size(640,480);
noStroke();
fill(0);
loop();
frameRate(30);
//noLoop();
hint(ENABLE_NATIVE_FONTS);
font = createFont("Arial", 18);
scale_factor = height/table_size;
// we create an instance of the TuioProcessing client
// since we add "this" class as an argument the TuioProcessing class expects
// an implementation of the TUIO callback methods (see below)
tuioClient = new TuioProcessing(this);
controlP5 = new ControlP5(this);
}
// within the draw method we retrieve a Vector (List) of TuioObject and TuioCursor (polling)
// from the TuioProcessing client and then loop over both lists to draw the graphical feedback.