MCPcopy Create free account
hub / github.com/TomClabault/HIPRT-Path-Tracer / render_thread_function

Method render_thread_function

src/Renderer/GPURendererThread.cpp:25–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25void GPURendererThread::render_thread_function()
26{
27 OROCHI_CHECK_ERROR(oroCtxSetCurrent(m_renderer->m_hiprt_orochi_ctx->orochi_ctx));
28
29 while (true)
30 {
31 // Wait for the signal to start rendering
32 std::unique_lock<std::mutex> lock(m_render_mutex);
33 m_render_condition_variable.wait(lock, [this] { return m_frame_requested || m_exit_requested; });
34 if (m_exit_requested)
35 return;
36
37 // Reset the render requested flag
38 m_frame_requested = false;
39
40 // Perform rendering operations here
41 render();
42 post_frame_update();
43 }
44}
45
46void GPURendererThread::setup_render_passes(RenderWindow* render_window)
47{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected