Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Draw and Set color of each vertex

$
0
0

@Julian_Puppo wrote:

So, im really looking for the equivalent of this processing code in openframeworks :

void setup() {
  size(600, 600, P2D);
}

void draw() {
  beginShape();
  fill(255, 0, 0);
  vertex(0, 0);
  fill(0, 255, 0);
  vertex(width, 0);
  fill(0, 0, 255);
  vertex(width, height);
  fill(255, 255, 0);
  vertex(0, height);
  endShape();
}

As you can see processing lets me paint each vertex and calculates the degrade between vertexs.

i´ve tryed several codes in openframeworks using ofPolyline and ofPath but without succes. Is there any way to accoplish this using openframeworks?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles