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

Function renderFrameStandard

tutorials/lazy_geometry/lazy_geometry_device.cpp:352–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352extern "C" void renderFrameStandard (int* pixels,
353 const unsigned int width,
354 const unsigned int height,
355 const float time,
356 const ISPCCamera& camera)
357{
358 /* render all pixels */
359 const int numTilesX = (width +TILE_SIZE_X-1)/TILE_SIZE_X;
360 const int numTilesY = (height+TILE_SIZE_Y-1)/TILE_SIZE_Y;
361 parallel_for(size_t(0),size_t(numTilesX*numTilesY),[&](const range<size_t>& range) {
362 const int threadIndex = (int)TaskScheduler::threadIndex();
363 for (size_t i=range.begin(); i<range.end(); i++)
364 renderTileTask((int)i,threadIndex,pixels,width,height,time,camera,numTilesX,numTilesY);
365 });
366}
367
368/* called by the C++ code to render */
369extern "C" void device_render (int* pixels,

Callers

nothing calls this directly

Calls 4

parallel_forFunction · 0.85
renderTileTaskFunction · 0.70
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected