CRhinoDisplayPipeline - draw only mesh wireframe also in shaded mode

I’ve been scratching my head here - I want to draw the wireframe of a mesh regardless of the display mode being wireframe/shaded/rendered/whatever. If I call CDisplayPipeline::DrawWireframeMesh it draws the wireframe but it also draws the shaded mesh if the display mode is not wireframe.

A gentle nudge in the right direction would be appreciated :smile:

I’ve never done anything like this, but I’ve read the display conduit description, so I ask: should you be using a display conduit?

maybe i’m missing something but couldn’t you just set display mode property override on the object (at home so can’t lookup exactly how to do it via SDK) to be wireframe (similar to running the setobjectdisplaymode command) and set it to wireframe and Rhino will always draw it wireframe no matter what?

I am, in fact, drawing a custom object rather than using a display conduit. But it boils down to the same, I am using the display pipeline to draw a mesh wireframe.

Good idea I’ll try that thanks

Here is an approach you might consider.

https://github.com/mcneel/Rhino5Samples_CPP/blob/master/SampleDisplayConduits/cmdSampleDrawWireframeMesh.cpp

1 Like