diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-04-29 19:03:03 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-04-29 19:08:41 +0300 |
commit | a6f951b4649a126de22131833ca38d74f056d928 (patch) | |
tree | 44583de60a42512974cae2aeba7f11a2c63c567c /intern/cycles/hydra/render_pass.cpp | |
parent | e0315a5ef0fda1773d27c61f439b5598937a3357 (diff) |
Cycles: make Hydra display driver optional, for USD without OpenGL
OpenGL support was removed from Blender's USD precompiled libraries. This
is currently only useful when building against other applications anyway.
Diffstat (limited to 'intern/cycles/hydra/render_pass.cpp')
-rw-r--r-- | intern/cycles/hydra/render_pass.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/hydra/render_pass.cpp b/intern/cycles/hydra/render_pass.cpp index 8f6f934b898..82fd6eff004 100644 --- a/intern/cycles/hydra/render_pass.cpp +++ b/intern/cycles/hydra/render_pass.cpp @@ -4,14 +4,19 @@ #include "hydra/render_pass.h" #include "hydra/camera.h" -#include "hydra/display_driver.h" #include "hydra/output_driver.h" #include "hydra/render_buffer.h" #include "hydra/render_delegate.h" #include "hydra/session.h" + +#ifdef WITH_HYDRA_DISPLAY_DRIVER +# include "hydra/display_driver.h" +#endif + #include "scene/camera.h" #include "scene/integrator.h" #include "scene/scene.h" + #include "session/session.h" #include <pxr/imaging/hd/renderPassState.h> @@ -32,8 +37,10 @@ HdCyclesRenderPass::HdCyclesRenderPass(HdRenderIndex *index, const auto renderDelegate = static_cast<const HdCyclesDelegate *>( GetRenderIndex()->GetRenderDelegate()); if (renderDelegate->IsDisplaySupported()) { +#ifdef WITH_HYDRA_DISPLAY_DRIVER session->set_display_driver( make_unique<HdCyclesDisplayDriver>(renderParam, renderDelegate->GetHgi())); +#endif } } |