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 | return _statusIconMap; | 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 | void DrawStatus::run(const SceneContextPointer& sceneContext, | 102 | void DrawStatus::run(const SceneContextPointer& sceneContext, |
| 98 | const RenderContextPointer& renderContext, | 103 | const RenderContextPointer& renderContext, |
| 99 | const ItemIDsBounds& inItems) { | 104 | const ItemIDsBounds& inItems) { |
| 100 | assert(renderContext->getArgs()); | 105 | assert(renderContext->args); |
| 101 | assert(renderContext->getArgs()->_viewFrustum); | 106 | assert(renderContext->args->_viewFrustum); |
| 102 | RenderArgs* args = renderContext->getArgs(); | 107 | RenderArgs* args = renderContext->args; |
| 103 | auto& scene = sceneContext->_scene; | 108 | auto& scene = sceneContext->_scene; |
| 104 | const int NUM_STATUS_VEC4_PER_ITEM = 2; | 109 | const int NUM_STATUS_VEC4_PER_ITEM = 2; |
| 105 | const int VEC4_LENGTH = 4; | 110 | const int VEC4_LENGTH = 4; |
| @@ -179,7 +184,7 @@ void DrawStatus::run(const SceneContextPointer& sceneContext, · 73 unmodified lines | |||
| 179 | 184 | ||
| 180 | const unsigned int VEC3_ADRESS_OFFSET = 3; | 185 | const unsigned int VEC3_ADRESS_OFFSET = 3; |
| 181 | 186 | ||
| 182 | if ((renderContext->getDrawStatus() & showDisplayStatusFlag) > 0) { | 187 | if (_showDisplay) { |
| 183 | for (int i = 0; i < nbItems; i++) { | 188 | for (int i = 0; i < nbItems; i++) { |
| 184 | batch._glUniform3fv(_drawItemBoundPosLoc, 1, (const float*) (itemAABox + i)); | 189 | batch._glUniform3fv(_drawItemBoundPosLoc, 1, (const float*) (itemAABox + i)); |
| 185 | batch._glUniform3fv(_drawItemBoundDimLoc, 1, ((const float*) (itemAABox + i)) + VEC3_ADRESS_OFFSET); | 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 | batch.setPipeline(getDrawItemStatusPipeline()); | 198 | batch.setPipeline(getDrawItemStatusPipeline()); |
| 194 | 199 | ||
| 195 | if ((renderContext->getDrawStatus() & showNetworkStatusFlag) > 0) { | 200 | if (_showNetwork) { |
| 196 | for (int i = 0; i < nbItems; i++) { | 201 | for (int i = 0; i < nbItems; i++) { |
| 197 | batch._glUniform3fv(_drawItemStatusPosLoc, 1, (const float*) (itemAABox + i)); | 202 | batch._glUniform3fv(_drawItemStatusPosLoc, 1, (const float*) (itemAABox + i)); |
| 198 | batch._glUniform3fv(_drawItemStatusDimLoc, 1, ((const float*) (itemAABox + i)) + VEC3_ADRESS_OFFSET); | 203 | batch._glUniform3fv(_drawItemStatusDimLoc, 1, ((const float*) (itemAABox + i)) + VEC3_ADRESS_OFFSET); |