Draw mesh faces and wireframe with different colors


just a quick question : i have a VBO Mesh which i would like to draw faces with certain color + alpha and draw line contours (wireframe) using another color.

for now i am drawing both using mesh.drawFaces() and mesh.drawLines() but i can’t use ofSetColor right ?

do i need to clone my mesh to assign vertices different colors and do a mesh.drawFaces() and clone.drawLines() to draw both with different colors or there is another way ?

thanks a lot for your help.

Pre-coffee thinking here, but at least one hacky way to do it would be to draw the wireframe using a shader, then you can just ignore the vertex color of the mesh and set your own.

hey !

ok, thanks for the information.
I am quite a noob when dealing with shaders, but i will have a look.

Thanks and enjoy your coffee :slight_smile:

Post coffee (see much better!), if you have the data in an ofVbo you should be able to use myMesh.disableColors()