mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 00:13:29 +02:00
Removing flicker from OpenVR mirror
This commit is contained in:
parent
d1583e8cbe
commit
8289c39a2a
2 changed files with 1 additions and 8 deletions
|
@ -32,6 +32,7 @@ protected:
|
||||||
glm::mat4 _cullingProjection;
|
glm::mat4 _cullingProjection;
|
||||||
glm::uvec2 _renderTargetSize;
|
glm::uvec2 _renderTargetSize;
|
||||||
float _ipd { 0.064f };
|
float _ipd { 0.064f };
|
||||||
|
private:
|
||||||
bool _enablePreview { false };
|
bool _enablePreview { false };
|
||||||
bool _monoPreview { true };
|
bool _monoPreview { true };
|
||||||
};
|
};
|
||||||
|
|
|
@ -88,10 +88,6 @@ void OpenVrDisplayPlugin::customizeContext() {
|
||||||
glGetError();
|
glGetError();
|
||||||
});
|
});
|
||||||
HmdDisplayPlugin::customizeContext();
|
HmdDisplayPlugin::customizeContext();
|
||||||
|
|
||||||
enableVsync(false);
|
|
||||||
// Only enable mirroring if we know vsync is disabled
|
|
||||||
_enablePreview = !isVsyncEnabled();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenVrDisplayPlugin::resetSensors() {
|
void OpenVrDisplayPlugin::resetSensors() {
|
||||||
|
@ -118,10 +114,6 @@ void OpenVrDisplayPlugin::internalPresent() {
|
||||||
|
|
||||||
glFinish();
|
glFinish();
|
||||||
|
|
||||||
if (_enablePreview) {
|
|
||||||
swapBuffers();
|
|
||||||
}
|
|
||||||
|
|
||||||
_compositor->WaitGetPoses(_presentThreadTrackedDevicePose, vr::k_unMaxTrackedDeviceCount, nullptr, 0);
|
_compositor->WaitGetPoses(_presentThreadTrackedDevicePose, vr::k_unMaxTrackedDeviceCount, nullptr, 0);
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue