Thanks for that
yeah well i am looking at several solutions at the moment. I wanted to create an object array and then include a vertex array member in each object. Iterate through the objects and then create the meshes for each one.
I kept getting an error - so tried a really bad procedural hack instead and seem to get a similar error.
I am working on a macbook pro and i think i am getting some kind of error telling me that i cant draw more than 1024.
The console says
Maximum number of output vertices support is: 1024
i get the thread screen in xcode with the assembler code blah blah.
Does anyone know about this error?
Code extract as follows.
int a = points1.size();
points1.push_back(ofVec3f(boids[0].position.x,boids[0].position.y,boids[0].position.z));
for(int i = 1; i < a; i++){
ofSetColor(20.0,100.0,240.0);
ofVec3f thisPoint = points1[i-1];
ofVec3f nextPoint = points1[i];
ofVec3f direction = (nextPoint - thisPoint);
float distance = direction.length();
ofVec3f unitDirection = direction.normalized();
ofVec3f toTheLeft = unitDirection.getRotated(-90, ofVec3f(0,0,1));
ofVec3f toTheRight = unitDirection.getRotated(90, ofVec3f(0,0,1));
float thickness = ofMap(distance, 0, 4, 3, 2, true);
ofVec3f leftPoint = thisPoint+toTheLeft*thickness;
ofVec3f rightPoint = thisPoint+toTheRight*thickness;
//add these points to the triangle strip
mesh1.addVertex(ofVec3f(leftPoint.x, leftPoint.y, leftPoint.z));
mesh1.addVertex(ofVec3f(rightPoint.x, rightPoint.y, rightPoint.z));
mesh1.draw();
i really appreciate any help. i am creating this piece for an exhibition and the idea is that each boid paints a trail in 3D. I imagine if this is a harware limit then a shader would encounter the same problem.
Can i maybe use openGL and push the extra geometry instead of using mesh.draw? would that solve the problem??
I am not a GL expert and i would really appreciate it if someone know the answer to this.
thanks
gonzo