Eyeshot 11.847; Good afternoon, I've run into a problem that for some reason the internal fill has only one (first) OverlayItem
(and all small circles should be filled). Here is a code snippet in which rendering takes place. Moreover, all the necessary OverlayItems
fall into this block, but only one element is painted over. Tell me please, what could be the problem?
Here is Filling problem image:
internal sealed class ViewportOverlayDrawer : IOverlayItemVisitor
{
private readonly RenderContextBase _renderContext;
public void Visit(OverlayItem item)
{
if (!item.IsVisible || item.Vertices == null || item.Vertices.Length == 0)
{
return;
}
var points = item.Vertices.Select(vertex => new Point3D(vertex.X, _viewportLayout.RealHeight - vertex.Y, 0.0)).ToArray();
if (item.BrushColor != Color.Empty)
{
_renderContext.SetState(blendStateType.Blend);
_renderContext.SetColorWireframe(item.BrushColor);
_renderContext.DrawTrianglesFan(points, Vector3D.AxisZ);
_renderContext.SetState(blendStateType.NoBlend);
}
}
}