History

Keep normal and dilatable textures in separate maps to fix crash on manly "man" model.

Andrzej Kapolka committed 13 years ago

Commit 6a265ea1 parent 8631cc32 files · +15 −5Browse files

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

Unified · Split

interface/src/renderer/TextureCache.cpp+13−4
@@ -107,10 +107,19 @@ GLuint TextureCache::getFileTextureID(const QString& filename) { · 106 unmodified lines
107107 }
108108
109109 QSharedPointer<NetworkTexture> TextureCache::getTexture(const QUrl& url, bool dilatable) {
110− QSharedPointer<NetworkTexture> texture = _networkTextures.value(url);
111− if (texture.isNull()) {
112− texture = QSharedPointer<NetworkTexture>(dilatable ? new DilatableNetworkTexture(url) : new NetworkTexture(url));
113− _networkTextures.insert(url, texture);
110+ QSharedPointer<NetworkTexture> texture;
111+ if (dilatable) {
112+ texture = _dilatableNetworkTextures.value(url);
113+ if (texture.isNull()) {
114+ texture = QSharedPointer<NetworkTexture>(new DilatableNetworkTexture(url));
115+ _dilatableNetworkTextures.insert(url, texture);
116+ }
117+ } else {
118+ texture = _networkTextures.value(url);
119+ if (texture.isNull()) {
120+ texture = QSharedPointer<NetworkTexture>(new NetworkTexture(url));
121+ _networkTextures.insert(url, texture);
122+ }
114123 }
115124 return texture;
116125 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t