History

rename model:: -> graphics::

humbletim committed 8 years ago

Commit b91d5361 parent 08ccda971 files · +340 −340Browse files

Showing the changes to libraries/render-utils/src/DeferredLightingEffect.cpp (1 of 71 files). Show all

Unified · Split

libraries/render-utils/src/DeferredLightingEffect.cpp+21−21
@@ -103,13 +103,13 @@ void DeferredLightingEffect::init() { · 102 unmodified lines
103103
104104 void DeferredLightingEffect::setupKeyLightBatch(const RenderArgs* args, gpu::Batch& batch, int lightBufferUnit, int ambientBufferUnit, int skyboxCubemapUnit) {
105105 PerformanceTimer perfTimer("DLE->setupBatch()");
106− model::LightPointer keySunLight;
106+ graphics::LightPointer keySunLight;
107107 auto lightStage = args->_scene->getStage<LightStage>();
108108 if (lightStage) {
109109 keySunLight = lightStage->getCurrentKeyLight();
110110 }
111111
112− model::LightPointer keyAmbiLight;
112+ graphics::LightPointer keyAmbiLight;
113113 if (lightStage) {
114114 keyAmbiLight = lightStage->getCurrentAmbientLight();
115115 }
@@ -229,9 +229,9 @@ static void loadLightProgram(const char* vertSource, const char* fragSource, boo · 113 unmodified lines
229229
230230 #include <shared/Shapes.h>
231231
232−model::MeshPointer DeferredLightingEffect::getPointLightMesh() {
232+graphics::MeshPointer DeferredLightingEffect::getPointLightMesh() {
233233 if (!_pointLightMesh) {
234− _pointLightMesh = std::make_shared<model::Mesh>();
234+ _pointLightMesh = std::make_shared<graphics::Mesh>();
235235
236236 // let's use a icosahedron
237237 auto solid = geometry::icosahedron();
@@ -256,19 +256,19 @@ model::MeshPointer DeferredLightingEffect::getPointLightMesh() { · 18 unmodified lines
256256 delete[] indexData;
257257
258258
259− std::vector<model::Mesh::Part> parts;
260− parts.push_back(model::Mesh::Part(0, nbIndices, 0, model::Mesh::TRIANGLES));
261− parts.push_back(model::Mesh::Part(0, nbIndices, 0, model::Mesh::LINE_STRIP)); // outline version
259+ std::vector<graphics::Mesh::Part> parts;
260+ parts.push_back(graphics::Mesh::Part(0, nbIndices, 0, graphics::Mesh::TRIANGLES));
261+ parts.push_back(graphics::Mesh::Part(0, nbIndices, 0, graphics::Mesh::LINE_STRIP)); // outline version
262262
263263
264− _pointLightMesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(model::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL));
264+ _pointLightMesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(graphics::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL));
265265 }
266266 return _pointLightMesh;
267267 }
268268
269−model::MeshPointer DeferredLightingEffect::getSpotLightMesh() {
269+graphics::MeshPointer DeferredLightingEffect::getSpotLightMesh() {
270270 if (!_spotLightMesh) {
271− _spotLightMesh = std::make_shared<model::Mesh>();
271+ _spotLightMesh = std::make_shared<graphics::Mesh>();
272272
273273 int slices = 16;
274274 int rings = 3;
@@ -353,12 +353,12 @@ model::MeshPointer DeferredLightingEffect::getSpotLightMesh() { · 78 unmodified lines
353353 delete[] indexData;
354354
355355
356− std::vector<model::Mesh::Part> parts;
357− parts.push_back(model::Mesh::Part(0, indices, 0, model::Mesh::TRIANGLES));
358− parts.push_back(model::Mesh::Part(0, indices, 0, model::Mesh::LINE_STRIP)); // outline version
356+ std::vector<graphics::Mesh::Part> parts;
357+ parts.push_back(graphics::Mesh::Part(0, indices, 0, graphics::Mesh::TRIANGLES));
358+ parts.push_back(graphics::Mesh::Part(0, indices, 0, graphics::Mesh::LINE_STRIP)); // outline version
359359
360360
361− _spotLightMesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(model::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL));
361+ _spotLightMesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(graphics::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL));
362362 }
363363 return _spotLightMesh;
364364 }
@@ -439,7 +439,7 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext, · 74 unmodified lines
439439 const DeferredFrameTransformPointer& frameTransform,
440440 const DeferredFramebufferPointer& deferredFramebuffer,
441441 const LightingModelPointer& lightingModel,
442− const model::HazePointer& haze,
442+ const graphics::HazePointer& haze,
443443 const SurfaceGeometryFramebufferPointer& surfaceGeometryFramebuffer,
444444 const AmbientOcclusionFramebufferPointer& ambientOcclusionFramebuffer,
445445 const SubsurfaceScatteringResourcePointer& subsurfaceScatteringResource) {
@@ -513,7 +513,7 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext, · 67 unmodified lines
513513
514514 auto keyLight = lightAndShadow.first;
515515
516− model::LightPointer keyAmbientLight;
516+ graphics::LightPointer keyAmbientLight;
517517 if (lightStage && lightStage->_currentFrame._ambientLights.size()) {
518518 keyAmbientLight = lightStage->getLight(lightStage->_currentFrame._ambientLights.front());
519519 }
@@ -744,12 +744,12 @@ void DefaultLightingSetup::run(const RenderContextPointer& renderContext) { · 224 unmodified lines
744744 if (lightStage) {
745745
746746 // Allocate a default global light directional and ambient
747− auto lp = std::make_shared<model::Light>();
748− lp->setType(model::Light::SUN);
747+ auto lp = std::make_shared<graphics::Light>();
748+ lp->setType(graphics::Light::SUN);
749749 lp->setDirection(glm::vec3(-1.0f));
750750 lp->setColor(glm::vec3(1.0f));
751751 lp->setIntensity(1.0f);
752− lp->setType(model::Light::SUN);
752+ lp->setType(graphics::Light::SUN);
753753 lp->setAmbientSpherePreset(gpu::SphericalHarmonics::Preset::OLD_TOWN_SQUARE);
754754
755755 lp->setAmbientIntensity(0.5f);
@@ -771,7 +771,7 @@ void DefaultLightingSetup::run(const RenderContextPointer& renderContext) { · 15 unmodified lines
771771 auto backgroundStage = renderContext->_scene->getStage<BackgroundStage>();
772772 if (backgroundStage) {
773773
774− auto background = std::make_shared<model::SunSkyStage>();
774+ auto background = std::make_shared<graphics::SunSkyStage>();
775775 background->setSkybox(_defaultSkybox);
776776
777777 // capture deault background
@@ -786,7 +786,7 @@ void DefaultLightingSetup::run(const RenderContextPointer& renderContext) { · 8 unmodified lines
786786 auto hazeStage = renderContext->_scene->getStage<HazeStage>();
787787 if (hazeStage) {
788788
789− auto haze = std::make_shared<model::Haze>();
789+ auto haze = std::make_shared<graphics::Haze>();
790790
791791 _defaultHaze = haze;
792792 _defaultHazeID = hazeStage->addHaze(_defaultHaze);

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