Bug 527 : fill() problems in PGraphics 3D (0124 beta)
Last modified: 2007-03-13 04:04




Status:
RESOLVED
Resolution:
DUPLICATE of bug 468
Priority:
P1
Severity:
normal

 

Reporter:
suzuki
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2007-02-28 23:13
/* Sorry--this might be a duplicate (cf Bugs#428, 482, 92, etc.) but they
seemed pretty old; also, it sounded like there might be a workaround, but I
haven't been able to get it to work for me. (Granted, I'm pretty new to
Processing and Java.)

The problem does not occur with createGraphics() and JAVA2D.
*/

PGraphics pg;

void setup() {
size(240,320);
background(91,91,127);
pg = createGraphics(32,32,P3D);
loop();
}

void draw() {
pg.beginDraw();
pg.lights();
pg.background(127,127,250);
pg.fill(255, 0, 0);
//pg.noStroke();
pg.sphere(10);
pg.stroke(0);
pg.ellipse(10,20,10,20);
pg.endDraw();

image(pg,56,0,128,128);

draw_triangle(120,120,0,100);

}

void draw_triangle(float x,float y,float z,float a) {
noStroke();
fill(250,200,0);
float h = a*sqrt(3)*0.5;
beginShape(TRIANGLES);
vertex(x,y);
vertex(x + a*0.5,y + h);
vertex(x - a*0.5,y + h);
endShape();
}
Additional Comment #1 From fry 2007-03-07 17:19
i need some clue about what the problem is, i can't guess from the code.
Additional Comment #2 From suzuki 2007-03-08 07:44
Fill seems to be completely transparent when drawing a P3D PGraphics
surface. (Only wireframe and background is drawn.)

My goal was to get separate 2D and 3D surfaces going. I was trying for 3D
surface in 2D window because...going the other way--2D surfaces in the P3D
window--images are blurry (or "smoothed") and I can't figure out how to
turn that off for P3D).
Additional Comment #3 From fry 2007-03-09 05:47
k, yes.. that's related to those other bugs but we'll keep this one open as
a test case.
Additional Comment #4 From fry 2007-03-13 03:04


*** This bug has been marked as a duplicate of 468 ***