History

Add Job::Config to FetchItems

Zach Pomerantz committed 10 years ago

Commit adc9d2e1 parent c903fc43 files · +18 −18Browse files

Showing the changes to libraries/render-utils/src/RenderDeferredTask.cpp (1 of 3 files). Show all

Unified · Split

libraries/render-utils/src/RenderDeferredTask.cpp+2−8
@@ -89,19 +89,13 @@ RenderDeferredTask::RenderDeferredTask(CullFunctor cullFunctor) { · 88 unmodified lines
89 initDeferredPipelines(*shapePlumber);89 initDeferredPipelines(*shapePlumber);
90 90
91 // CPU: Fetch the renderOpaques91 // CPU: Fetch the renderOpaques
92 auto fetchedOpaques = addJob<FetchItems>("FetchOpaque", FetchItems([](const RenderContextPointer& context, int count) {92 auto fetchedOpaques = addJob<FetchItems>("FetchOpaque");
93 context->getItemsConfig().opaque.numFeed = count;
94 }));
95 auto culledOpaques = addJob<CullItems<RenderDetails::OPAQUE_ITEM>>("CullOpaque", fetchedOpaques, cullFunctor);93 auto culledOpaques = addJob<CullItems<RenderDetails::OPAQUE_ITEM>>("CullOpaque", fetchedOpaques, cullFunctor);
96 auto opaques = addJob<DepthSortItems>("DepthSortOpaque", culledOpaques);94 auto opaques = addJob<DepthSortItems>("DepthSortOpaque", culledOpaques);
97 95
98 // CPU only, create the list of renderedTransparents items96 // CPU only, create the list of renderedTransparents items
99 auto fetchedTransparents = addJob<FetchItems>("FetchTransparent", FetchItems(97 auto fetchedTransparents = addJob<FetchItems>("FetchTransparent", FetchItems(
100 ItemFilter::Builder::transparentShape().withoutLayered(),98 ItemFilter::Builder::transparentShape().withoutLayered()));
101 [](const RenderContextPointer& context, int count) {
102 context->getItemsConfig().transparent.numFeed = count;
103 }
104 ));
105 auto culledTransparents = addJob<CullItems<RenderDetails::TRANSLUCENT_ITEM>>("CullTransparent", fetchedTransparents, cullFunctor);99 auto culledTransparents = addJob<CullItems<RenderDetails::TRANSLUCENT_ITEM>>("CullTransparent", fetchedTransparents, cullFunctor);
106 auto transparents = addJob<DepthSortItems>("DepthSortTransparent", culledTransparents, DepthSortItems(false));100 auto transparents = addJob<DepthSortItems>("DepthSortTransparent", culledTransparents, DepthSortItems(false));
107 101