Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 5 files). Show all
Unified · Split
| @@ -1177,10 +1177,11 @@ void VoxelBuffer::render(bool cursor) { · 1176 unmodified lines | ||
| 1177 | 1177 | |
| 1178 | 1178 | if (!_materials.isEmpty()) { |
| 1179 | 1179 | _networkTextures.resize(_materials.size()); |
| 1180 | + TextureCache* textureCache = DependencyManager::get<TextureCache>(); | |
| 1180 | 1181 | for (int i = 0; i < _materials.size(); i++) { |
| 1181 | 1182 | const SharedObjectPointer material = _materials.at(i); |
| 1182 | 1183 | if (material) { |
| 1183 | − _networkTextures[i] = DependencyManager::get<TextureCache>()->getTexture( | |
| 1184 | + _networkTextures[i] = textureCache->getTexture( | |
| 1184 | 1185 | static_cast<MaterialObject*>(material.data())->getDiffuse(), SPLAT_TEXTURE); |
| 1185 | 1186 | } |
| 1186 | 1187 | } |
| @@ -2231,10 +2232,11 @@ void HeightfieldNodeRenderer::render(const HeightfieldNodePointer& node, const g · 1044 unmodified lines | ||
| 2231 | 2232 | |
| 2232 | 2233 | const QVector<SharedObjectPointer>& materials = node->getMaterial()->getMaterials(); |
| 2233 | 2234 | _networkTextures.resize(materials.size()); |
| 2235 | + TextureCache* textureCache = DependencyManager::get<TextureCache>(); | |
| 2234 | 2236 | for (int i = 0; i < materials.size(); i++) { |
| 2235 | 2237 | const SharedObjectPointer& material = materials.at(i); |
| 2236 | 2238 | if (material) { |
| 2237 | − _networkTextures[i] = DependencyManager::get<TextureCache>()->getTexture( | |
| 2239 | + _networkTextures[i] = textureCache->getTexture( | |
| 2238 | 2240 | static_cast<MaterialObject*>(material.data())->getDiffuse(), SPLAT_TEXTURE); |
| 2239 | 2241 | } |
| 2240 | 2242 | } |