@Marco_Buetikofer wrote:
Hello everyone,
I’m drawing some meshes from polylines using tessellateToMesh().
After doing that, I want to iterate to all the vertices and set their color according to some calculated value (i.e.: the distance to the next vertex), but I’m constantly getting what I think is a bad pointer error:Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)
the loop I’m using is this one:
ofMesh mesh; tess.tessellateToMesh(polyline, (ofPolyWindingMode) 1, mesh); for(unsigned int j = 0; j < mesh.getVertices().size(); j++) { mesh.setColor(j, ofColor(0.1,0.5,0.9)); }
Am I doing something clearly wrong that i just can’t see?
Thanks.
Posts: 1
Participants: 1