3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-26 12:55:27 +02:00

Fix camera position not being set for angular loading

This commit is contained in:
Ryan Huffman 2016-07-28 13:19:53 -07:00
parent 77e993510e
commit 4f9be2ae72
4 changed files with 6 additions and 2 deletions
interface/src
libraries
entities-renderer/src
render-utils/src

View file

@ -1635,6 +1635,8 @@ void Application::paintGL() {
return;
}
DependencyManager::get<EntityTreeRenderer>()->cameraPosition = getMyAvatar()->getPosition();
_inPaint = true;
Finally clearFlag([this] { _inPaint = false; });

View file

@ -46,6 +46,8 @@ public:
virtual PacketType getExpectedPacketType() const { return PacketType::EntityData; }
virtual void setTree(OctreePointer newTree);
glm::vec3 cameraPosition {};
void shutdown();
void update();

View file

@ -827,7 +827,7 @@ void Model::setURL(const QUrl& url) {
deleteGeometry();
auto resource = DependencyManager::get<ModelCache>()->getGeometryResource(url);
resource->setLoadPriority(this, priority);
resource->setLoadPriority(this, _loadingPriority);
_renderWatcher.setResource(resource);
onInvalidate();
}

View file

@ -238,7 +238,7 @@ public:
// returns 'true' if needs fullUpdate after geometry change
bool updateGeometry();
float setLoadingPriority(float priority) { _loadingPriority = priority; }
void setLoadingPriority(float priority) { _loadingPriority = priority; }
public slots:
void loadURLFinished(bool success);