O'Reilly logo

Mastering openFrameworks: Creative Coding Demystified by Denis Perevalov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coloring the vertices

It is possible to specify the colors of the vertices. In this case, you must provide a color for all the vertices using the mesh.addColor( color ) function; for example, mesh.addColor( ofColor( 255, 0, 0 ) ). Note that in this case, the ofSetColor() function will not affect the drawing of the mesh. Remember: you should call this function as many times as you call the mesh.addVertex() function.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required