mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-12 21:02:11 +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.
|
// Note: it is the caller's responsibility to keep the network texture in cache.
|
||||||
if (name.isEmpty()) {
|
if (name.isEmpty()) {
|
||||||
_displayTexture.reset();
|
_displayTexture.reset();
|
||||||
|
clearPreviewFlag();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
auto textureCache = DependencyManager::get<TextureCache>();
|
auto textureCache = DependencyManager::get<TextureCache>();
|
||||||
|
|
|
@ -58,6 +58,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool setDisplayTexture(const QString& name) override;
|
virtual bool setDisplayTexture(const QString& name) override;
|
||||||
|
virtual bool clearPreviewFlag() override { return false; };
|
||||||
QImage getScreenshot(float aspectRatio = 0.0f) const override;
|
QImage getScreenshot(float aspectRatio = 0.0f) const override;
|
||||||
|
|
||||||
float presentRate() const override;
|
float presentRate() const override;
|
||||||
|
|
|
@ -743,19 +743,3 @@ HmdDisplayPlugin::~HmdDisplayPlugin() {
|
||||||
float HmdDisplayPlugin::stutterRate() const {
|
float HmdDisplayPlugin::stutterRate() const {
|
||||||
return _stutterRate.rate();
|
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;
|
float stutterRate() const override;
|
||||||
|
|
||||||
virtual bool setDisplayTexture(const QString& name) override;
|
virtual bool clearPreviewFlag() override { _clearPreviewFlag = true; return true; };
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void hmdPresent() = 0;
|
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.
|
// 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 setDisplayTexture(const QString& name) { return false; }
|
||||||
|
virtual bool clearPreviewFlag() { return false; };
|
||||||
|
|
||||||
virtual float devicePixelRatio() { return 1.0f; }
|
virtual float devicePixelRatio() { return 1.0f; }
|
||||||
// Rate at which we render frames
|
// Rate at which we render frames
|
||||||
|
|
Loading…
Reference in a new issue