mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 08:14:48 +02:00
OpenVR: Moved WaitGetPoses after main window preview.
This commit is contained in:
parent
63d6f888e6
commit
0d046b12de
4 changed files with 6 additions and 0 deletions
|
@ -149,6 +149,8 @@ void HmdDisplayPlugin::internalPresent() {
|
|||
});
|
||||
swapBuffers();
|
||||
}
|
||||
|
||||
postPreview();
|
||||
}
|
||||
|
||||
void HmdDisplayPlugin::setEyeRenderPose(uint32_t frameIndex, Eye eye, const glm::mat4& pose) {
|
||||
|
|
|
@ -31,6 +31,7 @@ public:
|
|||
protected:
|
||||
virtual void hmdPresent() = 0;
|
||||
virtual bool isHmdMounted() const = 0;
|
||||
virtual void postPreview() {};
|
||||
|
||||
void internalActivate() override;
|
||||
void compositeOverlay() override;
|
||||
|
|
|
@ -152,7 +152,9 @@ void OpenVrDisplayPlugin::hmdPresent() {
|
|||
|
||||
_compositor->Submit(vr::Eye_Left, &texture, &leftBounds);
|
||||
_compositor->Submit(vr::Eye_Right, &texture, &rightBounds);
|
||||
}
|
||||
|
||||
void OpenVrDisplayPlugin::postPreview() {
|
||||
vr::TrackedDevicePose_t currentTrackedDevicePose[vr::k_unMaxTrackedDeviceCount];
|
||||
_compositor->WaitGetPoses(currentTrackedDevicePose, vr::k_unMaxTrackedDeviceCount, nullptr, 0);
|
||||
_hmdActivityLevel = _system->GetTrackedDeviceActivityLevel(vr::k_unTrackedDeviceIndex_Hmd);
|
||||
|
|
|
@ -35,6 +35,7 @@ protected:
|
|||
|
||||
void hmdPresent() override;
|
||||
bool isHmdMounted() const override;
|
||||
void postPreview() override;
|
||||
|
||||
private:
|
||||
vr::IVRSystem* _system { nullptr };
|
||||
|
|
Loading…
Reference in a new issue