diff options
author | Jacek Antonelli | 2008-08-15 23:45:55 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:55 -0500 |
commit | 9063e60aefe54f7c45aaa8cb24e8998b2c7343ab (patch) | |
tree | 1c8235465701c910a5d76448ddc8eb1f14457ebc /linden/indra/newview/pipeline.cpp | |
parent | Second Life viewer sources 1.20.9 (diff) | |
download | meta-impy-9063e60aefe54f7c45aaa8cb24e8998b2c7343ab.zip meta-impy-9063e60aefe54f7c45aaa8cb24e8998b2c7343ab.tar.gz meta-impy-9063e60aefe54f7c45aaa8cb24e8998b2c7343ab.tar.bz2 meta-impy-9063e60aefe54f7c45aaa8cb24e8998b2c7343ab.tar.xz |
Second Life viewer sources 1.20.10
Diffstat (limited to 'linden/indra/newview/pipeline.cpp')
-rw-r--r-- | linden/indra/newview/pipeline.cpp | 59 |
1 files changed, 18 insertions, 41 deletions
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index 67bf647..5088b16 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp | |||
@@ -217,7 +217,6 @@ BOOL LLPipeline::sDisableShaders = FALSE; | |||
217 | BOOL LLPipeline::sRenderBump = TRUE; | 217 | BOOL LLPipeline::sRenderBump = TRUE; |
218 | BOOL LLPipeline::sUseFarClip = TRUE; | 218 | BOOL LLPipeline::sUseFarClip = TRUE; |
219 | BOOL LLPipeline::sSkipUpdate = FALSE; | 219 | BOOL LLPipeline::sSkipUpdate = FALSE; |
220 | BOOL LLPipeline::sDynamicReflections = FALSE; | ||
221 | BOOL LLPipeline::sWaterReflections = FALSE; | 220 | BOOL LLPipeline::sWaterReflections = FALSE; |
222 | BOOL LLPipeline::sRenderGlow = FALSE; | 221 | BOOL LLPipeline::sRenderGlow = FALSE; |
223 | BOOL LLPipeline::sReflectionRender = FALSE; | 222 | BOOL LLPipeline::sReflectionRender = FALSE; |
@@ -474,15 +473,14 @@ void LLPipeline::createGLBuffers() | |||
474 | { | 473 | { |
475 | assertInitialized(); | 474 | assertInitialized(); |
476 | 475 | ||
477 | if (LLPipeline::sDynamicReflections || | 476 | if (LLPipeline::sWaterReflections) |
478 | LLPipeline::sWaterReflections) | ||
479 | { //water reflection texture | 477 | { //water reflection texture |
480 | U32 res = (U32) gSavedSettings.getS32("RenderWaterRefResolution"); | 478 | U32 res = (U32) gSavedSettings.getS32("RenderWaterRefResolution"); |
481 | 479 | ||
482 | mWaterRef.allocate(res,res,GL_RGBA,TRUE); | 480 | mWaterRef.allocate(res,res,GL_RGBA,TRUE); |
483 | mWaterDis.allocate(res,res,GL_RGBA,TRUE); | 481 | mWaterDis.allocate(res,res,GL_RGBA,TRUE); |
484 | 482 | ||
485 | if (LLPipeline::sDynamicReflections) | 483 | #if 0 //cube map buffers (keep for future work) |
486 | { | 484 | { |
487 | //reflection map generation buffers | 485 | //reflection map generation buffers |
488 | if (mCubeFrameBuffer == 0) | 486 | if (mCubeFrameBuffer == 0) |
@@ -538,8 +536,10 @@ void LLPipeline::createGLBuffers() | |||
538 | } | 536 | } |
539 | } | 537 | } |
540 | } | 538 | } |
539 | #endif | ||
541 | } | 540 | } |
542 | 541 | ||
542 | |||
543 | stop_glerror(); | 543 | stop_glerror(); |
544 | 544 | ||
545 | if (LLPipeline::sRenderGlow) | 545 | if (LLPipeline::sRenderGlow) |
@@ -910,6 +910,15 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) | |||
910 | } | 910 | } |
911 | 911 | ||
912 | mLights.erase(drawablep); | 912 | mLights.erase(drawablep); |
913 | for (light_set_t::iterator iter = mNearbyLights.begin(); | ||
914 | iter != mNearbyLights.end(); iter++) | ||
915 | { | ||
916 | if (iter->drawable == drawablep) | ||
917 | { | ||
918 | mNearbyLights.erase(iter); | ||
919 | break; | ||
920 | } | ||
921 | } | ||
913 | } | 922 | } |
914 | 923 | ||
915 | U32 LLPipeline::addObject(LLViewerObject *vobj) | 924 | U32 LLPipeline::addObject(LLViewerObject *vobj) |
@@ -2124,8 +2133,6 @@ void LLPipeline::postSort(LLCamera& camera) | |||
2124 | } func; | 2133 | } func; |
2125 | LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func); | 2134 | LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func); |
2126 | } | 2135 | } |
2127 | |||
2128 | LLSpatialGroup::sNoDelete = FALSE; | ||
2129 | } | 2136 | } |
2130 | 2137 | ||
2131 | 2138 | ||
@@ -3147,6 +3154,11 @@ void LLPipeline::calcNearbyLights(LLCamera& camera) | |||
3147 | { | 3154 | { |
3148 | assertInitialized(); | 3155 | assertInitialized(); |
3149 | 3156 | ||
3157 | if (LLPipeline::sReflectionRender) | ||
3158 | { | ||
3159 | return; | ||
3160 | } | ||
3161 | |||
3150 | if (mLightingDetail >= 1) | 3162 | if (mLightingDetail >= 1) |
3151 | { | 3163 | { |
3152 | // mNearbyLight (and all light_set_t's) are sorted such that | 3164 | // mNearbyLight (and all light_set_t's) are sorted such that |
@@ -4801,21 +4813,6 @@ void LLPipeline::renderBloom(BOOL for_snapshot) | |||
4801 | 4813 | ||
4802 | } | 4814 | } |
4803 | 4815 | ||
4804 | void LLPipeline::processImagery(LLCamera& camera) | ||
4805 | { | ||
4806 | for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); | ||
4807 | iter != LLWorld::getInstance()->getRegionList().end(); ++iter) | ||
4808 | { | ||
4809 | LLViewerRegion* region = *iter; | ||
4810 | LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_VOLUME); | ||
4811 | if (part) | ||
4812 | { | ||
4813 | part->processImagery(&camera); | ||
4814 | } | ||
4815 | } | ||
4816 | } | ||
4817 | |||
4818 | |||
4819 | inline float sgn(float a) | 4816 | inline float sgn(float a) |
4820 | { | 4817 | { |
4821 | if (a > 0.0F) return (1.0F); | 4818 | if (a > 0.0F) return (1.0F); |
@@ -5026,26 +5023,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) | |||
5026 | } | 5023 | } |
5027 | } | 5024 | } |
5028 | 5025 | ||
5029 | LLCubeMap* LLPipeline::findReflectionMap(const LLVector3& location) | ||
5030 | { | ||
5031 | LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosAgent(location); | ||
5032 | if (region) | ||
5033 | { | ||
5034 | LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_VOLUME); | ||
5035 | if (part) | ||
5036 | { | ||
5037 | LLSpatialGroup::OctreeNode* node = part->mOctree->getNodeAt(LLVector3d(location), 32.0); | ||
5038 | if (node) | ||
5039 | { | ||
5040 | LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); | ||
5041 | return group->mReflectionMap; | ||
5042 | } | ||
5043 | } | ||
5044 | } | ||
5045 | |||
5046 | return NULL; | ||
5047 | } | ||
5048 | |||
5049 | void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture) | 5026 | void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture) |
5050 | { | 5027 | { |
5051 | for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) | 5028 | for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) |