processing-rs icon indicating copy to clipboard operation
processing-rs copied to clipboard

beginShape() / vertex() / endShape() equivalent?

Open Luminoth opened this issue 3 years ago • 3 comments

Just curious - is there an equivalent to processing's beginShape() / vertex() / endShape() calls: https://processing.org/reference/beginShape_.html ?

Luminoth avatar May 23 '21 17:05 Luminoth

I had once started on it and that was when work and some other things started to kick in full time and I did not get back to that part. That one is rather easy to implement, I think, so this time I might even be able to do it tonight.

rennis250 avatar May 26 '21 19:05 rennis250

You might have noticed that there is finally some real activity going on around here. I have a really basic version working, but wanted to know which drawing modes you currently need? General Polygon or something more like LINES, QUADS, TRIANGLES?

rennis250 avatar May 28 '21 10:05 rennis250

I believe just general polygon. The Nature of Code examples are doing this with it specifically:

beginShape();
for(i=0; i<vertexCount; ++i) {
    v = getVertex(i);
    vertex(v.x, v.y);
}
endShape(CLOSE);

which I think is the general poly case.

Luminoth avatar May 28 '21 15:05 Luminoth