mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 08:21:24 +02:00
Fix camera position not being set for angular loading
This commit is contained in:
parent
77e993510e
commit
4f9be2ae72
4 changed files with 6 additions and 2 deletions
|
@ -1635,6 +1635,8 @@ void Application::paintGL() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DependencyManager::get<EntityTreeRenderer>()->cameraPosition = getMyAvatar()->getPosition();
|
||||||
|
|
||||||
_inPaint = true;
|
_inPaint = true;
|
||||||
Finally clearFlag([this] { _inPaint = false; });
|
Finally clearFlag([this] { _inPaint = false; });
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,8 @@ public:
|
||||||
virtual PacketType getExpectedPacketType() const { return PacketType::EntityData; }
|
virtual PacketType getExpectedPacketType() const { return PacketType::EntityData; }
|
||||||
virtual void setTree(OctreePointer newTree);
|
virtual void setTree(OctreePointer newTree);
|
||||||
|
|
||||||
|
glm::vec3 cameraPosition {};
|
||||||
|
|
||||||
void shutdown();
|
void shutdown();
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
|
|
|
@ -827,7 +827,7 @@ void Model::setURL(const QUrl& url) {
|
||||||
deleteGeometry();
|
deleteGeometry();
|
||||||
|
|
||||||
auto resource = DependencyManager::get<ModelCache>()->getGeometryResource(url);
|
auto resource = DependencyManager::get<ModelCache>()->getGeometryResource(url);
|
||||||
resource->setLoadPriority(this, priority);
|
resource->setLoadPriority(this, _loadingPriority);
|
||||||
_renderWatcher.setResource(resource);
|
_renderWatcher.setResource(resource);
|
||||||
onInvalidate();
|
onInvalidate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,7 +238,7 @@ public:
|
||||||
// returns 'true' if needs fullUpdate after geometry change
|
// returns 'true' if needs fullUpdate after geometry change
|
||||||
bool updateGeometry();
|
bool updateGeometry();
|
||||||
|
|
||||||
float setLoadingPriority(float priority) { _loadingPriority = priority; }
|
void setLoadingPriority(float priority) { _loadingPriority = priority; }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void loadURLFinished(bool success);
|
void loadURLFinished(bool success);
|
||||||
|
|
Loading…
Reference in a new issue