7 #ifndef PXR_IMAGING_HD_RENDER_THREAD_H
8 #define PXR_IMAGING_HD_RENDER_THREAD_H
14 #include <condition_variable>
273 std::function<void()> _renderCallback;
278 std::function<void()> _shutdownCallback;
281 static void _DefaultRenderCallback();
284 static void _DefaultShutdownCallback();
308 State _requestedState;
309 std::mutex _requestedStateMutex;
310 std::condition_variable _requestedStateCV;
317 std::atomic_flag _enableRender;
326 std::atomic<bool> _pauseRender;
331 std::atomic<bool> _pauseDirty;
337 std::atomic<bool> _rendering;
345 std::mutex _frameBufferMutex;
351 #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.