From a388ba7b005aacd85a538ff9ed755925f421d5fa Mon Sep 17 00:00:00 2001 From: Sam Gateau Date: Fri, 21 Aug 2015 16:45:52 -0700 Subject: [PATCH] fix conflicts --- interface/src/Application.cpp | 9 ----- libraries/render-utils/src/Model.cpp | 39 --------------------- libraries/render-utils/src/Model.h | 4 --- libraries/render-utils/src/TextureCache.cpp | 20 ----------- libraries/render-utils/src/TextureCache.h | 9 ----- 5 files changed, 81 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index a7765b37aa..50d60b4cb3 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3419,21 +3419,12 @@ namespace render { PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "Application::displaySide() ... atmosphere..."); -<<<<<<< HEAD - } - } else if (skyStage->getBackgroundMode() == model::SunSkyStage::SKY_BOX) { - skybox = skyStage->getSkybox(); - if (skybox) { - gpu::Batch batch; - model::Skybox::render(batch, *getDisplayViewFrustum(), *skybox); -======= background->_environment->renderAtmospheres(batch, *(args->_viewFrustum)); } } } else if (skyStage->getBackgroundMode() == model::SunSkyStage::SKY_BOX) { PerformanceTimer perfTimer("skybox"); ->>>>>>> 518cf3be1504234eb0dc22906876e292b2186f57 skybox = skyStage->getSkybox(); if (skybox) { diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index b2604ec90a..b642e5f955 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -186,12 +186,7 @@ void Model::RenderPipelineLib::initLocations(gpu::ShaderPointer& program, Model: locations.texcoordMatrices = program->getUniforms().findLocation("texcoordMatrices"); locations.emissiveParams = program->getUniforms().findLocation("emissiveParams"); locations.glowIntensity = program->getUniforms().findLocation("glowIntensity"); -<<<<<<< HEAD - locations.normalFittingScaleMapUnit = program->getTextures().findLocation("normalFittingScaleMap"); - -======= locations.normalFittingMapUnit = program->getTextures().findLocation("normalFittingMap"); ->>>>>>> 518cf3be1504234eb0dc22906876e292b2186f57 locations.specularTextureUnit = program->getTextures().findLocation("specularMap"); locations.emissiveTextureUnit = program->getTextures().findLocation("emissiveMap"); locations.materialBufferUnit = program->getBuffers().findLocation("materialBuffer"); @@ -1783,42 +1778,8 @@ void Model::pickPrograms(gpu::Batch& batch, RenderMode mode, bool translucent, f } if ((locations->glowIntensity > -1) && (mode != RenderArgs::SHADOW_RENDER_MODE)) { -<<<<<<< HEAD - GLBATCH(glUniform1f)(locations->glowIntensity, DependencyManager::get()->getIntensity()); - } - - if ((locations->normalFittingScaleMapUnit > -1)) { - batch.setUniformTexture(locations->normalFittingScaleMapUnit, DependencyManager::get()->getNormalFittingScaleTexture()); - } -} - -int Model::renderMeshesForModelsInScene(gpu::Batch& batch, RenderMode mode, bool translucent, float alphaThreshold, - bool hasLightmap, bool hasTangents, bool hasSpecular, bool isSkinned, bool isWireframe, RenderArgs* args) { - - PROFILE_RANGE(__FUNCTION__); - int meshPartsRendered = 0; - - bool pickProgramsNeeded = true; - Locations* locations = nullptr; - - foreach(Model* model, _modelsInScene) { - QVector* whichList = model->pickMeshList(translucent, alphaThreshold, hasLightmap, hasTangents, hasSpecular, isSkinned, isWireframe); - if (whichList) { - QVector& list = *whichList; - if (list.size() > 0) { - if (pickProgramsNeeded) { - pickPrograms(batch, mode, translucent, alphaThreshold, hasLightmap, hasTangents, hasSpecular, isSkinned, isWireframe, args, locations); - pickProgramsNeeded = false; - } - - model->setupBatchTransform(batch, args); - meshPartsRendered += model->renderMeshesFromList(list, batch, mode, translucent, alphaThreshold, args, locations); - } - } -======= const float DEFAULT_GLOW_INTENSITY = 1.0f; // FIXME - glow is removed batch._glUniform1f(locations->glowIntensity, DEFAULT_GLOW_INTENSITY); ->>>>>>> 518cf3be1504234eb0dc22906876e292b2186f57 } if ((locations->normalFittingMapUnit > -1)) { diff --git a/libraries/render-utils/src/Model.h b/libraries/render-utils/src/Model.h index 1dd6c6b0e8..e55bff6aca 100644 --- a/libraries/render-utils/src/Model.h +++ b/libraries/render-utils/src/Model.h @@ -337,11 +337,7 @@ private: int emissiveTextureUnit; int emissiveParams; int glowIntensity; -<<<<<<< HEAD - int normalFittingScaleMapUnit; -======= int normalFittingMapUnit; ->>>>>>> 518cf3be1504234eb0dc22906876e292b2186f57 int materialBufferUnit; int clusterMatrices; int clusterIndices; diff --git a/libraries/render-utils/src/TextureCache.cpp b/libraries/render-utils/src/TextureCache.cpp index bcf6818669..deeec58f49 100644 --- a/libraries/render-utils/src/TextureCache.cpp +++ b/libraries/render-utils/src/TextureCache.cpp @@ -29,18 +29,7 @@ #include "RenderUtilsLogging.h" -<<<<<<< HEAD -#include "PathUtils.h" - -TextureCache::TextureCache() : - _permutationNormalTexture(0), - _whiteTexture(0), - _blueTexture(0), - _frameBufferSize(100, 100) -{ -======= TextureCache::TextureCache() { ->>>>>>> 518cf3be1504234eb0dc22906876e292b2186f57 const qint64 TEXTURE_DEFAULT_UNUSED_MAX_SIZE = DEFAULT_UNUSED_MAX_SIZE; setUnusedResourceCacheSize(TEXTURE_DEFAULT_UNUSED_MAX_SIZE); } @@ -133,14 +122,6 @@ const gpu::TexturePointer& TextureCache::getBlueTexture() { return _blueTexture; } -<<<<<<< HEAD -const gpu::TexturePointer& TextureCache::getNormalFittingScaleTexture() { - if (!_NFSTexture) { - // _NFSTexture = getTexture(QUrl("http://advances.realtimerendering.com/s2010/Kaplanyan-CryEngine3(SIGGRAPH%202010%20Advanced%20RealTime%20Rendering%20Course)-NormalsFittingTexture.dds")); - _NFSTexture = getTexture(QUrl::fromLocalFile(PathUtils::resourcesPath() + "images/NormalsFittingTexture.dds")); - } - return _NFSTexture->getGPUTexture(); -======= const gpu::TexturePointer& TextureCache::getBlackTexture() { if (!_blackTexture) { _blackTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1)); @@ -155,7 +136,6 @@ const gpu::TexturePointer& TextureCache::getNormalFittingTexture() { _normalFittingTexture = getImageTexture(PathUtils::resourcesPath() + "images/normalFittingScale.dds"); } return _normalFittingTexture; ->>>>>>> 518cf3be1504234eb0dc22906876e292b2186f57 } /// Extra data for creating textures. diff --git a/libraries/render-utils/src/TextureCache.h b/libraries/render-utils/src/TextureCache.h index 95ea9a7469..eeb17f07b9 100644 --- a/libraries/render-utils/src/TextureCache.h +++ b/libraries/render-utils/src/TextureCache.h @@ -51,16 +51,11 @@ public: /// Returns the a pale blue texture (useful for a normal map). const gpu::TexturePointer& getBlueTexture(); -<<<<<<< HEAD - // Returns a map used to compress the normals through a fitting scale algorithm - const gpu::TexturePointer& getNormalFittingScaleTexture(); -======= /// Returns the a black texture (useful for a default). const gpu::TexturePointer& getBlackTexture(); // Returns a map used to compress the normals through a fitting scale algorithm const gpu::TexturePointer& getNormalFittingTexture(); ->>>>>>> 518cf3be1504234eb0dc22906876e292b2186f57 /// Returns a texture version of an image file static gpu::TexturePointer getImageTexture(const QString& path); @@ -83,12 +78,8 @@ private: gpu::TexturePointer _whiteTexture; gpu::TexturePointer _grayTexture; gpu::TexturePointer _blueTexture; -<<<<<<< HEAD - NetworkTexturePointer _NFSTexture; -======= gpu::TexturePointer _blackTexture; gpu::TexturePointer _normalFittingTexture; ->>>>>>> 518cf3be1504234eb0dc22906876e292b2186f57 QHash > _dilatableNetworkTextures; };