saveFrame() output just black images
in
Programming Questions
•
3 years ago
Hi,
I never use this function before, it is very straight forward but all I get is black images, here is my code
void draw() {
background(0);
// render background image
image(reef, 0, 0);
//directionalLight(20, 20, 200, 0, 1, -1);
//ambientLight(50, 70, 252);
physics.update();
gl = pgl.beginGL();
gl.glDisable(GL.GL_DEPTH_TEST);
gl.glEnable(GL.GL_BLEND);
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
for (int i = 0; i < NUM_BOIDS; i++) {
Boid b = (Boid)boids.get(i);
b.run(boids);
}
// this does not llok like is working
//gl.glDisable(GL.GL_BLEND);
pgl.endGL();
saveFrame();
//println("fps: " + frameRate);
}
If I remove the background(0); call at the begining of the draw method I get images save but because of the blending mode everything goes burns to white, any help will be much appreciated
Cheers
rS