mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 03:44:27 +02:00
* Moved getHeadPose and _headPoseCache out of each derived class and into HmdDisplayPlugin. * updated comment in application.
39 lines
1 KiB
C++
39 lines
1 KiB
C++
//
|
|
// Created by Bradley Austin Davis on 2015/05/29
|
|
// Copyright 2015 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
#pragma once
|
|
|
|
#include <display-plugins/hmd/HmdDisplayPlugin.h>
|
|
|
|
#include <QTimer>
|
|
|
|
#include <OVR_CAPI_GL.h>
|
|
|
|
class OculusBaseDisplayPlugin : public HmdDisplayPlugin {
|
|
using Parent = HmdDisplayPlugin;
|
|
public:
|
|
virtual bool isSupported() const override;
|
|
|
|
// Stereo specific methods
|
|
virtual void resetSensors() override final;
|
|
virtual void updateHeadPose(uint32_t frameIndex) override;
|
|
|
|
protected:
|
|
void customizeContext() override;
|
|
void internalActivate() override;
|
|
void internalDeactivate() override;
|
|
|
|
protected:
|
|
ovrSession _session;
|
|
ovrGraphicsLuid _luid;
|
|
float _ipd{ OVR_DEFAULT_IPD };
|
|
ovrEyeRenderDesc _eyeRenderDescs[2];
|
|
ovrFovPort _eyeFovs[2];
|
|
ovrHmdDesc _hmdDesc;
|
|
ovrLayerEyeFov _sceneLayer;
|
|
ovrViewScaleDesc _viewScaleDesc;
|
|
};
|