diff options
-rw-r--r-- | indra/cmake/LLPrimitive.cmake | 9 | ||||
-rw-r--r-- | indra/llmath/llvolume.cpp | 30 | ||||
-rw-r--r-- | indra/newview/CMakeLists.txt | 1 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 6 |
4 files changed, 24 insertions, 22 deletions
diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index fae1ef2a51..4bdbfe46e2 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -11,13 +11,14 @@ set(LLPRIMITIVE_INCLUDE_DIRS ) if (WINDOWS) - set(LLPRIMITIVE_LIBRARIES - llprimitive + set(LLPRIMITIVE_LIBRARIES + debug llprimitive + optimized llprimitive debug libcollada14dom21-d - debug libboost_filesystem-d - debug libboost_system-d optimized libcollada14dom21 + debug libboost_filesystem-d optimized libboost_filesystem + debug libboost_system-d optimized libboost_system ) else (WINDOWS) diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 2411bb7900..9fe4c622d7 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2320,12 +2320,6 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size) pos_range.setSub(max_pos, min_pos); LLVector2 tc_range = max_tc - min_tc; - LLVector4a& min = face.mExtents[0]; - LLVector4a& max = face.mExtents[1]; - - min.clear(); - max.clear(); - LLVector4a* pos_out = face.mPositions; LLVector4a* norm_out = face.mNormals; LLVector2* tc_out = face.mTexCoords; @@ -2339,17 +2333,6 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size) pos_out->mul(pos_range); pos_out->add(min_pos); - if (j == 0) - { - min = *pos_out; - max = min; - } - else - { - min.setMin(min, *pos_out); - max.setMax(max, *pos_out); - } - pos_out++; U16* n = (U16*) &(norm[j*3*2]); @@ -2426,6 +2409,19 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size) } } + //calculate bounding box + LLVector4a& min = face.mExtents[0]; + LLVector4a& max = face.mExtents[1]; + + min.clear(); + max.clear(); + min = max = face.mPositions[0]; + + for (S32 i = 1; i < face.mNumVertices; ++i) + { + min.setMin(min, face.mPositions[i]); + max.setMax(max, face.mPositions[i]); + } } } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0997c80e46..2b4a2dfdb0 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1270,7 +1270,6 @@ if (WINDOWS) ${DINPUT_LIBRARY} ${DXGUID_LIBRARY} kernel32 - libboost_system odbc32 odbccp32 ole32 diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 0b2adc70d9..808b8723a2 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4014,6 +4014,12 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } LLVOVolume* vobj = drawablep->getVOVolume(); + + if (vobj->getVolume() && vobj->getVolume()->isTetrahedron()) + { + continue; + } + llassert_always(vobj); vobj->updateTextureVirtualSize(); vobj->preRebuild(); |