processing / processing-android-archive

96 stars 50 forks source link

curveVertex bug #48

Open yeatsJJ opened 11 years ago

yeatsJJ commented 11 years ago

Processing Android curveVertex bug, the code is as follows: fill(#FFEC8B); beginShape(); curveVertex(0, 10); curveVertex(0, 10); curveVertex(100, 10); curveVertex(100, 30); curveVertex(0, 30); curveVertex(0, 30); endShape();

fill(#FFB6C1); beginShape(); curveVertex(0, 50); curveVertex(0, 50); curveVertex(100, 50); curveVertex(100, 80); curveVertex(0, 80); curveVertex(0, 80); endShape();

The result is the color of the first shape will be the color of the second. you can run it in android environment

andyli commented 11 years ago

I'm facing the same issue...

My workaround is to switch to P3D (OpenGL) renderer, which does not contain the bug. size(width, height, P3D) will be ignored in Android mode, so we should instead include the following function in the sketch:

String sketchRenderer(){
    return P3D;
}
yeatsJJ commented 11 years ago

Thank U

andyli commented 11 years ago

You're welcome. But don't close this issue yet since there is definitely a bug in the 2D renderer. Please re-open.

yeatsJJ commented 10 years ago

now i found a new problem. if i write String sketchRenderer(){ return P3D; } the result is a line from center to some point,