mirror of
https://github.com/overte-org/overte.git
synced 2025-07-15 15:56:43 +02:00
50 lines
1.4 KiB
C++
50 lines
1.4 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 "OculusBaseDisplayPlugin.h"
|
|
|
|
class OculusDisplayPlugin : public OculusBaseDisplayPlugin {
|
|
using Parent = OculusBaseDisplayPlugin;
|
|
public:
|
|
OculusDisplayPlugin();
|
|
~OculusDisplayPlugin();
|
|
const QString getName() const override { return NAME; }
|
|
|
|
void init() override;
|
|
|
|
QString getPreferredAudioInDevice() const override;
|
|
QString getPreferredAudioOutDevice() const override;
|
|
float getTargetFrameRate() const override;
|
|
|
|
virtual QJsonObject getHardwareStats() const;
|
|
|
|
protected:
|
|
QThread::Priority getPresentPriority() override { return QThread::TimeCriticalPriority; }
|
|
|
|
bool internalActivate() override;
|
|
void hmdPresent() override;
|
|
bool isHmdMounted() const override;
|
|
void customizeContext() override;
|
|
void uncustomizeContext() override;
|
|
void cycleDebugOutput() override;
|
|
|
|
private:
|
|
static const char* NAME;
|
|
ovrTextureSwapChain _textureSwapChain;
|
|
gpu::FramebufferPointer _outputFramebuffer;
|
|
bool _customized { false };
|
|
|
|
std::atomic_bool _aswActive;
|
|
std::atomic_int _compositorDroppedFrames;
|
|
std::atomic_int _appDroppedFrames;
|
|
std::atomic_int _longSubmits;
|
|
std::atomic_int _longRenders;
|
|
std::atomic_int _longFrames;
|
|
};
|
|
|