MCPcopy Create free account
hub / github.com/defold/defold / SortRenderList

Function SortRenderList

engine/render/src/render/render.cpp:717–737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715 }
716
717 static void SortRenderList(HRenderContext context)
718 {
719 DM_PROFILE("SortRenderList");
720
721 if (context->m_RenderList.Empty())
722 return;
723
724 // First sort on the tag masks
725 {
726 RenderListEntrySorter sort;
727 sort.m_Base = context->m_RenderList.Begin();
728 std::stable_sort(context->m_RenderListSortIndices.Begin(), context->m_RenderListSortIndices.End(), sort);
729 }
730 // Now find the ranges of tag masks
731 {
732 RenderListEntry* entries = context->m_RenderList.Begin();
733 FindRangeComparator comp;
734 comp.m_Entries = entries;
735 FindRenderListRanges(context->m_RenderListSortIndices.Begin(), 0, context->m_RenderListSortIndices.Size(), entries, comp, context, CollectRenderEntryRange);
736 }
737 }
738
739 ///////////////////////////////////////////////////////////////////////////////////////////////////
740

Callers 1

DrawRenderListFunction · 0.85

Calls 5

FindRenderListRangesFunction · 0.85
EmptyMethod · 0.45
BeginMethod · 0.45
EndMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected