mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
Fix doInBatch lambdas
This commit is contained in:
parent
6f85ee135f
commit
12f9091dc1
11 changed files with 15 additions and 15 deletions
|
@ -1600,7 +1600,7 @@ void Application::paintGL() {
|
|||
Stats::getInstance()->setRenderDetails(renderArgs._details);
|
||||
// Reset the gpu::Context Stages
|
||||
// Back to the default framebuffer;
|
||||
gpu::doInBatch(renderArgs._context, [=](gpu::Batch& batch) {
|
||||
gpu::doInBatch(renderArgs._context, [&](gpu::Batch& batch) {
|
||||
batch.resetStages();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ void ApplicationCompositor::displayOverlayTexture(RenderArgs* renderArgs) {
|
|||
updateTooltips();
|
||||
|
||||
//Handle fading and deactivation/activation of UI
|
||||
gpu::doInBatch(renderArgs->_context, [=](gpu::Batch& batch) {
|
||||
gpu::doInBatch(renderArgs->_context, [&](gpu::Batch& batch) {
|
||||
|
||||
auto geometryCache = DependencyManager::get<GeometryCache>();
|
||||
|
||||
|
@ -270,7 +270,7 @@ void ApplicationCompositor::displayOverlayTextureHmd(RenderArgs* renderArgs, int
|
|||
|
||||
auto geometryCache = DependencyManager::get<GeometryCache>();
|
||||
|
||||
gpu::doInBatch(renderArgs->_context, [=](gpu::Batch& batch) {
|
||||
gpu::doInBatch(renderArgs->_context, [&](gpu::Batch& batch) {
|
||||
geometryCache->useSimpleDrawPipeline(batch);
|
||||
|
||||
batch.setResourceTexture(0, overlayFramebuffer->getRenderBuffer(0));
|
||||
|
|
|
@ -70,7 +70,7 @@ void ApplicationOverlay::renderOverlay(RenderArgs* renderArgs) {
|
|||
}
|
||||
|
||||
// Execute the batch into our framebuffer
|
||||
doInBatch(renderArgs->_context, [=](gpu::Batch& batch) {
|
||||
doInBatch(renderArgs->_context, [&](gpu::Batch& batch) {
|
||||
renderArgs->_batch = &batch;
|
||||
|
||||
int width = _overlayFramebuffer->getWidth();
|
||||
|
|
|
@ -179,7 +179,7 @@ void AmbientOcclusion::run(const render::SceneContextPointer& sceneContext, cons
|
|||
assert(renderContext->getArgs()->_viewFrustum);
|
||||
|
||||
RenderArgs* args = renderContext->getArgs();
|
||||
gpu::doInBatch(args->_context, [=](gpu::Batch& batch) {
|
||||
gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
|
||||
auto framebufferCache = DependencyManager::get<FramebufferCache>();
|
||||
QSize framebufferSize = framebufferCache->getFrameBufferSize();
|
||||
float fbWidth = framebufferSize.width();
|
||||
|
|
|
@ -101,7 +101,7 @@ void Antialiasing::run(const render::SceneContextPointer& sceneContext, const re
|
|||
}
|
||||
|
||||
RenderArgs* args = renderContext->getArgs();
|
||||
gpu::doInBatch(args->_context, [=](gpu::Batch& batch) {
|
||||
gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
|
||||
batch.enableStereo(false);
|
||||
|
||||
auto framebufferCache = DependencyManager::get<FramebufferCache>();
|
||||
|
|
|
@ -295,7 +295,7 @@ void DeferredLightingEffect::addSpotLight(const glm::vec3& position, float radiu
|
|||
}
|
||||
|
||||
void DeferredLightingEffect::prepare(RenderArgs* args) {
|
||||
gpu::doInBatch(args->_context, [=](gpu::Batch& batch) {
|
||||
gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
|
||||
batch.enableStereo(false);
|
||||
batch.setViewportTransform(args->_viewport);
|
||||
batch.setStateScissorRect(args->_viewport);
|
||||
|
@ -326,7 +326,7 @@ void DeferredLightingEffect::prepare(RenderArgs* args) {
|
|||
}
|
||||
|
||||
void DeferredLightingEffect::render(RenderArgs* args) {
|
||||
gpu::doInBatch(args->_context, [=](gpu::Batch& batch) {
|
||||
gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
|
||||
|
||||
// Allocate the parameters buffer used by all the deferred shaders
|
||||
if (!_deferredTransformBuffer[0]._buffer) {
|
||||
|
|
|
@ -64,7 +64,7 @@ void HitEffect::run(const render::SceneContextPointer& sceneContext, const rende
|
|||
assert(renderContext->getArgs());
|
||||
assert(renderContext->getArgs()->_viewFrustum);
|
||||
RenderArgs* args = renderContext->getArgs();
|
||||
gpu::doInBatch(args->_context, [=](gpu::Batch& batch) {
|
||||
gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
|
||||
|
||||
glm::mat4 projMat;
|
||||
Transform viewMat;
|
||||
|
|
|
@ -349,7 +349,7 @@ void DrawStencilDeferred::run(const SceneContextPointer& sceneContext, const Ren
|
|||
|
||||
// from the touched pixel generate the stencil buffer
|
||||
RenderArgs* args = renderContext->getArgs();
|
||||
doInBatch(args->_context, [=](gpu::Batch& batch) {
|
||||
doInBatch(args->_context, [&](gpu::Batch& batch) {
|
||||
args->_batch = &batch;
|
||||
|
||||
auto deferredFboColorDepthStencil = DependencyManager::get<FramebufferCache>()->getDeferredFramebufferDepthColor();
|
||||
|
@ -384,7 +384,7 @@ void DrawBackgroundDeferred::run(const SceneContextPointer& sceneContext, const
|
|||
inItems.emplace_back(id);
|
||||
}
|
||||
RenderArgs* args = renderContext->getArgs();
|
||||
doInBatch(args->_context, [=](gpu::Batch& batch) {
|
||||
doInBatch(args->_context, [&](gpu::Batch& batch) {
|
||||
args->_batch = &batch;
|
||||
|
||||
auto lightingFBO = DependencyManager::get<FramebufferCache>()->getLightingFramebuffer();
|
||||
|
@ -428,7 +428,7 @@ void Blit::run(const SceneContextPointer& sceneContext, const RenderContextPoint
|
|||
auto framebufferCache = DependencyManager::get<FramebufferCache>();
|
||||
auto primaryFbo = framebufferCache->getPrimaryFramebuffer();
|
||||
|
||||
gpu::doInBatch(renderArgs->_context, [=](gpu::Batch& batch) {
|
||||
gpu::doInBatch(renderArgs->_context, [&](gpu::Batch& batch) {
|
||||
batch.setFramebuffer(blitFbo);
|
||||
|
||||
if (renderArgs->_renderMode == RenderArgs::MIRROR_RENDER_MODE) {
|
||||
|
|
|
@ -112,7 +112,7 @@ void ToneMappingEffect::render(RenderArgs* args) {
|
|||
init();
|
||||
}
|
||||
auto framebufferCache = DependencyManager::get<FramebufferCache>();
|
||||
gpu::doInBatch(args->_context, [=](gpu::Batch& batch) {
|
||||
gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
|
||||
batch.enableStereo(false);
|
||||
QSize framebufferSize = framebufferCache->getFrameBufferSize();
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ void DrawStatus::run(const SceneContextPointer& sceneContext,
|
|||
}
|
||||
|
||||
// Allright, something to render let's do it
|
||||
gpu::doInBatch(args->_context, [=](gpu::Batch& batch) {
|
||||
gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
|
||||
glm::mat4 projMat;
|
||||
Transform viewMat;
|
||||
args->_viewFrustum->evalProjectionMatrix(projMat);
|
||||
|
|
|
@ -212,7 +212,7 @@ void DrawLight::run(const SceneContextPointer& sceneContext, const RenderContext
|
|||
args->_details.pointTo(RenderDetails::OTHER_ITEM);
|
||||
cullItems(sceneContext, renderContext, inItems, culledItems);
|
||||
|
||||
gpu::doInBatch(args->_context, [=](gpu::Batch& batch) {
|
||||
gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
|
||||
args->_batch = &batch;
|
||||
renderLights(sceneContext, renderContext, culledItems);
|
||||
args->_batch = nullptr;
|
||||
|
|
Loading…
Reference in a new issue