as the title says I'd like to show the content of one sketch in another sketch. I send the pixel array with the built-in network library but the transfer is very slow even with a window size of 200 x 200. Basically I do the following:
Server:
Convert pixels array to byte array.
Merge all byte arrays.
Send byte array to client.
Client:
Wait, till there are more ( or as many) pixels as there are in the clients window ( the client's window dimension is the same as the server's window dimension).
Convert byte array into seperate byte arrays for each pixel.
Hello,
I've got a performance related question. I've made a test program in Processing and Java, but I don't unterstand the result of the Processing sketch. There are three types of functions:
1) swaps two array values ->
swap() 2 ) 1 + returns the array ->
swap2() 3) 2 + assigns the result to the old array ->
a = swap2()
The result in Java ( as expected from fastest to slowest): swap() -> swap2() -> a = swap2()
The result in Processing: a = swap2() -> swap2() -> swap() (
= reversed)
Can anyone explain me this behaviour or did I made a silly mistake?
Thanks in advance.
Results in Processing (10 tries):
Java:
public class Test {
static int n = 100000000; static int[] a = { 1, 2 }; static long std;
I took a look at Daniel Shiffman's article about
Emails in Processing and a tried to make a simplified version of it. With this code you can receive emails with pop3 from Hotmail and Gmail and sent emails with smtp in Gmail. Unfortunately you can't do both in one sketch and you have to include pop3.jar in the sketch althouch it is included in the Java Mail API.
Receive emails (example):
ControlP5 controlP5 = new ControlP5(this); controlP5.setAutoDraw(false);
When I use
controlP5.draw()
in draw() with any Renderer, I get an NullPointerException. I don't know which part of my code causes the Exception, so I try to describe what I'm using.
In the sketch I use Jbox2D and for ControlP5 a ControlFont.In setup() I also added a MouseWheelListener.
Thanks in advance.