History

pipe texture names through to NetworkTexture

Stephen Birarda committed 12 years ago

Commit 047ee0a1 parent 1949a475 files · +26 −10Browse files

Showing the changes to interface/src/renderer/GeometryCache.cpp (1 of 5 files). Show all

Unified · Split

interface/src/renderer/GeometryCache.cpp+4−0
@@ -405,6 +405,7 @@ void GeometryCache::renderGrid(int xDivisions, int yDivisions) { · 404 unmodified lines
405405 }
406406
407407 QSharedPointer<NetworkGeometry> GeometryCache::getGeometry(const QUrl& url, const QUrl& fallback, bool delayLoad) {
408+ qDebug() << "Getting a resource at" << url;
408409 return getResource(url, fallback, delayLoad).staticCast<NetworkGeometry>();
409410 }
410411
@@ -727,18 +728,21 @@ void NetworkGeometry::setGeometry(const FBXGeometry& geometry) { · 316 unmodified lines
727728 networkPart.diffuseTexture = Application::getInstance()->getTextureCache()->getTexture(
728729 _textureBase.resolved(QUrl(part.diffuseTexture.filename)), DEFAULT_TEXTURE,
729730 mesh.isEye, part.diffuseTexture.content);
731+ networkPart.diffuseTexture->setName(part.diffuseTexture.name);
730732 networkPart.diffuseTexture->setLoadPriorities(_loadPriorities);
731733 }
732734 if (!part.normalTexture.filename.isEmpty()) {
733735 networkPart.normalTexture = Application::getInstance()->getTextureCache()->getTexture(
734736 _textureBase.resolved(QUrl(part.normalTexture.filename)), NORMAL_TEXTURE,
735737 false, part.normalTexture.content);
738+ networkPart.normalTexture->setName(part.normalTexture.name);
736739 networkPart.normalTexture->setLoadPriorities(_loadPriorities);
737740 }
738741 if (!part.specularTexture.filename.isEmpty()) {
739742 networkPart.specularTexture = Application::getInstance()->getTextureCache()->getTexture(
740743 _textureBase.resolved(QUrl(part.specularTexture.filename)), SPECULAR_TEXTURE,
741744 false, part.specularTexture.content);
745+ networkPart.specularTexture->setName(part.specularTexture.name);
742746 networkPart.specularTexture->setLoadPriorities(_loadPriorities);
743747 }
744748 networkMesh.parts.append(networkPart);