History

fix snapshots and preview

SamGondelman committed 7 years ago

Commit e7d12dc1 parent c730e5114 files · +101 −85Browse files

Showing the changes to interface/src/graphics/GraphicsEngine.cpp (1 of 14 files). Show all

Unified · Split

interface/src/graphics/GraphicsEngine.cpp+3−1
@@ -245,6 +245,7 @@ void GraphicsEngine::render_performFrame() { · 244 unmodified lines
245 }245 }
246 246
247 std::queue<Application::SnapshotOperator> snapshotOperators;247 std::queue<Application::SnapshotOperator> snapshotOperators;
248 std::queue<Application::SecondarySnapshotOperator> secondarySnapshotOperators;
248 if (!_programsCompiled.load()) {249 if (!_programsCompiled.load()) {
249 gpu::doInBatch("splashFrame", _gpuContext, [&](gpu::Batch& batch) {250 gpu::doInBatch("splashFrame", _gpuContext, [&](gpu::Batch& batch) {
250 batch.setFramebuffer(finalFramebuffer);251 batch.setFramebuffer(finalFramebuffer);
@@ -273,12 +274,12 @@ void GraphicsEngine::render_performFrame() { · 22 unmodified lines
273 renderArgs._hudOperator = displayPlugin->getHUDOperator();274 renderArgs._hudOperator = displayPlugin->getHUDOperator();
274 renderArgs._hudTexture = qApp->getApplicationOverlay().getOverlayTexture();275 renderArgs._hudTexture = qApp->getApplicationOverlay().getOverlayTexture();
275 renderArgs._takingSnapshot = qApp->takeSnapshotOperators(snapshotOperators);276 renderArgs._takingSnapshot = qApp->takeSnapshotOperators(snapshotOperators);
277 qApp->takeSecondarySnapshotOperators(secondarySnapshotOperators);
276 renderArgs._blitFramebuffer = finalFramebuffer;278 renderArgs._blitFramebuffer = finalFramebuffer;
277 render_runRenderFrame(&renderArgs);279 render_runRenderFrame(&renderArgs);
278 }280 }
279 }281 }
280 282
281 qDebug() << "boop" << renderArgs._takingSnapshot << snapshotOperators.size();
282 auto frame = getGPUContext()->endFrame();283 auto frame = getGPUContext()->endFrame();
283 frame->frameIndex = _renderFrameCount;284 frame->frameIndex = _renderFrameCount;
284 frame->framebuffer = finalFramebuffer;285 frame->framebuffer = finalFramebuffer;
@@ -289,6 +290,7 @@ void GraphicsEngine::render_performFrame() { · 4 unmodified lines
289 }290 }
290 };291 };
291 frame->snapshotOperators = snapshotOperators;292 frame->snapshotOperators = snapshotOperators;
293 frame->secondarySnapshotOperators = secondarySnapshotOperators;
292 // deliver final scene rendering commands to the display plugin294 // deliver final scene rendering commands to the display plugin
293 {295 {
294 PROFILE_RANGE(render, "/pluginOutput");296 PROFILE_RANGE(render, "/pluginOutput");