MCPcopy Create free account
hub / github.com/RenderKit/embree / SetCircleTessellationMaxError

Method SetCircleTessellationMaxError

tutorials/common/imgui/imgui_draw.cpp:371–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371void ImDrawListSharedData::SetCircleTessellationMaxError(float max_error)
372{
373 if (CircleSegmentMaxError == max_error)
374 return;
375
376 IM_ASSERT(max_error > 0.0f);
377 CircleSegmentMaxError = max_error;
378 for (int i = 0; i < IM_ARRAYSIZE(CircleSegmentCounts); i++)
379 {
380 const float radius = (float)i;
381 CircleSegmentCounts[i] = (ImU8)((i > 0) ? IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC(radius, CircleSegmentMaxError) : IM_DRAWLIST_ARCFAST_SAMPLE_MAX);
382 }
383 ArcFastRadiusCutoff = IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC_R(IM_DRAWLIST_ARCFAST_SAMPLE_MAX, CircleSegmentMaxError);
384}
385
386// Initialize before use in a new frame. We always have a command ready in the buffer.
387void ImDrawList::_ResetForNewFrame()

Callers 1

NewFrameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected