History

use TextureCache::getInstance() instead of Application::getInstance()->getTextureCache()

ZappoMan committed 11 years ago

Commit e9ea6b21 parent 2df4c0110 files · +49 −49Browse files

Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 10 files). Show all

Unified · Split

interface/src/MetavoxelSystem.cpp+9−9
@@ -205,7 +205,7 @@ void MetavoxelSystem::render() { · 204 unmodified lines
205205 glEnableClientState(GL_VERTEX_ARRAY);
206206 glEnableClientState(GL_TEXTURE_COORD_ARRAY);
207207
208− Application::getInstance()->getTextureCache()->setPrimaryDrawBuffers(true, true);
208+ TextureCache::getInstance()->setPrimaryDrawBuffers(true, true);
209209
210210 glDisable(GL_BLEND);
211211 glEnable(GL_CULL_FACE);
@@ -251,7 +251,7 @@ void MetavoxelSystem::render() { · 39 unmodified lines
251251 glPopMatrix();
252252 }
253253
254− Application::getInstance()->getTextureCache()->setPrimaryDrawBuffers(true, false);
254+ TextureCache::getInstance()->setPrimaryDrawBuffers(true, false);
255255
256256 _baseHeightfieldProgram.release();
257257
@@ -348,7 +348,7 @@ void MetavoxelSystem::render() { · 90 unmodified lines
348348 }
349349
350350 if (!_voxelBaseBatches.isEmpty()) {
351− Application::getInstance()->getTextureCache()->setPrimaryDrawBuffers(true, true);
351+ TextureCache::getInstance()->setPrimaryDrawBuffers(true, true);
352352
353353 glEnableClientState(GL_VERTEX_ARRAY);
354354 glDisable(GL_BLEND);
@@ -383,7 +383,7 @@ void MetavoxelSystem::render() { · 28 unmodified lines
383383 glDisable(GL_ALPHA_TEST);
384384 glEnable(GL_BLEND);
385385
386− Application::getInstance()->getTextureCache()->setPrimaryDrawBuffers(true, false);
386+ TextureCache::getInstance()->setPrimaryDrawBuffers(true, false);
387387
388388 if (!_voxelSplatBatches.isEmpty()) {
389389 glDepthFunc(GL_LEQUAL);
@@ -463,7 +463,7 @@ void MetavoxelSystem::render() { · 73 unmodified lines
463463 }
464464
465465 if (!_hermiteBatches.isEmpty() && Menu::getInstance()->isOptionChecked(MenuOption::DisplayHermiteData)) {
466− Application::getInstance()->getTextureCache()->setPrimaryDrawBuffers(true, true);
466+ TextureCache::getInstance()->setPrimaryDrawBuffers(true, true);
467467
468468 glEnableClientState(GL_VERTEX_ARRAY);
469469
@@ -486,7 +486,7 @@ void MetavoxelSystem::render() { · 16 unmodified lines
486486
487487 glDisableClientState(GL_VERTEX_ARRAY);
488488
489− Application::getInstance()->getTextureCache()->setPrimaryDrawBuffers(true, false);
489+ TextureCache::getInstance()->setPrimaryDrawBuffers(true, false);
490490 }
491491 _hermiteBatches.clear();
492492
@@ -797,7 +797,7 @@ void MetavoxelSystem::applyMaterialEdit(const MetavoxelEditMessage& message, boo · 304 unmodified lines
797797 Q_ARG(bool, reliable));
798798 return;
799799 }
800− QSharedPointer<NetworkTexture> texture = Application::getInstance()->getTextureCache()->getTexture(
800+ QSharedPointer<NetworkTexture> texture = TextureCache::getInstance()->getTexture(
801801 material->getDiffuse(), SPLAT_TEXTURE);
802802 if (texture->isLoaded()) {
803803 MetavoxelEditMessage newMessage = message;
@@ -1180,7 +1180,7 @@ void VoxelBuffer::render(bool cursor) { · 376 unmodified lines
11801180 for (int i = 0; i < _materials.size(); i++) {
11811181 const SharedObjectPointer material = _materials.at(i);
11821182 if (material) {
1183− _networkTextures[i] = Application::getInstance()->getTextureCache()->getTexture(
1183+ _networkTextures[i] = TextureCache::getInstance()->getTexture(
11841184 static_cast<MaterialObject*>(material.data())->getDiffuse(), SPLAT_TEXTURE);
11851185 }
11861186 }
@@ -2234,7 +2234,7 @@ void HeightfieldNodeRenderer::render(const HeightfieldNodePointer& node, const g · 1047 unmodified lines
22342234 for (int i = 0; i < materials.size(); i++) {
22352235 const SharedObjectPointer& material = materials.at(i);
22362236 if (material) {
2237− _networkTextures[i] = Application::getInstance()->getTextureCache()->getTexture(
2237+ _networkTextures[i] = TextureCache::getInstance()->getTexture(
22382238 static_cast<MaterialObject*>(material.data())->getDiffuse(), SPLAT_TEXTURE);
22392239 }
22402240 }

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