public override void EndRender() { if (_lastBeginContext != null) { _lastBeginContext.EndRender(); } }
protected override bool BeginRenderBrushOverride(PrimitiveBuffer primitiveContext, RenderContext renderContext) { // Clear last context _lastBeginContext = null; bool result = false; foreach (var brushContext in _brushContexts) { // We can only begin a new render pass if the previous ended if (_lastBeginContext != null && brushContext.IsValid()) { _lastBeginContext.Render(0); _lastBeginContext.EndRender(); _lastBeginContext = null; } var currentResult = brushContext.BeginRenderBrushOverride(primitiveContext, renderContext); result |= currentResult; if (currentResult) { _lastBeginContext = brushContext; } } return(result); }