Showing the changes to libraries/render/src/render/DrawStatus.cpp (1 of 19 files). Show all
Unified · Split
| @@ -94,12 +94,17 @@ const gpu::TexturePointer DrawStatus::getStatusIconMap() const { · 93 unmodified lines | ||
| 94 | 94 | return _statusIconMap; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | +void DrawStatus::configure(const Config& configuration) { | |
| 98 | + _showDisplay = configuration.showDisplay; | |
| 99 | + _showNetwork = configuration.showNetwork; | |
| 100 | +} | |
| 101 | + | |
| 97 | 102 | void DrawStatus::run(const SceneContextPointer& sceneContext, |
| 98 | 103 | const RenderContextPointer& renderContext, |
| 99 | 104 | const ItemIDsBounds& inItems) { |
| 100 | − assert(renderContext->getArgs()); | |
| 101 | − assert(renderContext->getArgs()->_viewFrustum); | |
| 102 | − RenderArgs* args = renderContext->getArgs(); | |
| 105 | + assert(renderContext->args); | |
| 106 | + assert(renderContext->args->_viewFrustum); | |
| 107 | + RenderArgs* args = renderContext->args; | |
| 103 | 108 | auto& scene = sceneContext->_scene; |
| 104 | 109 | const int NUM_STATUS_VEC4_PER_ITEM = 2; |
| 105 | 110 | const int VEC4_LENGTH = 4; |
| @@ -179,7 +184,7 @@ void DrawStatus::run(const SceneContextPointer& sceneContext, · 73 unmodified lines | ||
| 179 | 184 | |
| 180 | 185 | const unsigned int VEC3_ADRESS_OFFSET = 3; |
| 181 | 186 | |
| 182 | − if ((renderContext->getDrawStatus() & showDisplayStatusFlag) > 0) { | |
| 187 | + if (_showDisplay) { | |
| 183 | 188 | for (int i = 0; i < nbItems; i++) { |
| 184 | 189 | batch._glUniform3fv(_drawItemBoundPosLoc, 1, (const float*) (itemAABox + i)); |
| 185 | 190 | batch._glUniform3fv(_drawItemBoundDimLoc, 1, ((const float*) (itemAABox + i)) + VEC3_ADRESS_OFFSET); |
| @@ -192,7 +197,7 @@ void DrawStatus::run(const SceneContextPointer& sceneContext, · 6 unmodified lines | ||
| 192 | 197 | |
| 193 | 198 | batch.setPipeline(getDrawItemStatusPipeline()); |
| 194 | 199 | |
| 195 | − if ((renderContext->getDrawStatus() & showNetworkStatusFlag) > 0) { | |
| 200 | + if (_showNetwork) { | |
| 196 | 201 | for (int i = 0; i < nbItems; i++) { |
| 197 | 202 | batch._glUniform3fv(_drawItemStatusPosLoc, 1, (const float*) (itemAABox + i)); |
| 198 | 203 | batch._glUniform3fv(_drawItemStatusDimLoc, 1, ((const float*) (itemAABox + i)) + VEC3_ADRESS_OFFSET); |