I've tried searching the forum for a solution to this but I'm stumped! I'm following the guidelines posted here to create library events:
http://code.google.com/p/processing/wiki/LibraryBasics#Adding_Your_Own_Library_Events To create my own library events but for some reason my library can't find the 'fancyMethod' method in my applet? My code is taken straight from the example posted on the above page? My contructor looks like this:
try {
fancyEventMethod =
myParent.getClass().getMethod("fancyEvent",
new Class[] { Csoundo.class });
} catch (Exception e) {
System.out.println("no such method...");
// no such method, or an error.. which is fine, just ignore
}
But fancyEventMethod is always NULL? In my processing code I have the following method:
void fancyEvent() {
println("works!!!");
}
I can't see why getClass().getMethod() is returning NULL when the method clearly exists? Any ideas?
Is it possible to run the OpenCV Processing library with OpenCV 2.0? I'm getting the following errors, which to me seems like the openCV processing lib is trying to link to openCV1.0?
libcxcore.so.1: cannot open shared object file: No such file or directory
Verify that the java.library.path property is correctly set and 'libcxcore.so', 'libcv.so', 'libcvaux.so', 'libml.so', and 'libhighgui.so' are placed (or linked) in one of your system shared libraries folder
I add /usr/local/ib to the the java.library.path on startup. Running 'ls /usr/loca/lib' shows the following files:
I'm sending data from an audio application to Processing using OSC. I then use this data to place images on my sketch. After a while things start to get sluggish. My audio program does do quite a lot of fft analysis and so fort so I expect most of the CPU is being eaten by that. My question for the group is this, every time I lay an image onto my sketch does that somehow take up more and more memory? Is every instance of an image another layer for example? I've reduced my code to give you an idea of what I'm at.
void setup() {
a[0] = loadImage("concept03-01.png"); // Load the image into array
a[1] = loadImage("concept03-02.png"); // Load the image into array
a[2] = loadImage("concept03-03.png"); // Load the image into array
a[3] = loadImage("concept03-04.png"); // Load the image into array
a[4] = loadImage("concept03-05.png"); // Load the image into array
a[5] = loadImage("concept03-06.png"); // Load the image into array
a[6] = loadImage("concept03-07.png"); // Load the image into array
a[7] = loadImage("concept03-08.png"); // Load the image into array
a[8] = loadImage("concept03-09.png"); // Load the image into array
a[9] = loadImage("concept03-10.png"); // Load the image into array
size(640, 480);
frameRate(15);
}
void draw(){
float y = random(480);
float x = random(640);
int img = random(10);
image(a[img], x, y, a[img].width, a[img].height);
}
Is the above code about as efficient as it possibly can be? Sorry if this is a silly question, I've never done anything with graphics before.
Pardon me if this topic has come up before but I couldn't find any answers to it in the archive. If there a function that will force the sketch to run at full screen? I have being using screen.getWidth() etc and running things with 'Present' but I can still see my task bar. If there a way to go to 'full' full screen?