//=================================================== // PathRenderer::render void PathRenderer::render( Scene const& scene, Film& film, RenderParameters const& renderParameters) { m_params = &renderParameters; m_scene = &scene; m_film = &film; m_started = true; if (m_params->progressive) { renderProgressive(); } else { renderScanline(); } }
void GPU::scanline() { uint8 renderTime = (video.line + 50) % 263; if(renderTime < 241 && renderedLines < 192+1) { // Rendering starts in advance. Draw time varies; however, up to 48 extra // scanlines can be cached, providing a buffer for complicated scenes. // // That isn't emulated at the moment. Scanline rendering is still needed, // however, to get stencilling and other edge cases right. renderScanline(); renderedLines++; } if(renderTime == 242) { // Finished rendering - process the new scene list. // Games are free to load textures during this time. swapBuffers(); renderedLines = -1; drawList[0].nextPrim = 0; drawList[0].lastPrim = renderList->firstAlpha; drawList[0].first = 0; drawList[0].last = 0; drawList[1].nextPrim = renderList->firstAlpha; drawList[1].lastPrim = renderList->numPrims; drawList[1].first = 0; drawList[1].last = 0; for(auto &line : pixels) for(auto &p : line) { p.a.a = p.b.a = 0; p.a.id = p.b.id = 0xff; p.az = p.bz = 0x7fffffff; } } if(commandBufIrq) arm9.interrupt.flags |= CPUCore::irqGeomBuf; }