mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
Move GL context sync to render Engine (from Task)
This commit is contained in:
parent
70cc7d87e4
commit
5c9c34377e
2 changed files with 5 additions and 3 deletions
|
@ -186,8 +186,6 @@ void RenderDeferredTask::run(const SceneContextPointer& sceneContext, const Rend
|
|||
setToneMappingExposure(renderContext->getTone().exposure);
|
||||
setToneMappingToneCurve(renderContext->getTone().toneCurve);
|
||||
|
||||
renderContext->getArgs()->_context->syncCache();
|
||||
|
||||
for (auto job : _jobs) {
|
||||
job.run(sceneContext, renderContext);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include <gpu/Context.h>
|
||||
|
||||
#include "Engine.h"
|
||||
|
||||
using namespace render;
|
||||
|
@ -34,7 +36,9 @@ void Engine::addTask(const TaskPointer& task) {
|
|||
}
|
||||
|
||||
void Engine::run() {
|
||||
// TODO: Tasks will need to be specified such that their data can feed into each other
|
||||
// Sync GPU state before beginning to render
|
||||
_renderContext->getArgs()->_context->syncCache();
|
||||
|
||||
for (auto task : _tasks) {
|
||||
task->run(_sceneContext, _renderContext);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue