Showing the changes to libraries/render-utils/src/RenderCommonTask.cpp (1 of 62 files). Show all
Unified · Split
| @@ -45,13 +45,13 @@ void EndGPURangeTimer::run(const render::RenderContextPointer& renderContext, co · 44 unmodified lines | |||
| 45 | config->setGPUBatchRunTime(timer->getGPUAverage(), timer->getBatchAverage()); | 45 | config->setGPUBatchRunTime(timer->getGPUAverage(), timer->getBatchAverage()); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | DrawOverlay3D::DrawOverlay3D(bool opaque) : | 48 | DrawLayered3D::DrawLayered3D(bool opaque) : |
| 49 | _shapePlumber(std::make_shared<ShapePlumber>()), | 49 | _shapePlumber(std::make_shared<ShapePlumber>()), |
| 50 | _opaquePass(opaque) { | 50 | _opaquePass(opaque) { |
| 51 | initForwardPipelines(*_shapePlumber); | 51 | initForwardPipelines(*_shapePlumber); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | void DrawOverlay3D::run(const RenderContextPointer& renderContext, const Inputs& inputs) { | 54 | void DrawLayered3D::run(const RenderContextPointer& renderContext, const Inputs& inputs) { |
| 55 | assert(renderContext->args); | 55 | assert(renderContext->args); |
| 56 | assert(renderContext->args->hasViewFrustum()); | 56 | assert(renderContext->args->hasViewFrustum()); |
| 57 | 57 | ||
| @@ -70,7 +70,7 @@ void DrawOverlay3D::run(const RenderContextPointer& renderContext, const Inputs& · 12 unmodified lines | |||
| 70 | // Needs to be distinct from the other batch because using the clear call | 70 | // Needs to be distinct from the other batch because using the clear call |
| 71 | // while stereo is enabled triggers a warning | 71 | // while stereo is enabled triggers a warning |
| 72 | if (_opaquePass) { | 72 | if (_opaquePass) { |
| 73 | gpu::doInBatch("DrawOverlay3D::run::clear", args->_context, [&](gpu::Batch& batch) { | 73 | gpu::doInBatch("DrawLayered3D::run::clear", args->_context, [&](gpu::Batch& batch) { |
| 74 | batch.enableStereo(false); | 74 | batch.enableStereo(false); |
| 75 | batch.clearFramebuffer(gpu::Framebuffer::BUFFER_DEPTH, glm::vec4(), 1.f, 0, false); | 75 | batch.clearFramebuffer(gpu::Framebuffer::BUFFER_DEPTH, glm::vec4(), 1.f, 0, false); |
| 76 | }); | 76 | }); |
| @@ -78,7 +78,7 @@ void DrawOverlay3D::run(const RenderContextPointer& renderContext, const Inputs& · 1 unmodified line | |||
| 78 | 78 | ||
| 79 | if (!inItems.empty()) { | 79 | if (!inItems.empty()) { |
| 80 | // Render the items | 80 | // Render the items |
| 81 | gpu::doInBatch("DrawOverlay3D::main", args->_context, [&](gpu::Batch& batch) { | 81 | gpu::doInBatch("DrawLayered3D::main", args->_context, [&](gpu::Batch& batch) { |
| 82 | args->_batch = &batch; | 82 | args->_batch = &batch; |
| 83 | batch.setViewportTransform(args->_viewport); | 83 | batch.setViewportTransform(args->_viewport); |
| 84 | batch.setStateScissorRect(args->_viewport); | 84 | batch.setStateScissorRect(args->_viewport); |