mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Howard's CR comments
This commit is contained in:
parent
834a2a5c3b
commit
1088d248e3
5 changed files with 4 additions and 17 deletions
|
@ -706,6 +706,7 @@ bool OpenGLDisplayPlugin::setDisplayTexture(const QString& name) {
|
|||
// Note: it is the caller's responsibility to keep the network texture in cache.
|
||||
if (name.isEmpty()) {
|
||||
_displayTexture.reset();
|
||||
clearPreviewFlag();
|
||||
return true;
|
||||
}
|
||||
auto textureCache = DependencyManager::get<TextureCache>();
|
||||
|
|
|
@ -58,6 +58,7 @@ public:
|
|||
}
|
||||
|
||||
virtual bool setDisplayTexture(const QString& name) override;
|
||||
virtual bool clearPreviewFlag() override { return false; };
|
||||
QImage getScreenshot(float aspectRatio = 0.0f) const override;
|
||||
|
||||
float presentRate() const override;
|
||||
|
|
|
@ -743,19 +743,3 @@ HmdDisplayPlugin::~HmdDisplayPlugin() {
|
|||
float HmdDisplayPlugin::stutterRate() const {
|
||||
return _stutterRate.rate();
|
||||
}
|
||||
|
||||
bool HmdDisplayPlugin::setDisplayTexture(const QString& name) {
|
||||
// Note: it is the caller's responsibility to keep the network texture in cache.
|
||||
if (name.isEmpty()) {
|
||||
_displayTexture.reset();
|
||||
_clearPreviewFlag = true;
|
||||
return true;
|
||||
}
|
||||
auto textureCache = DependencyManager::get<TextureCache>();
|
||||
auto displayNetworkTexture = textureCache->getTexture(name);
|
||||
if (!displayNetworkTexture) {
|
||||
return false;
|
||||
}
|
||||
_displayTexture = displayNetworkTexture->getGPUTexture();
|
||||
return !!_displayTexture;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
|
||||
float stutterRate() const override;
|
||||
|
||||
virtual bool setDisplayTexture(const QString& name) override;
|
||||
virtual bool clearPreviewFlag() override { _clearPreviewFlag = true; return true; };
|
||||
|
||||
protected:
|
||||
virtual void hmdPresent() = 0;
|
||||
|
|
|
@ -186,6 +186,7 @@ public:
|
|||
|
||||
// Set the texture to display on the monitor and return true, if allowed. Empty string resets.
|
||||
virtual bool setDisplayTexture(const QString& name) { return false; }
|
||||
virtual bool clearPreviewFlag() { return false; };
|
||||
|
||||
virtual float devicePixelRatio() { return 1.0f; }
|
||||
// Rate at which we render frames
|
||||
|
|
Loading…
Reference in a new issue