Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 13 files). Show all
Unified · Split
| @@ -205,7 +205,7 @@ void MetavoxelSystem::render() { · 204 unmodified lines | |||
| 205 | glEnableClientState(GL_VERTEX_ARRAY); | 205 | glEnableClientState(GL_VERTEX_ARRAY); |
| 206 | glEnableClientState(GL_TEXTURE_COORD_ARRAY); | 206 | glEnableClientState(GL_TEXTURE_COORD_ARRAY); |
| 207 | 207 | ||
| 208 | TextureCache::getInstance()->setPrimaryDrawBuffers(true, true); | 208 | DependencyManager::get<TextureCache>()->setPrimaryDrawBuffers(true, true); |
| 209 | 209 | ||
| 210 | glDisable(GL_BLEND); | 210 | glDisable(GL_BLEND); |
| 211 | glEnable(GL_CULL_FACE); | 211 | glEnable(GL_CULL_FACE); |
| @@ -251,7 +251,7 @@ void MetavoxelSystem::render() { · 39 unmodified lines | |||
| 251 | glPopMatrix(); | 251 | glPopMatrix(); |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | TextureCache::getInstance()->setPrimaryDrawBuffers(true, false); | 254 | DependencyManager::get<TextureCache>()->setPrimaryDrawBuffers(true, false); |
| 255 | 255 | ||
| 256 | _baseHeightfieldProgram.release(); | 256 | _baseHeightfieldProgram.release(); |
| 257 | 257 | ||
| @@ -348,7 +348,7 @@ void MetavoxelSystem::render() { · 90 unmodified lines | |||
| 348 | } | 348 | } |
| 349 | 349 | ||
| 350 | if (!_voxelBaseBatches.isEmpty()) { | 350 | if (!_voxelBaseBatches.isEmpty()) { |
| 351 | TextureCache::getInstance()->setPrimaryDrawBuffers(true, true); | 351 | DependencyManager::get<TextureCache>()->setPrimaryDrawBuffers(true, true); |
| 352 | 352 | ||
| 353 | glEnableClientState(GL_VERTEX_ARRAY); | 353 | glEnableClientState(GL_VERTEX_ARRAY); |
| 354 | glDisable(GL_BLEND); | 354 | glDisable(GL_BLEND); |
| @@ -383,7 +383,7 @@ void MetavoxelSystem::render() { · 28 unmodified lines | |||
| 383 | glDisable(GL_ALPHA_TEST); | 383 | glDisable(GL_ALPHA_TEST); |
| 384 | glEnable(GL_BLEND); | 384 | glEnable(GL_BLEND); |
| 385 | 385 | ||
| 386 | TextureCache::getInstance()->setPrimaryDrawBuffers(true, false); | 386 | DependencyManager::get<TextureCache>()->setPrimaryDrawBuffers(true, false); |
| 387 | 387 | ||
| 388 | if (!_voxelSplatBatches.isEmpty()) { | 388 | if (!_voxelSplatBatches.isEmpty()) { |
| 389 | glDepthFunc(GL_LEQUAL); | 389 | glDepthFunc(GL_LEQUAL); |
| @@ -463,7 +463,7 @@ void MetavoxelSystem::render() { · 73 unmodified lines | |||
| 463 | } | 463 | } |
| 464 | 464 | ||
| 465 | if (!_hermiteBatches.isEmpty() && Menu::getInstance()->isOptionChecked(MenuOption::DisplayHermiteData)) { | 465 | if (!_hermiteBatches.isEmpty() && Menu::getInstance()->isOptionChecked(MenuOption::DisplayHermiteData)) { |
| 466 | TextureCache::getInstance()->setPrimaryDrawBuffers(true, true); | 466 | DependencyManager::get<TextureCache>()->setPrimaryDrawBuffers(true, true); |
| 467 | 467 | ||
| 468 | glEnableClientState(GL_VERTEX_ARRAY); | 468 | glEnableClientState(GL_VERTEX_ARRAY); |
| 469 | 469 | ||
| @@ -486,7 +486,7 @@ void MetavoxelSystem::render() { · 16 unmodified lines | |||
| 486 | 486 | ||
| 487 | glDisableClientState(GL_VERTEX_ARRAY); | 487 | glDisableClientState(GL_VERTEX_ARRAY); |
| 488 | 488 | ||
| 489 | TextureCache::getInstance()->setPrimaryDrawBuffers(true, false); | 489 | DependencyManager::get<TextureCache>()->setPrimaryDrawBuffers(true, false); |
| 490 | } | 490 | } |
| 491 | _hermiteBatches.clear(); | 491 | _hermiteBatches.clear(); |
| 492 | 492 | ||
| @@ -797,7 +797,7 @@ void MetavoxelSystem::applyMaterialEdit(const MetavoxelEditMessage& message, boo · 304 unmodified lines | |||
| 797 | Q_ARG(bool, reliable)); | 797 | Q_ARG(bool, reliable)); |
| 798 | return; | 798 | return; |
| 799 | } | 799 | } |
| 800 | QSharedPointer<NetworkTexture> texture = TextureCache::getInstance()->getTexture( | 800 | QSharedPointer<NetworkTexture> texture = DependencyManager::get<TextureCache>()->getTexture( |
| 801 | material->getDiffuse(), SPLAT_TEXTURE); | 801 | material->getDiffuse(), SPLAT_TEXTURE); |
| 802 | if (texture->isLoaded()) { | 802 | if (texture->isLoaded()) { |
| 803 | MetavoxelEditMessage newMessage = message; | 803 | MetavoxelEditMessage newMessage = message; |
| @@ -1180,7 +1180,7 @@ void VoxelBuffer::render(bool cursor) { · 376 unmodified lines | |||
| 1180 | for (int i = 0; i < _materials.size(); i++) { | 1180 | for (int i = 0; i < _materials.size(); i++) { |
| 1181 | const SharedObjectPointer material = _materials.at(i); | 1181 | const SharedObjectPointer material = _materials.at(i); |
| 1182 | if (material) { | 1182 | if (material) { |
| 1183 | _networkTextures[i] = TextureCache::getInstance()->getTexture( | 1183 | _networkTextures[i] = DependencyManager::get<TextureCache>()->getTexture( |
| 1184 | static_cast<MaterialObject*>(material.data())->getDiffuse(), SPLAT_TEXTURE); | 1184 | static_cast<MaterialObject*>(material.data())->getDiffuse(), SPLAT_TEXTURE); |
| 1185 | } | 1185 | } |
| 1186 | } | 1186 | } |
| @@ -2234,7 +2234,7 @@ void HeightfieldNodeRenderer::render(const HeightfieldNodePointer& node, const g · 1047 unmodified lines | |||
| 2234 | for (int i = 0; i < materials.size(); i++) { | 2234 | for (int i = 0; i < materials.size(); i++) { |
| 2235 | const SharedObjectPointer& material = materials.at(i); | 2235 | const SharedObjectPointer& material = materials.at(i); |
| 2236 | if (material) { | 2236 | if (material) { |
| 2237 | _networkTextures[i] = TextureCache::getInstance()->getTexture( | 2237 | _networkTextures[i] = DependencyManager::get<TextureCache>()->getTexture( |
| 2238 | static_cast<MaterialObject*>(material.data())->getDiffuse(), SPLAT_TEXTURE); | 2238 | static_cast<MaterialObject*>(material.data())->getDiffuse(), SPLAT_TEXTURE); |
| 2239 | } | 2239 | } |
| 2240 | } | 2240 | } |