Hi all!
First post in this forum.
I'm a composer that recently started adding live graphics to my pieces and currently I'm working on a big piece that will feature around 20 min of graphics. I switched to Processing 2 and was amazed by the fast OpenGL2 engine. To spare computing power I decided to record and playback video of some of my sketches. The only way I figured this was possible with the alphas was with Syphon.
My issue however is that on my MacPro 3,1, a5 won't work correctly. The sendFrames example won't even run.
I get plenty of this error:
Exception in thread "Animation Thread" javax.media.opengl.GLException: javax.media.opengl.GLException: array offset argument "infoLog_offset" (0) equals or exceeds array length (0)
as well as
OpenGL error 1286 at top beginDraw(): invalid framebuffer operation
OpenGL error 1286 at bot beginDraw(): invalid framebuffer operation
OpenGL error 1286 at top endDraw(): invalid framebuffer operation
OpenGL error 1286 at bot endDraw(): invalid framebuffer operation
One of my own test sketches I am able to run, but the begin/endDraw error still persists, I get no background on the sketch and the receiving Syphon recorder gets squat.
On my MacbookPro 2010 I can run both the example and my own. However my own sketch does not output a background (even with canvas.background(250); or just background(250);) and the perspective is all screw up.
With alpha 4, both computers are able to send frames. However, the processing window of my own sketch is frozen and on the MacPro I get really shitty framerates to the Syphon recorder. (Dimensions of object are different as well between a4 and a5 for both comps.) The Macbook does seem to get good frameRates though.
My theory for my MacPro is that I recently put in a flashed 1Gb VRAM Radeon 6870, and while it works well for video editing and games it unfortunately does not play nice with Processing, which is the reason I got it to begin with.
I am not sure what to make of it. Use a5 on my laptop to generate videos and edit/playback on my MacPro?
Here is the sketch I'm trying to record:
First post in this forum.
I'm a composer that recently started adding live graphics to my pieces and currently I'm working on a big piece that will feature around 20 min of graphics. I switched to Processing 2 and was amazed by the fast OpenGL2 engine. To spare computing power I decided to record and playback video of some of my sketches. The only way I figured this was possible with the alphas was with Syphon.
My issue however is that on my MacPro 3,1, a5 won't work correctly. The sendFrames example won't even run.
I get plenty of this error:
Exception in thread "Animation Thread" javax.media.opengl.GLException: javax.media.opengl.GLException: array offset argument "infoLog_offset" (0) equals or exceeds array length (0)
as well as
OpenGL error 1286 at top beginDraw(): invalid framebuffer operation
OpenGL error 1286 at bot beginDraw(): invalid framebuffer operation
OpenGL error 1286 at top endDraw(): invalid framebuffer operation
OpenGL error 1286 at bot endDraw(): invalid framebuffer operation
One of my own test sketches I am able to run, but the begin/endDraw error still persists, I get no background on the sketch and the receiving Syphon recorder gets squat.
On my MacbookPro 2010 I can run both the example and my own. However my own sketch does not output a background (even with canvas.background(250); or just background(250);) and the perspective is all screw up.
With alpha 4, both computers are able to send frames. However, the processing window of my own sketch is frozen and on the MacPro I get really shitty framerates to the Syphon recorder. (Dimensions of object are different as well between a4 and a5 for both comps.) The Macbook does seem to get good frameRates though.
My theory for my MacPro is that I recently put in a flashed 1Gb VRAM Radeon 6870, and while it works well for video editing and games it unfortunately does not play nice with Processing, which is the reason I got it to begin with.
I am not sure what to make of it. Use a5 on my laptop to generate videos and edit/playback on my MacPro?
Here is the sketch I'm trying to record:
- import codeanticode.syphon.*;
PGraphics canvas;
SyphonServer server;
float theta, rot,wind;
Snow[] snow = new Snow[100];
void setup() {
size(1280, 720,P3D);
//frameRate(60);
canvas = createGraphics(1280, 720, P3D);
// Create syhpon server to send frames out.
server = new SyphonServer(this, "Processing Syphon");
for (int i = 0; i < snow.length; i++) {
snow[i] = new Snow(int(random(1000)),random(5)+5,int(random(1000)),int(random(1000)));
}
}
void draw() {
canvas.beginDraw();
background(250);
theta = radians(20+(sin(rot*2)));
camera(width/4,height,(height/3.6) / tan(PI*30.0 / 180.0), width/4.01, height/2.0, height/2, 0, 1, 0);
for(int i =0; i < snow.length; i++) {
snow[i].display();
}
scale(4);
rotateY(sin(rot/4)/2);
pushMatrix();
translate(0,60,0);
noStroke();
fill(170);
box(4,120,4);
popMatrix();
branch(120);
rot += 0.01;
canvas.endDraw();
image(canvas, 0, 0);
server.sendImage(canvas);
}
void branch(float h) {
h *= 0.66;
if (h > 15) {
rotateY(1);
pushMatrix();
rotateX(theta);
rotate(theta);
strokeWeight(h/20);
stroke(250-h);
line(0, 0, 0, -h);
translate(0, -h);
branch(h);
popMatrix();
pushMatrix();
rotateX(theta);
rotate(-theta);
strokeWeight(h/20);
stroke(250-h);
line(0, 0, 0, -h);
translate(0, -h);
branch(h);
popMatrix();
pushMatrix();
rotateX(-theta);
rotate(theta);
strokeWeight(h/20);
stroke(250-h);
line(0, 0, 0, -h);
translate(0, -h);
branch(h);
popMatrix();
pushMatrix();
rotateX(-theta);
rotate(-theta);
strokeWeight(h/20);
stroke(250-h);
line(0, 0, 0, -h);
translate(0, -h);
branch(h);
popMatrix();
}
}
class Snow {
float speed;
int x,y,z;
Snow(int x,float speed, int z,int y) {
this.y = y;
this.x = x;
this.speed = speed/2;
this.z = z;
}
void display() {
pushMatrix();
translate(x+noise(500),y,z+200);
strokeWeight(y/10/speed);
stroke(245);
point(0,0,0);
y += (1*speed);
if (y > 1200) {
x = int(random(1000));
z = int(random(500));
y = -200;
}
popMatrix();
}
}
1