History

move DeferredLightingEffect and AmbientOcclusionEffect to libraries, make them DependencyManager enabled

ZappoMan committed 11 years ago

Commit fc1e1ec1 parent 4d79a0815 files · +84 −61Browse files

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

Unified · Split

interface/src/MetavoxelSystem.cpp+5−4
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121
2222 #include <glm/gtx/transform.hpp>
2323
24+#include <DeferredLightingEffect.h>
2425 #include <GeometryUtil.h>
2526 #include <SharedUtil.h>
2627
@@ -470,7 +471,7 @@ void MetavoxelSystem::render() { · 443 unmodified lines
470471 glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
471472 glNormal3f(0.0f, 1.0f, 0.0f);
472473
473− Application::getInstance()->getDeferredLightingEffect()->bindSimpleProgram();
474+ DependencyManager::get<DeferredLightingEffect>()->bindSimpleProgram();
474475
475476 foreach (const HermiteBatch& batch, _hermiteBatches) {
476477 batch.vertexBuffer->bind();
@@ -482,7 +483,7 @@ void MetavoxelSystem::render() { · 5 unmodified lines
482483 batch.vertexBuffer->release();
483484 }
484485
485− Application::getInstance()->getDeferredLightingEffect()->releaseSimpleProgram();
486+ DependencyManager::get<DeferredLightingEffect>()->releaseSimpleProgram();
486487
487488 glDisableClientState(GL_VERTEX_ARRAY);
488489
@@ -1981,7 +1982,7 @@ void SphereRenderer::render(const MetavoxelLOD& lod, bool contained, bool cursor · 1492 unmodified lines
19811982 glm::vec3 axis = glm::axis(rotation);
19821983 glRotatef(glm::degrees(glm::angle(rotation)), axis.x, axis.y, axis.z);
19831984
1984− Application::getInstance()->getDeferredLightingEffect()->renderSolidSphere(sphere->getScale(), 32, 32);
1985+ DependencyManager::get<DeferredLightingEffect>()->renderSolidSphere(sphere->getScale(), 32, 32);
19851986
19861987 glPopMatrix();
19871988 }
@@ -2002,7 +2003,7 @@ void CuboidRenderer::render(const MetavoxelLOD& lod, bool contained, bool cursor · 14 unmodified lines
20022003 glRotatef(glm::degrees(glm::angle(rotation)), axis.x, axis.y, axis.z);
20032004 glScalef(1.0f, cuboid->getAspectY(), cuboid->getAspectZ());
20042005
2005− Application::getInstance()->getDeferredLightingEffect()->renderSolidCube(cuboid->getScale() * 2.0f);
2006+ DependencyManager::get<DeferredLightingEffect>()->renderSolidCube(cuboid->getScale() * 2.0f);
20062007
20072008 glPopMatrix();
20082009 }

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