mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-06 18:29:06 +02:00
Clear the frame buffer in all cases.
This commit is contained in:
parent
b59e9f9899
commit
7b56cfbeae
1 changed files with 12 additions and 12 deletions
|
@ -51,19 +51,19 @@ void DrawOverlay3D::run(const RenderContextPointer& renderContext, const Inputs&
|
||||||
config->setNumDrawn((int)inItems.size());
|
config->setNumDrawn((int)inItems.size());
|
||||||
emit config->numDrawnChanged();
|
emit config->numDrawnChanged();
|
||||||
|
|
||||||
|
RenderArgs* args = renderContext->args;
|
||||||
|
|
||||||
|
// Clear the framebuffer without stereo
|
||||||
|
// Needs to be distinct from the other batch because using the clear call
|
||||||
|
// while stereo is enabled triggers a warning
|
||||||
|
if (_opaquePass) {
|
||||||
|
gpu::doInBatch("DrawOverlay3D::run::clear", args->_context, [&](gpu::Batch& batch) {
|
||||||
|
batch.enableStereo(false);
|
||||||
|
batch.clearFramebuffer(gpu::Framebuffer::BUFFER_DEPTH, glm::vec4(), 1.f, 0, false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!inItems.empty()) {
|
if (!inItems.empty()) {
|
||||||
RenderArgs* args = renderContext->args;
|
|
||||||
|
|
||||||
// Clear the framebuffer without stereo
|
|
||||||
// Needs to be distinct from the other batch because using the clear call
|
|
||||||
// while stereo is enabled triggers a warning
|
|
||||||
if (_opaquePass) {
|
|
||||||
gpu::doInBatch("DrawOverlay3D::run::clear", args->_context, [&](gpu::Batch& batch){
|
|
||||||
batch.enableStereo(false);
|
|
||||||
batch.clearFramebuffer(gpu::Framebuffer::BUFFER_DEPTH, glm::vec4(), 1.f, 0, false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Render the items
|
// Render the items
|
||||||
gpu::doInBatch("DrawOverlay3D::main", args->_context, [&](gpu::Batch& batch) {
|
gpu::doInBatch("DrawOverlay3D::main", args->_context, [&](gpu::Batch& batch) {
|
||||||
args->_batch = &batch;
|
args->_batch = &batch;
|
||||||
|
|
Loading…
Reference in a new issue