mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 08:29:33 +02:00
On to a full rendered pipeline
This commit is contained in:
parent
47e15345c3
commit
c8e30ef39e
4 changed files with 16 additions and 7 deletions
|
@ -34,5 +34,8 @@ bool Context::makeProgram(Shader& shader, const Shader::BindingSet& bindings) {
|
||||||
|
|
||||||
void Context::render(Batch& batch) {
|
void Context::render(Batch& batch) {
|
||||||
_backend->render(batch);
|
_backend->render(batch);
|
||||||
// GLBackend::renderBatch(batch, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Context::syncCache() {
|
||||||
|
_backend->syncCache();
|
||||||
|
}
|
|
@ -33,6 +33,7 @@ public:
|
||||||
|
|
||||||
virtual~ Backend() {};
|
virtual~ Backend() {};
|
||||||
virtual void render(Batch& batch) = 0;
|
virtual void render(Batch& batch) = 0;
|
||||||
|
virtual void syncCache() = 0;
|
||||||
|
|
||||||
class TransformObject {
|
class TransformObject {
|
||||||
public:
|
public:
|
||||||
|
@ -115,6 +116,7 @@ public:
|
||||||
|
|
||||||
void render(Batch& batch);
|
void render(Batch& batch);
|
||||||
|
|
||||||
|
void syncCache();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Context(const Context& context);
|
Context(const Context& context);
|
||||||
|
|
|
@ -30,6 +30,12 @@ public:
|
||||||
|
|
||||||
virtual void render(Batch& batch);
|
virtual void render(Batch& batch);
|
||||||
|
|
||||||
|
// This call synchronize the Full Backend cache with the current GLState
|
||||||
|
// THis is only intended to be used when mixing raw gl calls with the gpu api usage in order to sync
|
||||||
|
// the gpu::Backend state with the true gl state which has probably been messed up by these ugly naked gl calls
|
||||||
|
// Let's try to avoid to do that as much as possible!
|
||||||
|
virtual void syncCache();
|
||||||
|
|
||||||
// Render Batch create a local Context and execute the batch with it
|
// Render Batch create a local Context and execute the batch with it
|
||||||
// WARNING:
|
// WARNING:
|
||||||
// if syncCache is true, then the gpu::GLBackend will synchornize
|
// if syncCache is true, then the gpu::GLBackend will synchornize
|
||||||
|
@ -195,12 +201,6 @@ public:
|
||||||
|
|
||||||
void do_setStateColorWriteMask(uint32 mask);
|
void do_setStateColorWriteMask(uint32 mask);
|
||||||
|
|
||||||
// This call synchronize the Full Backend cache with the current GLState
|
|
||||||
// THis is only intended to be used when mixing raw gl calls with the gpu api usage in order to sync
|
|
||||||
// the gpu::Backend state with the true gl state which has probably been messed up by these ugly naked gl calls
|
|
||||||
// Let's try to avoid to do that as much as possible!
|
|
||||||
void syncCache();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Draw Stage
|
// Draw Stage
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
//
|
//
|
||||||
#include "RenderDeferredTask.h"
|
#include "RenderDeferredTask.h"
|
||||||
|
|
||||||
|
#include "gpu/Context.h"
|
||||||
|
|
||||||
using namespace render;
|
using namespace render;
|
||||||
|
|
||||||
RenderDeferredTask::RenderDeferredTask() : Task() {
|
RenderDeferredTask::RenderDeferredTask() : Task() {
|
||||||
|
@ -34,6 +36,8 @@ void RenderDeferredTask::run(const SceneContextPointer& sceneContext, const Rend
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderContext->args->_context->syncCache();
|
||||||
|
|
||||||
for (auto job : _jobs) {
|
for (auto job : _jobs) {
|
||||||
job.run(sceneContext, renderContext);
|
job.run(sceneContext, renderContext);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue