Bug 1032 : stroke showing above fill when used with P3D
Last modified: 2008-11-23 20:33




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
Ira
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2008-11-20 13:16
void setup(){
size(400, 400, P3D);
background(255);
smooth();
fill(255);
for (int i=0; i<100; i++){
float s = random(200);
ellipse(random(width), random(height), s, s);
}
}
Additional Comment #1 From Ira 2008-11-20 13:20
Adding draw() solves the no fill problem


void setup(){
size(400, 400, P2D);
background(255);
smooth();
}

void draw(){
for (int i=0; i<100; i++){
float s = random(200);
ellipse(random(width), random(height), s, s);
}
}
Additional Comment #2 From fry 2008-11-23 10:28
Turns out the issue is weirder, the stroke is just showing above the fill,
no matter what. So multiple shapes that are both stroked and filled will
have the stroke shown on top for everything.

I think the stroke z was an old workaround for something else (quality
problems), but just need to track down where it is.
Additional Comment #3 From ewjordan 2008-11-23 14:53
With P3D, this is a smooth() issue, which I think was my fault - when I
reenabled the smoothed poly drawer, I changed the z buffer check so it
looked better in 3d, which mucks up the 2d mode.

Fix turns out to be easy in this case: in PSmoothTriangle.java, swap the
commenting on lines 397 and 398 to pick the <= version instead of the
strict <. I'll have to dig in later and figure out what to do about the 3d
issues that I swapped those out to deal with (there are other z-buffer
issues anyhow, so I don't think that was such a clean "fix").
Additional Comment #4 From fry 2008-11-23 20:33
thanks eric, now fixed for 0160.