mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-11 19:32:28 +02:00
Fix crash in vive and interleaved stereo plugins
This commit is contained in:
parent
af25a7bf6e
commit
5483971855
3 changed files with 7 additions and 1 deletions
|
@ -720,7 +720,7 @@ void OpenGLDisplayPlugin::present() {
|
|||
}
|
||||
|
||||
gpu::Backend::freeGPUMemSize.set(gpu::gl::getFreeDedicatedMemory());
|
||||
} else {
|
||||
} else if (alwaysPresent()) {
|
||||
internalPresent();
|
||||
}
|
||||
_movingAveragePresent.addSample((float)(usecTimestampNow() - startPresent));
|
||||
|
|
|
@ -88,6 +88,11 @@ protected:
|
|||
|
||||
glm::uvec2 getSurfaceSize() const;
|
||||
glm::uvec2 getSurfacePixels() const;
|
||||
// Some display plugins require us to always execute some present logic,
|
||||
// whether we have a frame or not (Oculus Mobile plugin)
|
||||
// Such plugins must be prepared to do the right thing if the `_currentFrame`
|
||||
// is not populated
|
||||
virtual bool alwaysPresent() const { return false; }
|
||||
|
||||
void updateCompositeFramebuffer();
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ protected:
|
|||
void internalPresent() override;
|
||||
void hmdPresent() override { throw std::runtime_error("Unused"); }
|
||||
bool isHmdMounted() const override;
|
||||
bool alwaysPresent() const override { return true; }
|
||||
|
||||
static const char* NAME;
|
||||
mutable gl::Context* _mainContext{ nullptr };
|
||||
|
|
Loading…
Reference in a new issue