mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-29 10:51:10 +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);
|
setToneMappingExposure(renderContext->getTone().exposure);
|
||||||
setToneMappingToneCurve(renderContext->getTone().toneCurve);
|
setToneMappingToneCurve(renderContext->getTone().toneCurve);
|
||||||
|
|
||||||
renderContext->getArgs()->_context->syncCache();
|
|
||||||
|
|
||||||
for (auto job : _jobs) {
|
for (auto job : _jobs) {
|
||||||
job.run(sceneContext, renderContext);
|
job.run(sceneContext, renderContext);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <gpu/Context.h>
|
||||||
|
|
||||||
#include "Engine.h"
|
#include "Engine.h"
|
||||||
|
|
||||||
using namespace render;
|
using namespace render;
|
||||||
|
@ -34,7 +36,9 @@ void Engine::addTask(const TaskPointer& task) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Engine::run() {
|
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) {
|
for (auto task : _tasks) {
|
||||||
task->run(_sceneContext, _renderContext);
|
task->run(_sceneContext, _renderContext);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue