From 6e5217b80d47a03022f756705ba3aba7ce18d362 Mon Sep 17 00:00:00 2001 From: HifiExperiments Date: Sat, 2 Nov 2019 01:03:34 -0700 Subject: [PATCH] fix build error, add environment variable --- libraries/render-utils/src/MeshPartPayload.cpp | 7 ++++++- tools/oven/src/OvenCLIApplication.cpp | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libraries/render-utils/src/MeshPartPayload.cpp b/libraries/render-utils/src/MeshPartPayload.cpp index 8a145cf2a7..9525d9c105 100644 --- a/libraries/render-utils/src/MeshPartPayload.cpp +++ b/libraries/render-utils/src/MeshPartPayload.cpp @@ -11,6 +11,8 @@ #include "MeshPartPayload.h" +#include + #include #include #include @@ -21,6 +23,9 @@ #include "RenderPipelines.h" +static const QString ENABLE_MESH_SHADERS_STRING { "HIFI_ENABLE_MESH_SHADERS" }; +static bool ENABLE_MESH_SHADERS = QProcessEnvironment::systemEnvironment().contains(ENABLE_MESH_SHADERS_STRING); + bool MeshPartPayload::enableMeshShaders = false; using namespace render; @@ -466,7 +471,7 @@ void ModelMeshPartPayload::render(RenderArgs* args) { if (!_drawMaterials.empty() && _drawMaterials.top().material && _drawMaterials.top().material->isProcedural() && _drawMaterials.top().material->isReady()) { - if (!enableMeshShaders) { + if (!(enableMeshShaders && ENABLE_MESH_SHADERS)) { return; } auto procedural = std::static_pointer_cast(_drawMaterials.top().material); diff --git a/tools/oven/src/OvenCLIApplication.cpp b/tools/oven/src/OvenCLIApplication.cpp index afcdfbfcd2..5b0de4d6fa 100644 --- a/tools/oven/src/OvenCLIApplication.cpp +++ b/tools/oven/src/OvenCLIApplication.cpp @@ -14,6 +14,8 @@ #include #include +#include + #include #include