Quantcast
Viewing all articles
Browse latest Browse all 40524

Best way to draw an array of objects

there was an error in the code i posted for the polyline it should be:

        ofPolyline circle;
        circle.arc(0,0,radius,radius,0,360);
        for(int i=0; i<circle.getVertices().size()-1; i++){
            mesh.addVertex(circle[i]+pos);
            mesh.addVertex(circle[i+1]+pos);
            mesh.addVertex(ofVec3f(0,0)+pos);
        }

the indices the tessellation is creating are just the order in which the triangles are drawn. if you use mesh.append(otherMesh) it'll do the right thing and reorder the indices properly but since you want to modify the vertices before adding the mesh (to add the position) probably the easiest is to just use the polyline variation


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>