3d/opengl alpha is fine in p5 ide but doesn't work in eclipse
in
Integration and Hardware
•
1 month ago
hi everybody,
in the p5 ide the following code behaves as expected. the red box is partially seen through the transparent grey big box in front of it.
when started out of eclipse just a grey box is produced.
the red box behind it is not visible at all.
all in processing 2.02.
is this a bug or am i missing something?
any help appreciated.
import processing.core.*;
public class Main extends PApplet {
public static void main(String args[]) {
PApplet.main(new String[] { "--present", "Main" });
}
public void setup() {
size(640, 360, P3D);
}
public void draw() {
lights();
background(0);
stroke(10);
pushMatrix();
translate(width/2, height/2, -100);
rotateY(1.25f);
rotateX(-0.4f);
fill(255,0,0);
box(50);
popMatrix();
pushMatrix();
translate(width/2, height/2, 0);
fill(100,100,100, 100);
box(width, height, 10);
popMatrix();
}
}
1