mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 02:24:51 +02:00
not as buggy. Still need ogl work, major cleanup, etc...
This commit is contained in:
parent
6d64261e94
commit
9b5b99c2b9
1 changed files with 5 additions and 3 deletions
|
@ -22,7 +22,6 @@ ResourceImageItem::ResourceImageItem(QQuickItem* parent) : QQuickFramebufferObje
|
||||||
void ResourceImageItem::setUrl(const QString& url) {
|
void ResourceImageItem::setUrl(const QString& url) {
|
||||||
if (url != m_url) {
|
if (url != m_url) {
|
||||||
m_url = url;
|
m_url = url;
|
||||||
update();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,11 +29,14 @@ void ResourceImageItem::setReady(bool ready) {
|
||||||
if (ready != m_ready) {
|
if (ready != m_ready) {
|
||||||
m_ready = ready;
|
m_ready = ready;
|
||||||
if (m_ready) {
|
if (m_ready) {
|
||||||
|
// 10 HZ for now. Also this serves as a small
|
||||||
|
// delay before getting the network texture, which
|
||||||
|
// helps a lot. TODO: find better way.
|
||||||
m_updateTimer.start(100);
|
m_updateTimer.start(100);
|
||||||
} else {
|
} else {
|
||||||
m_updateTimer.stop();
|
m_updateTimer.stop();
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
update();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +64,7 @@ void ResourceImageItemRenderer::synchronize(QQuickFramebufferObject* item) {
|
||||||
_networkTexture = DependencyManager::get<TextureCache>()->getTexture(_url);
|
_networkTexture = DependencyManager::get<TextureCache>()->getTexture(_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_networkTexture) {
|
if (_networkTexture && _networkTexture->isLoaded()) {
|
||||||
qDebug() << "copying texture";
|
qDebug() << "copying texture";
|
||||||
auto texture = _networkTexture->getGPUTexture();
|
auto texture = _networkTexture->getGPUTexture();
|
||||||
if (texture) {
|
if (texture) {
|
||||||
|
|
Loading…
Reference in a new issue