Changeset 967
- Timestamp:
- 08/04/08 12:30:41 (4 months ago)
- Files:
-
- branches/shadow-draft-2/doc/asset_urls.txt (modified) (1 diff)
- branches/shadow-draft-2/indra/llcommon/llfasttimer.h (modified) (1 diff)
- branches/shadow-draft-2/indra/llcommon/lluuid.cpp (modified) (1 diff)
- branches/shadow-draft-2/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl (modified) (1 diff)
- branches/shadow-draft-2/indra/newview/lldrawpoolavatar.cpp (modified) (3 diffs)
- branches/shadow-draft-2/indra/newview/lldrawpoolterrain.cpp (modified) (3 diffs)
- branches/shadow-draft-2/indra/newview/lldrawpooltree.cpp (modified) (3 diffs)
- branches/shadow-draft-2/indra/newview/llfasttimerview.cpp (modified) (1 diff)
- branches/shadow-draft-2/indra/newview/llspatialpartition.cpp (modified) (7 diffs)
- branches/shadow-draft-2/indra/newview/llspatialpartition.h (modified) (3 diffs)
- branches/shadow-draft-2/indra/newview/llviewerdisplay.cpp (modified) (1 diff)
- branches/shadow-draft-2/indra/newview/llviewermenu.cpp (modified) (1 diff)
- branches/shadow-draft-2/indra/newview/llviewerobject.cpp (modified) (1 diff)
- branches/shadow-draft-2/indra/newview/llvoiceclient.cpp (modified) (3 diffs)
- branches/shadow-draft-2/indra/newview/llvopartgroup.cpp (modified) (1 diff)
- branches/shadow-draft-2/indra/newview/llvovolume.cpp (modified) (12 diffs)
- branches/shadow-draft-2/indra/newview/pipeline.cpp (modified) (19 diffs)
- branches/shadow-draft-2/indra/newview/pipeline.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/shadow-draft-2/doc/asset_urls.txt
r940 r967 2 2 # https://wiki.secondlife.com/wiki/Get_source_and_compile 3 3 4 SLASSET_MD5=http://secondlife.com/developers/opensource/downloads/2008/0 7/md5sums-shadow-draft-2-r93306.txt5 SLASSET_ART=http://secondlife.com/developers/opensource/downloads/2008/0 7/slviewer-artwork-shadow-draft-2-r93306.zip6 SLASSET_LIBS_DARWIN=http://secondlife.com/developers/opensource/downloads/2008/0 7/slviewer-darwin-libs-shadow-draft-2-r93306.tar.gz7 SLASSET_LIBS_WIN32=http://secondlife.com/developers/opensource/downloads/2008/0 7/slviewer-win32-libs-shadow-draft-2-r93306.zip8 SLASSET_LIBS_LINUXI386=http://secondlife.com/developers/opensource/downloads/2008/0 7/slviewer-linux-libs-shadow-draft-2-r93306.tar.gz4 SLASSET_MD5=http://secondlife.com/developers/opensource/downloads/2008/08/md5sums-shadow-draft-2-r93542.txt 5 SLASSET_ART=http://secondlife.com/developers/opensource/downloads/2008/08/slviewer-artwork-shadow-draft-2-r93542.zip 6 SLASSET_LIBS_DARWIN=http://secondlife.com/developers/opensource/downloads/2008/08/slviewer-darwin-libs-shadow-draft-2-r93542.tar.gz 7 SLASSET_LIBS_WIN32=http://secondlife.com/developers/opensource/downloads/2008/08/slviewer-win32-libs-shadow-draft-2-r93542.zip 8 SLASSET_LIBS_LINUXI386=http://secondlife.com/developers/opensource/downloads/2008/08/slviewer-linux-libs-shadow-draft-2-r93542.tar.gz branches/shadow-draft-2/indra/llcommon/llfasttimer.h
r743 r967 71 71 72 72 // common render components 73 FTM_SHADOW_GEOMETRY, 74 FTM_SHADOW_RENDER, 75 FTM_SHADOW_TERRAIN, 76 FTM_SHADOW_AVATAR, 77 FTM_SHADOW_SIMPLE, 78 FTM_SHADOW_ALPHA, 79 FTM_SHADOW_TREE, 80 73 81 FTM_RENDER_GEOMETRY, 74 82 FTM_RENDER_TERRAIN, branches/shadow-draft-2/indra/llcommon/lluuid.cpp
r714 r967 185 185 memcpy(bytes, mData, UUID_BYTES); /* Flawfinder: ignore */ 186 186 bytes[UUID_BYTES] = '\0'; 187 out = bytes;187 out.assign(bytes, UUID_BYTES); 188 188 } 189 189 branches/shadow-draft-2/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
r940 r967 30 30 vec2 tc = gl_FragCoord.xy - dlt*kern_scale; 31 31 32 const int c_kern_length = 8; 33 32 34 for (int i = 0; i < kern_length; i++) 33 35 { branches/shadow-draft-2/indra/newview/lldrawpoolavatar.cpp
r743 r967 254 254 void LLDrawPoolAvatar::beginShadowPass(S32 pass) 255 255 { 256 LLFastTimer t(LLFastTimer::FTM_ RENDER_CHARACTERS);256 LLFastTimer t(LLFastTimer::FTM_SHADOW_AVATAR); 257 257 258 258 sVertexProgram = &gDeferredAvatarShadowProgram; … … 276 276 void LLDrawPoolAvatar::endShadowPass(S32 pass) 277 277 { 278 LLFastTimer t(LLFastTimer::FTM_ RENDER_CHARACTERS);278 LLFastTimer t(LLFastTimer::FTM_SHADOW_AVATAR); 279 279 280 280 if (sShaderLevel > 0) … … 290 290 void LLDrawPoolAvatar::renderShadow(S32 pass) 291 291 { 292 LLFastTimer t(LLFastTimer::FTM_SHADOW_AVATAR); 292 293 if (!gRenderAvatar) 293 294 { branches/shadow-draft-2/indra/newview/lldrawpoolterrain.cpp
r893 r967 258 258 void LLDrawPoolTerrain::beginShadowPass(S32 pass) 259 259 { 260 LLFastTimer t(LLFastTimer::FTM_ RENDER_TERRAIN);260 LLFastTimer t(LLFastTimer::FTM_SHADOW_TERRAIN); 261 261 LLFacePool::beginRenderPass(pass); 262 262 LLViewerImage::unbindTexture(0); … … 266 266 void LLDrawPoolTerrain::endShadowPass(S32 pass) 267 267 { 268 LLFastTimer t(LLFastTimer::FTM_ RENDER_TERRAIN);268 LLFastTimer t(LLFastTimer::FTM_SHADOW_TERRAIN); 269 269 LLFacePool::endRenderPass(pass); 270 270 gDeferredShadowProgram.unbind(); … … 273 273 void LLDrawPoolTerrain::renderShadow(S32 pass) 274 274 { 275 LLFastTimer t(LLFastTimer::FTM_ RENDER_TERRAIN);275 LLFastTimer t(LLFastTimer::FTM_SHADOW_TERRAIN); 276 276 if (mDrawFace.empty()) 277 277 { branches/shadow-draft-2/indra/newview/lldrawpooltree.cpp
r761 r967 92 92 void LLDrawPoolTree::render(S32 pass) 93 93 { 94 LLFastTimer t(LL FastTimer::FTM_RENDER_TREES);94 LLFastTimer t(LLPipeline::sShadowRender ? LLFastTimer::FTM_SHADOW_TREE : LLFastTimer::FTM_RENDER_TREES); 95 95 96 96 if (mDrawFace.empty()) … … 162 162 void LLDrawPoolTree::beginShadowPass(S32 pass) 163 163 { 164 LLFastTimer t(LLFastTimer::FTM_ RENDER_TREES);164 LLFastTimer t(LLFastTimer::FTM_SHADOW_TREE); 165 165 gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); 166 166 gDeferredShadowProgram.bind(); … … 174 174 void LLDrawPoolTree::endShadowPass(S32 pass) 175 175 { 176 LLFastTimer t(LLFastTimer::FTM_ RENDER_TREES);176 LLFastTimer t(LLFastTimer::FTM_SHADOW_TREE); 177 177 gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); 178 178 gDeferredShadowProgram.unbind(); branches/shadow-draft-2/indra/newview/llfasttimerview.cpp
r893 r967 162 162 // { LLFastTimer::FTM_REBUILD_CLOUD_VB, " Cloud", &LLColor4::cyan3, 0 }, 163 163 { LLFastTimer::FTM_REBUILD_GRASS_VB, " Grass", &LLColor4::cyan4, 0 }, 164 { LLFastTimer::FTM_RENDER_GEOMETRY, " Geometry", &LLColor4::green2, 1 }, 164 { LLFastTimer::FTM_SHADOW_RENDER, " Shadow", &LLColor4::green5, 1 }, 165 { LLFastTimer::FTM_SHADOW_SIMPLE, " Simple", &LLColor4::yellow2, 1 }, 166 { LLFastTimer::FTM_SHADOW_ALPHA, " Alpha", &LLColor4::yellow6, 1 }, 167 { LLFastTimer::FTM_SHADOW_TERRAIN, " Terrain", &LLColor4::green6, 1 }, 168 { LLFastTimer::FTM_SHADOW_AVATAR, " Avatar", &LLColor4::yellow1, 1 }, 169 { LLFastTimer::FTM_SHADOW_TREE, " Tree", &LLColor4::yellow8, 1 }, 170 { LLFastTimer::FTM_RENDER_GEOMETRY, " Geometry", &LLColor4::green2, 1 }, 165 171 { LLFastTimer::FTM_POOLS, " Pools", &LLColor4::green3, 1 }, 166 172 { LLFastTimer::FTM_POOLRENDER, " RenderPool", &LLColor4::green4, 1 }, branches/shadow-draft-2/indra/newview/llspatialpartition.cpp
r940 r967 1292 1292 clearState(QUERY_PENDING | DISCARD_QUERY); 1293 1293 } 1294 else if (mSpatialPartition->isOcclusionEnabled() )1295 { 1294 else if (mSpatialPartition->isOcclusionEnabled() && isState(LLSpatialGroup::OCCLUDED)) 1295 { //check occlusion has been issued for occluded node that has not had a query issued 1296 1296 assert_states_valid(this); 1297 1297 clearState(LLSpatialGroup::OCCLUDED, LLSpatialGroup::STATE_MODE_DIFF); … … 1491 1491 1492 1492 if (group->mOctreeNode->getParent() && //never occlusion cull the root node 1493 LLPipeline::sUseOcclusion && //ignore occlusion if disabled1493 LLPipeline::sUseOcclusion && //ignore occlusion if disabled 1494 1494 group->isState(LLSpatialGroup::OCCLUDED)) 1495 1495 { … … 1663 1663 LLVector3& mMin; 1664 1664 LLVector3& mMax; 1665 }; 1666 1667 class LLOctreeCullDetectVisible: public LLOctreeCullShadow 1668 { 1669 public: 1670 LLOctreeCullDetectVisible(LLCamera* camera) 1671 : LLOctreeCullShadow(camera), mResult(FALSE) { } 1672 1673 virtual bool earlyFail(LLSpatialGroup* group) 1674 { 1675 if (mResult || //already found a node, don't check any more 1676 group->mOctreeNode->getParent() && //never occlusion cull the root node 1677 LLPipeline::sUseOcclusion && //ignore occlusion if disabled 1678 group->isState(LLSpatialGroup::OCCLUDED)) 1679 { 1680 return true; 1681 } 1682 1683 return false; 1684 } 1685 1686 virtual void processGroup(LLSpatialGroup* group) 1687 { 1688 if (group->isVisible()) 1689 { 1690 mResult = TRUE; 1691 } 1692 } 1693 1694 BOOL mResult; 1665 1695 }; 1666 1696 … … 1830 1860 } 1831 1861 1862 BOOL LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera) 1863 { 1864 LLOctreeCullDetectVisible vis(&camera); 1865 vis.traverse(mOctree); 1866 return vis.mResult; 1867 } 1832 1868 1833 1869 S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* results, BOOL for_select) … … 2126 2162 2127 2163 drawBoxOutline(group->mBounds[0],group->mBounds[1]); 2164 2165 2166 //draw bounding box for draw info 2167 if (group->mSpatialPartition->mRenderByGroup) 2168 { 2169 gGL.color4f(1.0f, 0.75f, 0.25f, 0.6f); 2170 for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) 2171 { 2172 for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j) 2173 { 2174 LLDrawInfo* draw_info = *j; 2175 LLVector3 center = (draw_info->mExtents[1] + draw_info->mExtents[0])*0.5f; 2176 LLVector3 size = (draw_info->mExtents[1] - draw_info->mExtents[0])*0.5f; 2177 drawBoxOutline(center, size); 2178 } 2179 } 2180 } 2128 2181 } 2129 2182 … … 2184 2237 } 2185 2238 2186 void renderBoundingBox(LLDrawable* drawable) 2187 { 2188 if (drawable->isSpatialBridge()) 2189 { 2190 gGL.color4f(1,0.5f,0,1); 2191 } 2192 else if (drawable->getVOVolume()) 2193 { 2194 if (drawable->isRoot()) 2195 { 2196 gGL.color4f(1,1,0,1); 2197 } 2198 else 2199 { 2200 gGL.color4f(0,1,0,1); 2201 } 2202 } 2203 else if (drawable->getVObj()) 2204 { 2205 switch (drawable->getVObj()->getPCode()) 2206 { 2207 case LLViewerObject::LL_VO_SURFACE_PATCH: 2208 gGL.color4f(0,1,1,1); 2209 break; 2210 case LLViewerObject::LL_VO_CLOUDS: 2211 gGL.color4f(0.5f,0.5f,0.5f,1.0f); 2212 break; 2213 case LLViewerObject::LL_VO_PART_GROUP: 2214 gGL.color4f(0,0,1,1); 2215 break; 2216 case LLViewerObject::LL_VO_WATER: 2217 gGL.color4f(0,0.5f,1,1); 2218 break; 2219 case LL_PCODE_LEGACY_TREE: 2220 gGL.color4f(0,0.5f,0,1); 2221 default: 2222 gGL.color4f(1,0,1,1); 2223 break; 2224 } 2225 } 2226 else 2227 { 2228 gGL.color4f(1,0,0,1); 2239 void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE) 2240 { 2241 if (set_color) 2242 { 2243 if (drawable->isSpatialBridge()) 2244 { 2245 gGL.color4f(1,0.5f,0,1); 2246 } 2247 else if (drawable->getVOVolume()) 2248 { 2249 if (drawable->isRoot()) 2250 { 2251 gGL.color4f(1,1,0,1); 2252 } 2253 else 2254 { 2255 gGL.color4f(0,1,0,1); 2256 } 2257 } 2258 else if (drawable->getVObj()) 2259 { 2260 switch (drawable->getVObj()->getPCode()) 2261 { 2262 case LLViewerObject::LL_VO_SURFACE_PATCH: 2263 gGL.color4f(0,1,1,1); 2264 break; 2265 case LLViewerObject::LL_VO_CLOUDS: 2266 gGL.color4f(0.5f,0.5f,0.5f,1.0f); 2267 break; 2268 case LLViewerObject::LL_VO_PART_GROUP: 2269 gGL.color4f(0,0,1,1); 2270 break; 2271 case LLViewerObject::LL_VO_WATER: 2272 gGL.color4f(0,0.5f,1,1); 2273 break; 2274 case LL_PCODE_LEGACY_TREE: 2275 gGL.color4f(0,0.5f,0,1); 2276 default: 2277 gGL.color4f(1,0,1,1); 2278 break; 2279 } 2280 } 2281 else 2282 { 2283 gGL.color4f(1,0,0,1); 2284 } 2229 2285 } 2230 2286 … … 2488 2544 } 2489 2545 }; 2546 2547 class LLOctreePushBBoxVerts : public LLOctreeTraveler<LLDrawable> 2548 { 2549 public: 2550 LLCamera* mCamera; 2551 LLOctreePushBBoxVerts(LLCamera* camera): mCamera(camera) {} 2552 2553 virtual void traverse(const LLSpatialGroup::OctreeNode* node) 2554 { 2555 LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); 2556 2557 if (!mCamera || mCamera->AABBInFrustum(group->mBounds[0], group->mBounds[1])) 2558 { 2559 node->accept(this); 2560 2561 for (U32 i = 0; i < node->getChildCount(); i++) 2562 { 2563 traverse(node->getChild(i)); 2564 } 2565 } 2566 } 2567 2568 virtual void visit(const LLSpatialGroup::OctreeNode* branch) 2569 { 2570 LLSpatialGroup* group = (LLSpatialGroup*) branch->getListener(0); 2571 2572 if (group->isState(LLSpatialGroup::GEOM_DIRTY) || (mCamera && !mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]))) 2573 { 2574 return; 2575 } 2576 2577 for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getData().begin(); i != branch->getData().end(); ++i) 2578 { 2579 LLDrawable* drawable = *i; 2580 2581 renderBoundingBox(drawable, FALSE); 2582 } 2583 } 2584 }; 2585 2586 void LLSpatialPartition::renderIntersectingBBoxes(LLCamera* camera) 2587 { 2588 LLOctreePushBBoxVerts pusher(camera); 2589 pusher.traverse(mOctree); 2590 } 2490 2591 2491 2592 void LLSpatialPartition::renderDebug() branches/shadow-draft-2/indra/newview/llspatialpartition.h
r940 r967 87 87 LLFace* mFace; //associated face 88 88 F32 mDistance; 89 LLVector3 mExtents[2]; 89 90 90 91 struct CompareTexture … … 339 340 virtual void rebuildGeom(LLSpatialGroup* group); 340 341 342 BOOL visibleObjectsInFrustum(LLCamera& camera); 341 343 S32 cull(LLCamera &camera, std::vector<LLDrawable *>* results = NULL, BOOL for_select = FALSE); // Cull on arbitrary frustum 342 344 … … 347 349 348 350 void renderDebug(); 351 void renderIntersectingBBoxes(LLCamera* camera); 349 352 void restoreGL(); 350 353 void resetVertexBuffers(); branches/shadow-draft-2/indra/newview/llviewerdisplay.cpp
r940 r967 740 740 gPipeline.mDeferredScreen.bindTarget(); 741 741 gPipeline.mDeferredScreen.clear(); 742 glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);743 742 } 744 743 else 745 744 { 746 745 gPipeline.mScreen.bindTarget(); 747 g lClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);746 gPipeline.mScreen.clear(); 748 747 } 749 748 branches/shadow-draft-2/indra/newview/llviewermenu.cpp
r743 r967 1328 1328 &LLPipeline::toggleRenderDebugControl, 1329 1329 (void*)LLPipeline::RENDER_DEBUG_OCTREE)); 1330 sub_menu->append(new LLMenuItemCheckGL("Shadow Frusta", &LLPipeline::toggleRenderDebug, NULL, 1331 &LLPipeline::toggleRenderDebugControl, 1332 (void*)LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA)); 1330 1333 sub_menu->append(new LLMenuItemCheckGL("Occlusion", &LLPipeline::toggleRenderDebug, NULL, 1331 1334 &LLPipeline::toggleRenderDebugControl, branches/shadow-draft-2/indra/newview/llviewerobject.cpp
r737 r967 3666 3666 { 3667 3667 retval = LLPrimitive::setTEColor(te, color); 3668 setChanged(TEXTURE);3668 //setChanged(TEXTURE); 3669 3669 if (mDrawable.notNull() && retval) 3670 3670 { 3671 3671 // These should only happen on updates which are not the initial update. 3672 gPipeline.markTextured(mDrawable);3672 dirtyMesh(); 3673 3673 } 3674 3674 } branches/shadow-draft-2/indra/newview/llvoiceclient.cpp
r714 r967 3427 3427 { 3428 3428 std::string result; 3429 std::string rawuuid;3430 uuid.toCompressedString(rawuuid);3431 3432 3429 // Prepending this apparently prevents conflicts with reserved names inside the vivox and diamondware code. 3433 3430 result = "x"; … … 3436 3433 // with e-mail local-parts. 3437 3434 // See RFC-4648 "Base 64 Encoding with URL and Filename Safe Alphabet" 3438 result += LLBase64::encode( (const U8*)rawuuid.c_str(), UUID_BYTES);3435 result += LLBase64::encode(uuid.mData, UUID_BYTES); 3439 3436 LLStringUtil::replaceChar(result, '+', '-'); 3440 3437 LLStringUtil::replaceChar(result, '/', '_'); … … 3468 3465 { 3469 3466 // The decode succeeded. Stuff the bits into the result's UUID 3470 // MBW -- XXX -- there's no analogue of LLUUID::toCompressedString that allows you to set a UUID from binary data.3471 // The data field is public, so we cheat thusly:3472 3467 memcpy(uuid.mData, rawuuid, UUID_BYTES); 3473 3468 result = true; branches/shadow-draft-2/indra/newview/llvopartgroup.cpp
r940 r967 469 469 U32 count = facep->getIndicesCount(); 470 470 LLDrawInfo* info = new LLDrawInfo(start,end,count,offset,facep->getTexture(), buffer, fullbright); 471 info->mExtents[0] = group->mObjectExtents[0]; 472 info->mExtents[1] = group->mObjectExtents[1]; 471 473 info->mVSize = vsize; 472 474 draw_vec.push_back(info); branches/shadow-draft-2/indra/newview/llvovolume.cpp
r940 r967 1270 1270 { 1271 1271 S32 res = LLViewerObject::setTEColor(te, color); 1272 if (res && mDrawable.notNull()) 1273 { 1274 //gPipeline.markTextured(mDrawable); 1275 mDrawable->setState(LLDrawable::REBUILD_COLOR); 1276 dirtyMesh(); 1277 //mFaceMappingChanged = TRUE; 1278 } 1279 return res; 1280 } 1281 1282 S32 LLVOVolume::setTEBumpmap(const U8 te, const U8 bumpmap) 1283 { 1284 S32 res = LLViewerObject::setTEBumpmap(te, bumpmap); 1272 1285 if (res) 1273 1286 { … … 1278 1291 } 1279 1292 1280 S32 LLVOVolume::setTE Bumpmap(const U8 te, const U8 bumpmap)1281 { 1282 S32 res = LLViewerObject::setTE Bumpmap(te, bumpmap);1293 S32 LLVOVolume::setTETexGen(const U8 te, const U8 texgen) 1294 { 1295 S32 res = LLViewerObject::setTETexGen(te, texgen); 1283 1296 if (res) 1284 1297 { … … 1289 1302 } 1290 1303 1291 S32 LLVOVolume::setTE TexGen(const U8 te, const U8 texgen)1292 { 1293 S32 res = LLViewerObject::setTE TexGen(te, texgen);1304 S32 LLVOVolume::setTEShiny(const U8 te, const U8 shiny) 1305 { 1306 S32 res = LLViewerObject::setTEShiny(te, shiny); 1294 1307 if (res) 1295 1308 { … … 1300 1313 } 1301 1314 1302 S32 LLVOVolume::setTE Shiny(const U8 te, const U8 shiny)1303 { 1304 S32 res = LLViewerObject::setTE Shiny(te, shiny);1315 S32 LLVOVolume::setTEFullbright(const U8 te, const U8 fullbright) 1316 { 1317 S32 res = LLViewerObject::setTEFullbright(te, fullbright); 1305 1318 if (res) 1306 1319 { … … 1311 1324 } 1312 1325 1313 S32 LLVOVolume::setTE Fullbright(const U8 te, const U8 fullbright)1314 { 1315 S32 res = LLViewerObject::setTE Fullbright(te, fullbright);1326 S32 LLVOVolume::setTEMediaFlags(const U8 te, const U8 media_flags) 1327 { 1328 S32 res = LLViewerObject::setTEMediaFlags(te, media_flags); 1316 1329 if (res) 1317 1330 { … … 1322 1335 } 1323 1336 1324 S32 LLVOVolume::setTE MediaFlags(const U8 te, const U8 media_flags)1325 { 1326 S32 res = LLViewerObject::setTE MediaFlags(te, media_flags);1337 S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow) 1338 { 1339 S32 res = LLViewerObject::setTEGlow(te, glow); 1327 1340 if (res) 1328 1341 { … … 1333 1346 } 1334 1347 1335 S32 LLVOVolume::setTE Glow(const U8 te, const F32 glow)1336 { 1337 S32 res = LLViewerObject::setTE Glow(te, glow);1348 S32 LLVOVolume::setTEScale(const U8 te, const F32 s, const F32 t) 1349 { 1350 S32 res = LLViewerObject::setTEScale(te, s, t); 1338 1351 if (res) 1339 1352 { … … 1341 1354 mFaceMappingChanged = TRUE; 1342 1355 } 1343 return res;1344 } 1345 1346 S32 LLVOVolume::setTEScale (const U8 te, const F32 s, const F32 t)1347 { 1348 S32 res = LLViewerObject::setTEScale (te, s, t);1356 return res; 1357 } 1358 1359 S32 LLVOVolume::setTEScaleS(const U8 te, const F32 s) 1360 { 1361 S32 res = LLViewerObject::setTEScaleS(te, s); 1349 1362 if (res) 1350 1363 { … … 1355 1368 } 1356 1369 1357 S32 LLVOVolume::setTEScale S(const U8 te, const F32 s)1358 { 1359 S32 res = LLViewerObject::setTEScale S(te, s);1370 S32 LLVOVolume::setTEScaleT(const U8 te, const F32 t) 1371 { 1372 S32 res = LLViewerObject::setTEScaleT(te, t); 1360 1373 if (res) 1361 1374 { … … 1366 1379 } 1367 1380 1368 S32 LLVOVolume::setTEScaleT(const U8 te, const F32 t)1369 {1370 S32 res = LLViewerObject::setTEScaleT(te, t);1371 if (res)1372 {1373 gPipeline.markTextured(mDrawable);1374 mFaceMappingChanged = TRUE;1375 }1376 return res;1377 }1378 1379 1381 void LLVOVolume::updateTEData() 1380 1382 { 1381 if (mDrawable.notNull())1383 /*if (mDrawable.notNull()) 1382 1384 { 1383 1385 mFaceMappingChanged = TRUE; 1384 1386 gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_MATERIAL, TRUE); 1385 } 1387 }*/ 1386 1388 } 1387 1389 … … 2040 2042 draw_vec[idx]->mVSize = llmax(draw_vec[idx]->mVSize, facep->getVirtualSize()); 2041 2043 validate_draw_info(*draw_vec[idx]); 2044 update_min_max(draw_vec[idx]->mExtents[0], draw_vec[idx]->mExtents[1], facep->mExtents[0]); 2045 update_min_max(draw_vec[idx]->mExtents[0], draw_vec[idx]->mExtents[1], facep->mExtents[1]); 2042 2046 } 2043 2047 else … … 2059 2063 facep->setDrawInfo(draw_info); 2060 2064 } 2065 draw_info->mExtents[0] = facep->mExtents[0]; 2066 draw_info->mExtents[1] = facep->mExtents[1]; 2061 2067 validate_draw_info(*draw_info); 2062 2068 } branches/shadow-draft-2/indra/newview/pipeline.cpp
r940 r967 1277 1277 } 1278 1278 1279 BOOL LLPipeline::visibleObjectsInFrustum(LLCamera& camera) 1280 { 1281 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 1282 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 1283 { 1284 LLViewerRegion* region = *iter; 1285 1286 for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++) 1287 { 1288 LLSpatialPartition* part = region->getSpatialPartition(i); 1289 if (part) 1290 { 1291 if (hasRenderType(part->mDrawableType)) 1292 { 1293 if (part->visibleObjectsInFrustum(camera)) 1294 { 1295 return TRUE; 1296 } 1297 } 1298 } 1299 } 1300 } 1301 1302 return FALSE; 1303 } 1304 1305 BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& max) 1306 { 1307 min = LLVector3(F32_MAX, F32_MAX, F32_MAX); 1308 max = LLVector3(-F32_MAX, -F32_MAX, -F32_MAX); 1309 1310 1311 BOOL res = TRUE; 1312 1313 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 1314 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 1315 { 1316 LLViewerRegion* region = *iter; 1317 1318 for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++) 1319 { 1320 LLSpatialPartition* part = region->getSpatialPartition(i); 1321 if (part) 1322 { 1323 if (hasRenderType(part->mDrawableType)) 1324 { 1325 if (!part->getVisibleExtents(camera, min, max)) 1326 { 1327 res = FALSE; 1328 } 1329 } 1330 } 1331 } 1332 } 1333 1334 return res; 1335 } 1336 1337 1279 1338 void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip) 1280 1339 { … … 1294 1353 if (to_texture) 1295 1354 { 1296 if (LLPipeline::sRenderDeferred) 1297 { 1298 mDeferredScreen.bindTarget(); 1299 mDeferredScreen.clear(); 1300 } 1301 else 1355 //if (LLPipeline::sRenderDeferred) 1356 //{ 1357 // mDeferredScreen.bindTarget(); 1358 //} 1359 //else 1302 1360 { 1303 1361 mScreen.bindTarget(); … … 1386 1444 if (to_texture) 1387 1445 { 1388 mScreen.flush(); 1389 1390 if (LLPipeline::sRenderDeferred) 1391 { 1392 mDeferredScreen.flush(); 1393 } 1394 else 1446 //if (LLPipeline::sRenderDeferred) 1447 //{ 1448 // mDeferredScreen.flush(); 1449 //} 1450 //else 1395 1451 { 1396 1452 mScreen.flush(); 1397 1453 } 1398 LLRenderTarget::unbindTarget();1399 1454 } 1400 1455 else if (LLPipeline::sUseOcclusion > 1) … … 2192 2247 if (params->mFace) 2193 2248 { 2194 LLVector3 box = (params->mFace->mExtents[1] - params->mFace->mExtents[0]) * 0.25f; 2195 LLVector3 v = (params->mFace->getPositionAgent()-camera.getOrigin()); 2196 2197 for (U32 j = 0; j < 3; j++) 2249 BOOL culled = !group->mSpatialPartition->isBridge(); 2250 if (culled) 2198 2251 { 2199 v.mV[j] -= box.mV[j] * at.mV[j]; 2252
