diff options
author | Jacek Antonelli | 2008-08-15 23:45:37 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:37 -0500 |
commit | 31ba05810c641f14e8ab5da8ad2aaf527779f6c1 (patch) | |
tree | c4b8d635dfb657fa4cfee7c285f8cadbf24afa90 /linden/indra/newview/llvovolume.cpp | |
parent | Second Life viewer sources 1.19.1.1 (diff) | |
download | meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.zip meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.tar.gz meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.tar.bz2 meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.tar.xz |
Second Life viewer sources 1.19.1.2
Diffstat (limited to 'linden/indra/newview/llvovolume.cpp')
-rw-r--r-- | linden/indra/newview/llvovolume.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 494e0fa..e4318ff 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp | |||
@@ -1124,30 +1124,36 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) | |||
1124 | } | 1124 | } |
1125 | else if ((mLODChanged) || (mSculptChanged)) | 1125 | else if ((mLODChanged) || (mSculptChanged)) |
1126 | { | 1126 | { |
1127 | LLPointer<LLVolume> old_volumep, new_volumep; | 1127 | LLVolume *old_volumep, *new_volumep; |
1128 | F32 old_lod, new_lod; | 1128 | F32 old_lod, new_lod; |
1129 | S32 old_num_faces, new_num_faces ; | ||
1129 | 1130 | ||
1130 | old_volumep = getVolume(); | 1131 | old_volumep = getVolume(); |
1131 | old_lod = old_volumep->getDetail(); | 1132 | old_lod = old_volumep->getDetail(); |
1133 | old_num_faces = old_volumep->getNumFaces() ; | ||
1134 | old_volumep = NULL ; | ||
1132 | 1135 | ||
1133 | { | 1136 | { |
1134 | LLFastTimer ftm(LLFastTimer::FTM_GEN_VOLUME); | 1137 | LLFastTimer ftm(LLFastTimer::FTM_GEN_VOLUME); |
1135 | LLVolumeParams volume_params = getVolume()->getParams(); | 1138 | LLVolumeParams volume_params = getVolume()->getParams(); |
1136 | setVolume(volume_params, 0); | 1139 | setVolume(volume_params, 0); |
1137 | } | 1140 | } |
1141 | |||
1138 | new_volumep = getVolume(); | 1142 | new_volumep = getVolume(); |
1139 | new_lod = new_volumep->getDetail(); | 1143 | new_lod = new_volumep->getDetail(); |
1144 | new_num_faces = new_volumep->getNumFaces() ; | ||
1145 | new_volumep = NULL ; | ||
1140 | 1146 | ||
1141 | if ((new_lod != old_lod) || mSculptChanged) | 1147 | if ((new_lod != old_lod) || mSculptChanged) |
1142 | { | 1148 | { |
1143 | compiled = TRUE; | 1149 | compiled = TRUE; |
1144 | sNumLODChanges += getVolume()->getNumFaces(); | 1150 | sNumLODChanges += new_num_faces ; |
1145 | 1151 | ||
1146 | drawable->setState(LLDrawable::REBUILD_VOLUME); // for face->genVolumeTriangles() | 1152 | drawable->setState(LLDrawable::REBUILD_VOLUME); // for face->genVolumeTriangles() |
1147 | 1153 | ||
1148 | { | 1154 | { |
1149 | LLFastTimer t(LLFastTimer::FTM_GEN_TRIANGLES); | 1155 | LLFastTimer t(LLFastTimer::FTM_GEN_TRIANGLES); |
1150 | if (new_volumep->getNumFaces() != old_volumep->getNumFaces()) | 1156 | if (new_num_faces != old_num_faces) |
1151 | { | 1157 | { |
1152 | regenFaces(); | 1158 | regenFaces(); |
1153 | } | 1159 | } |
@@ -1225,7 +1231,12 @@ S32 LLVOVolume::setTETexture(const U8 te, const LLUUID &uuid) | |||
1225 | return res; | 1231 | return res; |
1226 | } | 1232 | } |
1227 | 1233 | ||
1228 | S32 LLVOVolume::setTEColor(const U8 te, const LLColor4 &color) | 1234 | S32 LLVOVolume::setTEColor(const U8 te, const LLColor3& color) |
1235 | { | ||
1236 | return setTEColor(te, LLColor4(color)); | ||
1237 | } | ||
1238 | |||
1239 | S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color) | ||
1229 | { | 1240 | { |
1230 | S32 res = LLViewerObject::setTEColor(te, color); | 1241 | S32 res = LLViewerObject::setTEColor(te, color); |
1231 | if (res) | 1242 | if (res) |
@@ -2458,6 +2469,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) | |||
2458 | if (facep->mGeomCount + index_offset > 65535) | 2469 | if (facep->mGeomCount + index_offset > 65535) |
2459 | { //cut off alpha nodes at 64k vertices | 2470 | { //cut off alpha nodes at 64k vertices |
2460 | facep->mVertexBuffer = NULL ; | 2471 | facep->mVertexBuffer = NULL ; |
2472 | facep->mLastVertexBuffer = NULL ; | ||
2461 | continue ; | 2473 | continue ; |
2462 | } | 2474 | } |
2463 | 2475 | ||