We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Is there an issue w/ PGraphics/createGraphics and how transparency is handled when using P3D? Please check out this example. The rectangles at opacity of 20 fade to black as expected; but when P3D is added to setup() and createGraphics(), that effect is gone/lost.
Thank you.
PGraphics pg;
void setup() {
size(400, 100);
background(200);
pg = createGraphics(400, 200);
for (int i=0; i < 40; i++) { // draw horizontal lines
//line(i * 10, 0, i * 10, height);
line(0, i * 10, width, i*10);
}
pg.beginDraw();
pg.fill(0,20);
for (int i=0; i < 40; i++) {
pg.rect(i * 5 + 5, 15, 400, 40);
}
pg.endDraw();
image(pg, 0,0);
}
void draw() {
}
Answers
Please edit your post and format your code:
I'm not understanding the question.
Here is the code running with default renderer (top) and with P3D renderer (bottom).
Thanks. This is promising; however, this is what I get. I thought it might be cause I'm using 2.0, but trying 3.0 gave me a blank screen when I add P3D. It must be some incompatibility w/ my Intel HD Graphics 2500 video on the motherboard.
I'll make sure to format code in the future. Thanks again.
Re: using 2.0 or 3.0 -- have you tried the latest release - 3.3.6?
No: 3.3.5 though.