24 #ifndef PXR_IMAGING_HD_RENDER_THREAD_H
25 #define PXR_IMAGING_HD_RENDER_THREAD_H
31 #include <condition_variable>
290 std::function<void()> _renderCallback;
295 std::function<void()> _shutdownCallback;
298 static void _DefaultRenderCallback();
301 static void _DefaultShutdownCallback();
325 State _requestedState;
326 std::mutex _requestedStateMutex;
327 std::condition_variable _requestedStateCV;
334 std::atomic_flag _enableRender;
343 std::atomic<bool> _pauseRender;
348 std::atomic<bool> _pauseDirty;
354 std::atomic<bool> _rendering;
362 std::mutex _frameBufferMutex;
368 #endif // PXR_IMAGING_HD_RENDER_THREAD_H
HD_API bool IsPauseDirty()
HD_API void ResumeRender()
HD_API bool IsThreadRunning()
HD_API void PauseRender()
HD_API void StartThread()
HD_API void StartRender()
HD_API bool IsRendering()
HD_API std::unique_lock< std::mutex > LockFramebuffer()
HD_API void SetShutdownCallback(std::function< void()> shutdownCallback)
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
HD_API bool IsStopRequested()
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
HD_API bool IsPauseRequested()
HD_API void SetRenderCallback(std::function< void()> renderCallback)
Set the rendering callback for the render thread to use.