PShape - beginShape(Mode), Problem with POINTS

edited March 2014 in Questions about Code

Hey, I have a problem when I want to create a PShape and just draw POINTS. the beginShape(MODE): POINTS is not working, every other MODE works perfekt. Also when I use it without createShape(), it works. See the code below. When u interchange POINTS with TRIANGLE_STRIP it works.

is there a syntax difference with POINTS?

thx jo

PShape s;

void setup() {
  size(100, 100, P2D);
  s = createShape();
  s.beginShape(POINTS);
  s.strokeWeight(5 );
  s.vertex(30, 75);
  s.vertex(40, 20);
  s.vertex(50, 75);
  s.vertex(60, 20);
  s.vertex(70, 75);
  s.vertex(80, 20);
  s.vertex(90, 75);
  s.endShape();
}

void draw() {
  shape(s, 0, 0);
}
Sign In or Register to comment.