How do I change Mesh edge drawing color for a single object?

You need to add the following Entity.DrawEdges() method override.

class MyMesh : Mesh
{
    public Color EdgeColor = Color.Empty;

    public MyMesh(Mesh another, Color edgeColor) : base(another)
    {
        EdgeColor = edgeColor;
    }

    protected override void DrawEdges(DrawParams data)
    {
        data.RenderContext.SetColorWireframe(EdgeColor);
        base.DrawEdges(data);
    }
}
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.