From 3e80fa3dbc943de9b784fedc202ba38cf238f46d Mon Sep 17 00:00:00 2001 From: David Parks Date: Mon, 2 Nov 2009 19:55:37 +0000 Subject: Sync up with render-pipeline-7 ignore-dead-branch --- indra/llinventory/llinventorytype.cpp | 7 +++++-- indra/llinventory/llinventorytype.h | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp index a445466b26..ae3cb2697b 100644 --- a/indra/llinventory/llinventorytype.cpp +++ b/indra/llinventory/llinventorytype.cpp @@ -96,7 +96,9 @@ LLInventoryDictionary::LLInventoryDictionary() addEntry(LLInventoryType::IT_WEARABLE, new InventoryEntry("wearable", "wearable", 2, LLAssetType::AT_CLOTHING, LLAssetType::AT_BODYPART)); addEntry(LLInventoryType::IT_ANIMATION, new InventoryEntry("animation", "animation", 1, LLAssetType::AT_ANIMATION)); addEntry(LLInventoryType::IT_GESTURE, new InventoryEntry("gesture", "gesture", 1, LLAssetType::AT_GESTURE)); - addEntry(LLInventoryType::IT_FAVORITE, new InventoryEntry("favorite", "favorite", 1, LLAssetType::AT_FAVORITE)); + addEntry(LLInventoryType::IT_FAVORITE, new InventoryEntry("favorite", "favorite", 1, LLAssetType::AT_FAVORITE)); + addEntry(LLInventoryType::IT_MESH, new InventoryEntry("mesh", "mesh", 1, LLAssetType::AT_MESH)); + } @@ -132,7 +134,7 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] = LLInventoryType::IT_NONE, // AT_LINK LLInventoryType::IT_NONE, // AT_LINK_FOLDER - + LLInventoryType::IT_CATEGORY, // AT_ENSEMBLE LLInventoryType::IT_CATEGORY, // AT_ENSEMBLE LLInventoryType::IT_CATEGORY, // AT_ENSEMBLE @@ -157,6 +159,7 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] = LLInventoryType::IT_CATEGORY, // AT_CURRENT_OUTFIT LLInventoryType::IT_CATEGORY, // AT_OUTFIT LLInventoryType::IT_CATEGORY, // AT_MY_OUTFITS + LLInventoryType::IT_MESH, // AT_MESH }; // static diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h index 14b28bfe4b..0d580d3000 100644 --- a/indra/llinventory/llinventorytype.h +++ b/indra/llinventory/llinventorytype.h @@ -68,7 +68,8 @@ public: IT_ANIMATION = 19, IT_GESTURE = 20, IT_FAVORITE = 21, - IT_COUNT = 22, + IT_MESH = 22, + IT_COUNT = 23, IT_NONE = -1 }; -- cgit v1.3 From bb72788392ea6d25adb045abd555419cd60c4888 Mon Sep 17 00:00:00 2001 From: Palmer Date: Thu, 12 Nov 2009 14:05:01 -0800 Subject: Fixes for mesh inventory type correctness. --- indra/llinventory/llinventorytype.cpp | 28 +++++++++++++++++++++++++++- indra/newview/llinventoryfunctions.cpp | 3 +++ 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp index 2460a2777a..caf8e11929 100644 --- a/indra/llinventory/llinventorytype.cpp +++ b/indra/llinventory/llinventorytype.cpp @@ -125,7 +125,33 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] = LLInventoryType::IT_NONE, // AT_LINK LLInventoryType::IT_NONE, // AT_LINK_FOLDER - LLInventoryType::IT_MESH, // AT_MESH + + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + LLInventoryType::IT_NONE, // AT_NONE + + LLInventoryType::IT_MESH // AT_MESH }; // static diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 75218e98e0..01c7f0974d 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -323,6 +323,9 @@ const std::string& get_item_icon_name(LLAssetType::EType asset_type, case LLAssetType::AT_LINK_FOLDER: idx = LINKFOLDER_ICON_NAME; break; + case LLAssetType::AT_MESH: + idx = MESH_ICON_NAME; + break; default: break; } -- cgit v1.3 From f9b13d8f8510b1f7f02fcf92685471461b79858e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 10 Jun 2010 00:45:48 -0500 Subject: Add "LL_MESH_ENABLED" preprocessor flag for toggling mesh code. Couple of merge fixes. --- indra/llcommon/llassettype.cpp | 3 +- indra/llcommon/llassettype.h | 3 +- indra/llinventory/llinventorytype.cpp | 5 ++- indra/llinventory/llinventorytype.h | 2 + indra/llmath/llvolume.cpp | 13 +++--- indra/llmath/llvolume.h | 7 ++++ indra/llrender/llvertexbuffer.cpp | 4 +- indra/llvfs/llvfs.cpp | 2 + indra/newview/app_settings/settings.xml | 4 +- indra/newview/llappviewer.cpp | 4 ++ indra/newview/llassetuploadresponders.cpp | 5 +++ indra/newview/llassetuploadresponders.h | 3 +- indra/newview/lldrawpoolavatar.cpp | 48 +++++++++++++++++++++- indra/newview/lldrawpoolavatar.h | 40 ++++++++++-------- indra/newview/llface.cpp | 2 + indra/newview/llinventorybridge.cpp | 10 ++++- indra/newview/llinventorybridge.h | 4 +- indra/newview/llpanelgroupnotices.cpp | 2 + indra/newview/llpanelobjectinventory.cpp | 6 +++ indra/newview/llselectmgr.cpp | 2 + indra/newview/lltexturectrl.cpp | 12 +++++- indra/newview/lltooldraganddrop.cpp | 10 +++++ indra/newview/lltooldraganddrop.h | 4 ++ indra/newview/llviewerassettype.cpp | 2 + indra/newview/llviewerfloaterreg.cpp | 4 ++ indra/newview/llviewermenufile.cpp | 9 +++- indra/newview/llviewermenufile.h | 2 + indra/newview/llviewertexteditor.cpp | 2 + indra/newview/llviewerwindow.cpp | 4 ++ indra/newview/llvovolume.cpp | 15 ++++++- indra/newview/pipeline.cpp | 4 ++ indra/newview/pipeline.h | 13 +++--- .../default/xui/en/panel_preferences_graphics1.xml | 10 ++--- 33 files changed, 209 insertions(+), 51 deletions(-) (limited to 'indra/llinventory') diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp index e19f8b0454..476a23ec64 100644 --- a/indra/llcommon/llassettype.cpp +++ b/indra/llcommon/llassettype.cpp @@ -99,8 +99,9 @@ LLAssetDictionary::LLAssetDictionary() addEntry(LLAssetType::AT_LINK, new AssetEntry("LINK", "link", "sym link", false, false, true)); addEntry(LLAssetType::AT_LINK_FOLDER, new AssetEntry("FOLDER_LINK", "link_f", "sym folder link", false, false, true)); - +#if LL_MESH_ENABLED addEntry(LLAssetType::AT_MESH, new AssetEntry("MESH", "mesh", "mesh", false, false, false)); +#endif addEntry(LLAssetType::AT_NONE, new AssetEntry("NONE", "-1", NULL, FALSE, FALSE, FALSE)); diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h index 90cd03c433..ebc43134cb 100644 --- a/indra/llcommon/llassettype.h +++ b/indra/llcommon/llassettype.h @@ -114,9 +114,10 @@ public: AT_LINK_FOLDER = 25, // Inventory folder link - +#if LL_MESH_ENABLED AT_MESH = 49, // Mesh data in our proprietary SLM format +#endif AT_COUNT = 50, diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp index 2d4ee604b0..82cd22a832 100644 --- a/indra/llinventory/llinventorytype.cpp +++ b/indra/llinventory/llinventorytype.cpp @@ -89,7 +89,9 @@ LLInventoryDictionary::LLInventoryDictionary() addEntry(LLInventoryType::IT_WEARABLE, new InventoryEntry("wearable", "wearable", 2, LLAssetType::AT_CLOTHING, LLAssetType::AT_BODYPART)); addEntry(LLInventoryType::IT_ANIMATION, new InventoryEntry("animation", "animation", 1, LLAssetType::AT_ANIMATION)); addEntry(LLInventoryType::IT_GESTURE, new InventoryEntry("gesture", "gesture", 1, LLAssetType::AT_GESTURE)); +#if LL_MESH_ENABLED addEntry(LLInventoryType::IT_MESH, new InventoryEntry("mesh", "mesh", 1, LLAssetType::AT_MESH)); +#endif } @@ -150,8 +152,9 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] = LLInventoryType::IT_NONE, // AT_NONE LLInventoryType::IT_NONE, // AT_NONE LLInventoryType::IT_NONE, // AT_NONE - +#if LL_MESH_ENABLED LLInventoryType::IT_MESH // AT_MESH +#endif }; // static diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h index 37829f5eae..d2fc67ef64 100644 --- a/indra/llinventory/llinventorytype.h +++ b/indra/llinventory/llinventorytype.h @@ -68,7 +68,9 @@ public: IT_ANIMATION = 19, IT_GESTURE = 20, +#if LL_MESH_ENABLED IT_MESH = 22, +#endif IT_COUNT = 23, IT_NONE = -1 diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 09ab47b890..05868e3517 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2546,10 +2546,12 @@ S32 LLVolume::getNumFaces() const { U8 sculpt_type = (mParams.getSculptType() & LL_SCULPT_TYPE_MASK); +#if LL_MESH_ENABLED if (sculpt_type == LL_SCULPT_TYPE_MESH) { return LL_SCULPT_MESH_MAX_FACES; } +#endif return (S32)mProfilep->mFaces.size(); } @@ -2922,11 +2924,6 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, LLMemType m1(LLMemType::MTYPE_VOLUME); U8 sculpt_type = mParams.getSculptType(); - if (sculpt_type & LL_SCULPT_TYPE_MASK == LL_SCULPT_TYPE_MESH) - { - llerrs << "WTF?" << llendl; - } - BOOL data_is_empty = FALSE; if (sculpt_width == 0 || sculpt_height == 0 || sculpt_components < 3 || sculpt_data == NULL) @@ -4135,10 +4132,12 @@ void LLVolume::generateSilhouetteVertices(std::vector &vertices, normals.clear(); segments.clear(); +#if LL_MESH_ENABLED if ((mParams.getSculptType() & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH) { return; } +#endif S32 cur_index = 0; //for each face @@ -6335,10 +6334,14 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) resizeVertices(num_vertices); resizeIndices(num_indices); +#if LL_MESH_ENABLED if ((volume->getParams().getSculptType() & LL_SCULPT_TYPE_MASK) != LL_SCULPT_TYPE_MESH) { mEdge.resize(num_indices); } +#else + mEdge.resize(num_indices); +#endif } LLVector4a* pos = (LLVector4a*) mPositions; diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index c49d1c650d..0782944079 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -41,6 +41,8 @@ class LLVolumeParams; class LLProfile; class LLPath; +#define LL_MESH_ENABLED 0 + template class LLOctreeNode; class LLVector4a; @@ -190,10 +192,15 @@ const U8 LL_SCULPT_TYPE_SPHERE = 1; const U8 LL_SCULPT_TYPE_TORUS = 2; const U8 LL_SCULPT_TYPE_PLANE = 3; const U8 LL_SCULPT_TYPE_CYLINDER = 4; +#if LL_MESH_ENABLED const U8 LL_SCULPT_TYPE_MESH = 5; const U8 LL_SCULPT_TYPE_MASK = LL_SCULPT_TYPE_SPHERE | LL_SCULPT_TYPE_TORUS | LL_SCULPT_TYPE_PLANE | LL_SCULPT_TYPE_CYLINDER | LL_SCULPT_TYPE_MESH; +#else +const U8 LL_SCULPT_TYPE_MASK = LL_SCULPT_TYPE_SPHERE | LL_SCULPT_TYPE_TORUS | LL_SCULPT_TYPE_PLANE | + LL_SCULPT_TYPE_CYLINDER; +#endif const U8 LL_SCULPT_FLAG_INVERT = 64; const U8 LL_SCULPT_FLAG_MIRROR = 128; diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 48c20b09a8..514ca25aa0 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -1318,7 +1318,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) { if (mGLBuffer) { - if (useVBOs() && sVBOActive) + if (sVBOActive) { glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0); sBindCount++; @@ -1330,7 +1330,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) setup = TRUE; // ... or a client memory pointer changed } } - if (useVBOs() && mGLIndices && sIBOActive) + if (mGLIndices && sIBOActive) { /*if (sMapped) { diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp index ddb76fb2ba..2b01288fd7 100644 --- a/indra/llvfs/llvfs.cpp +++ b/indra/llvfs/llvfs.cpp @@ -2041,9 +2041,11 @@ std::string get_extension(LLAssetType::EType type) case LLAssetType::AT_ANIMATION: extension = ".lla"; break; +#if LL_MESH_ENABLED case LLAssetType::AT_MESH: extension = ".slm"; break; +#endif default: // Just use the asset server filename extension in most cases extension += "."; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 79b58bcd7c..df9393c316 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4908,7 +4908,7 @@ Type Boolean Value - 1 + 0 MigrateCacheDirectory @@ -6818,7 +6818,7 @@ Type F32 Value - 0.0 + -0.001 RenderSpotShadowOffset diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 512b1dde7f..6978cdf672 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1302,8 +1302,10 @@ bool LLAppViewer::cleanup() llinfos << "Cleaning Up" << llendflush; +#if LL_MESH_ENABLED // shut down mesh streamer gMeshRepo.shutdown(); +#endif // Must clean up texture references before viewer window is destroyed. LLHUDManager::getInstance()->updateEffects(); @@ -1728,8 +1730,10 @@ bool LLAppViewer::initThreads() mFastTimerLogThread->start(); } +#if LL_MESH_ENABLED // Mesh streaming and caching gMeshRepo.init(); +#endif LLFilePickerThread::initClass(); diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index c48dcdb061..afb76735ec 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -305,6 +305,7 @@ void LLAssetUploadResponder::uploadComplete(const LLSD& content) { } +#if LL_MESH_ENABLED LLNewAgentInventoryResponder::LLNewAgentInventoryResponder( const LLSD& post_data, const LLUUID& vfile_id, @@ -426,6 +427,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) LLImportColladaAssetCache::getInstance()->assetUploaded(mVFileID, content["new_asset"], TRUE); } +#endif LLSendTexLayerResponder::LLSendTexLayerResponder(const LLSD& post_data, const LLUUID& vfile_id, @@ -675,6 +677,7 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content) } +#if LL_MESH_ENABLED ///////////////////////////////////////////////////// // LLNewAgentInventoryVariablePriceResponder::Impl // ///////////////////////////////////////////////////// @@ -1142,3 +1145,5 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog( boost::intrusive_ptr(this))); } } +#endif + diff --git a/indra/newview/llassetuploadresponders.h b/indra/newview/llassetuploadresponders.h index af3b3daf46..9abaccfde0 100644 --- a/indra/newview/llassetuploadresponders.h +++ b/indra/newview/llassetuploadresponders.h @@ -61,7 +61,7 @@ protected: std::string mFileName; }; - +#if LL_MESH_ENABLED // TODO*: Remove this once deprecated class LLNewAgentInventoryResponder : public LLAssetUploadResponder { @@ -116,6 +116,7 @@ private: class Impl; Impl* mImpl; }; +#endif struct LLBakedUploadData; class LLSendTexLayerResponder : public LLAssetUploadResponder diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 9268cb1d47..63ca17d62d 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -103,6 +103,7 @@ S32 normal_channel = -1; S32 specular_channel = -1; S32 cube_channel = -1; +#if LL_MESH_ENABLED static const U32 rigged_data_mask[] = { LLDrawPoolAvatar::RIGGED_SIMPLE_MASK, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_MASK, @@ -114,6 +115,7 @@ static const U32 rigged_data_mask[] = { LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP_MASK, LLDrawPoolAvatar::RIGGED_DEFERRED_SIMPLE_MASK, }; +#endif static LLFastTimer::DeclareTimer FTM_SHADOW_AVATAR("Avatar Shadow"); @@ -194,12 +196,14 @@ void LLDrawPoolAvatar::beginDeferredPass(S32 pass) case 2: beginDeferredSkinned(); break; +#if LL_MESH_ENABLED case 3: beginDeferredRiggedSimple(); break; case 4: beginDeferredRiggedBump(); break; +#endif } } @@ -226,12 +230,14 @@ void LLDrawPoolAvatar::endDeferredPass(S32 pass) case 2: endDeferredSkinned(); break; +#if LL_MESH_ENABLED case 3: endDeferredRiggedSimple(); break; case 4: endDeferredRiggedBump(); break; +#endif } } @@ -242,7 +248,11 @@ void LLDrawPoolAvatar::renderDeferred(S32 pass) S32 LLDrawPoolAvatar::getNumPostDeferredPasses() { +#if LL_MESH_ENABLED return 6; +#else + return 1; +#endif } void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass) @@ -252,6 +262,7 @@ void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass) case 0: beginPostDeferredAlpha(); break; +#if LL_MESH_ENABLED case 1: beginRiggedFullbright(); break; @@ -267,6 +278,7 @@ void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass) case 5: beginRiggedGlow(); break; +#endif } } @@ -284,6 +296,7 @@ void LLDrawPoolAvatar::beginPostDeferredAlpha() enable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]); } +#if LL_MESH_ENABLED void LLDrawPoolAvatar::beginDeferredRiggedAlpha() { sVertexProgram = &gDeferredSkinnedAlphaProgram; @@ -301,6 +314,7 @@ void LLDrawPoolAvatar::endDeferredRiggedAlpha() LLVertexBuffer::sWeight4Loc = -1; sVertexProgram = NULL; } +#endif void LLDrawPoolAvatar::endPostDeferredPass(S32 pass) { @@ -309,6 +323,7 @@ void LLDrawPoolAvatar::endPostDeferredPass(S32 pass) case 0: endPostDeferredAlpha(); break; +#if LL_MESH_ENABLED case 1: endRiggedFullbright(); break; @@ -324,6 +339,7 @@ void LLDrawPoolAvatar::endPostDeferredPass(S32 pass) case 5: endRiggedGlow(); break; +#endif } } @@ -357,7 +373,11 @@ void LLDrawPoolAvatar::renderPostDeferred(S32 pass) S32 LLDrawPoolAvatar::getNumShadowPasses() { +#if LL_MESH_ENABLED return 2; +#else + return 1; +#endif } void LLDrawPoolAvatar::beginShadowPass(S32 pass) @@ -448,6 +468,7 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE); } +#if LL_MESH_ENABLED else { renderRigged(avatarp, RIGGED_SIMPLE); @@ -457,10 +478,12 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) renderRigged(avatarp, RIGGED_SHINY); renderRigged(avatarp, RIGGED_FULLBRIGHT_ALPHA); } +#endif } S32 LLDrawPoolAvatar::getNumPasses() { +#if LL_MESH_ENABLED if (LLPipeline::sImpostorRender) { return 8; @@ -473,8 +496,19 @@ S32 LLDrawPoolAvatar::getNumPasses() { return 3; } +#else + if (LLPipeline::sImpostorRender) + { + return 1; + } + else + { + return 3; + } +#endif } + S32 LLDrawPoolAvatar::getNumDeferredPasses() { if (LLPipeline::sImpostorRender) @@ -522,6 +556,7 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass) case 2: beginSkinned(); break; +#if LL_MESH_ENABLED case 3: beginRiggedSimple(); break; @@ -543,6 +578,7 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass) case 9: beginRiggedGlow(); break; +#endif } } @@ -566,6 +602,7 @@ void LLDrawPoolAvatar::endRenderPass(S32 pass) case 2: endSkinned(); break; +#if LL_MESH_ENABLED case 3: endRiggedSimple(); break; @@ -587,6 +624,7 @@ void LLDrawPoolAvatar::endRenderPass(S32 pass) case 9: endRiggedGlow(); break; +#endif } } @@ -772,6 +810,7 @@ void LLDrawPoolAvatar::endSkinned() gGL.getTexUnit(0)->activate(); } +#if LL_MESH_ENABLED void LLDrawPoolAvatar::beginRiggedSimple() { sVertexProgram = &gSkinnedObjectSimpleProgram; @@ -924,6 +963,7 @@ void LLDrawPoolAvatar::endDeferredRiggedBump() sDiffuseChannel = 0; sVertexProgram = NULL; } +#endif void LLDrawPoolAvatar::beginDeferredSkinned() { @@ -1069,6 +1109,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) return; } +#if LL_MESH_ENABLED if (pass == 3) { if (is_deferred_render) @@ -1150,7 +1191,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) gGL.setSceneBlendType(LLRender::BT_ALPHA); return; } - +#endif if (sShaderLevel > 0) { @@ -1188,6 +1229,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) } } +#if LL_MESH_ENABLED void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLFace* face, const LLMeshSkinInfo* skin, LLVolume* volume, const LLVolumeFace& vol_face) { U32 data_mask = 0; @@ -1377,7 +1419,7 @@ void LLDrawPoolAvatar::renderRiggedGlow(LLVOAvatar* avatar) { renderRigged(avatar, RIGGED_GLOW, true); } - +#endif @@ -1479,6 +1521,7 @@ LLColor3 LLDrawPoolAvatar::getDebugColor() const return LLColor3(0.f, 1.f, 0.f); } +#if LL_MESH_ENABLED void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type) { if (facep->mRiggedIndex.empty()) @@ -1533,6 +1576,7 @@ void LLDrawPoolAvatar::removeRiggedFace(LLFace* facep) } } } +#endif LLVertexBufferAvatar::LLVertexBufferAvatar() : LLVertexBuffer(sDataMask, diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h index 4a5b009412..46ffc42f04 100644 --- a/indra/newview/lldrawpoolavatar.h +++ b/indra/newview/lldrawpoolavatar.h @@ -96,6 +96,23 @@ public: void beginRigid(); void beginImpostor(); void beginSkinned(); + + void endRigid(); + void endImpostor(); + void endSkinned(); + + void beginDeferredImpostor(); + void beginDeferredRigid(); + void beginDeferredSkinned(); + + void endDeferredImpostor(); + void endDeferredRigid(); + void endDeferredSkinned(); + + void beginPostDeferredAlpha(); + void endPostDeferredAlpha(); + +#if LL_MESH_ENABLED void beginRiggedSimple(); void beginRiggedFullbright(); void beginRiggedFullbrightShiny(); @@ -103,12 +120,8 @@ public: void beginRiggedAlpha(); void beginRiggedFullbrightAlpha(); void beginRiggedGlow(); - void beginPostDeferredAlpha(); void beginDeferredRiggedAlpha(); - void endRigid(); - void endImpostor(); - void endSkinned(); void endRiggedSimple(); void endRiggedFullbright(); void endRiggedFullbrightShiny(); @@ -116,18 +129,11 @@ public: void endRiggedAlpha(); void endRiggedFullbrightAlpha(); void endRiggedGlow(); - void endPostDeferredAlpha(); void endDeferredRiggedAlpha(); - void beginDeferredImpostor(); - void beginDeferredRigid(); - void beginDeferredSkinned(); void beginDeferredRiggedSimple(); void beginDeferredRiggedBump(); - void endDeferredImpostor(); - void endDeferredRigid(); - void endDeferredSkinned(); void endDeferredRiggedSimple(); void endDeferredRiggedBump(); @@ -147,11 +153,6 @@ public: void renderDeferredRiggedSimple(LLVOAvatar* avatar); void renderDeferredRiggedBump(LLVOAvatar* avatar); - /*virtual*/ LLViewerTexture *getDebugTexture(); - /*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display - - void renderAvatars(LLVOAvatar *single_avatar, S32 pass = -1); // renders only one avatar if single_avatar is not null. - typedef enum { RIGGED_SIMPLE = 0, @@ -202,6 +203,13 @@ public: void removeRiggedFace(LLFace* facep); std::vector mRiggedFace[NUM_RIGGED_PASSES]; +#endif + + /*virtual*/ LLViewerTexture *getDebugTexture(); + /*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display + + void renderAvatars(LLVOAvatar *single_avatar, S32 pass = -1); // renders only one avatar if single_avatar is not null. + static BOOL sSkipOpaque; static BOOL sSkipTransparent; diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index e4f9e28c77..c48106863e 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -224,11 +224,13 @@ void LLFace::destroy() { LLFastTimer t(FTM_DESTROY_DRAWPOOL); +#if LL_MESH_ENABLED if (this->isState(LLFace::RIGGED) && mDrawPoolp->getType() == LLDrawPool::POOL_AVATAR) { ((LLDrawPoolAvatar*) mDrawPoolp)->removeRiggedFace(this); } else +#endif { mDrawPoolp->removeFace(this); } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 78789eb9ce..3999a8ee88 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -917,6 +917,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, // Only should happen for broken links. new_listener = new LLLinkItemBridge(inventory, root, uuid); break; +#if LL_MESH_ENABLED case LLAssetType::AT_MESH: if(!(inv_type == LLInventoryType::IT_MESH)) { @@ -924,6 +925,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, } new_listener = new LLMeshBridge(inventory, root, uuid); break; +#endif default: llinfos << "Unhandled asset type (llassetstorage.h): " @@ -2765,7 +2767,9 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, case DAD_ANIMATION: case DAD_GESTURE: case DAD_LINK: +#if LL_MESH_ENABLED case DAD_MESH: +#endif accept = dragItemIntoFolder((LLInventoryItem*)cargo_data, drop); break; @@ -3635,7 +3639,9 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, case DAD_BODYPART: case DAD_ANIMATION: case DAD_GESTURE: - case DAD_MESH: +#if LL_MESH_ENABLED + case DAD_MESH: +#endif { LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; const LLPermissions& perm = inv_item->getPermissions(); @@ -4843,6 +4849,7 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } +#if LL_MESH_ENABLED // +=================================================+ // | LLMeshBridge | // +=================================================+ @@ -4899,6 +4906,7 @@ void LLMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } +#endif // +=================================================+ // | LLLinkBridge | diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index d637fc6e36..8de7d63173 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -527,7 +527,7 @@ protected: }; - +#if LL_MESH_ENABLED class LLMeshBridge : public LLItemBridge { friend class LLInvFVBridge; @@ -543,7 +543,7 @@ protected: const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} }; - +#endif diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 7d82a10ca2..d8cfd4fc5d 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -159,7 +159,9 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, case DAD_ANIMATION: case DAD_GESTURE: case DAD_CALLINGCARD: +#if LL_MESH_ENABLED case DAD_MESH: +#endif { LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data; if(gInventory.getItem(inv_item->getUUID()) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 898cabb03d..58df2746f3 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -819,7 +819,9 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop, case DAD_ANIMATION: case DAD_GESTURE: case DAD_CALLINGCARD: +#if LL_MESH_ENABLED case DAD_MESH: +#endif accept = LLToolDragAndDrop::isInventoryDropAcceptable(object, (LLViewerInventoryItem*)cargo_data); if(accept && drop) { @@ -1240,6 +1242,7 @@ LLUIImagePtr LLTaskWearableBridge::getIcon() const return LLInventoryIcon::getIcon(mAssetType, mInventoryType, FALSE, mFlags, FALSE ); } +#if LL_MESH_ENABLED ///---------------------------------------------------------------------------- /// Class LLTaskMeshBridge ///---------------------------------------------------------------------------- @@ -1351,6 +1354,7 @@ void LLTaskMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } +#endif ///---------------------------------------------------------------------------- /// LLTaskInvFVBridge impl @@ -1431,11 +1435,13 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* object->getUUID(), object->getName()); break; +#if LL_MESH_ENABLED case LLAssetType::AT_MESH: new_bridge = new LLTaskMeshBridge(panel, object->getUUID(), object->getName()); break; +#endif default: llinfos << "Unhandled inventory type (llassetstorage.h): " << (S32)type << llendl; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index ceef03d2f8..0ce7ffb077 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6165,6 +6165,7 @@ S32 LLObjectSelection::getObjectCount(BOOL mesh_adjust) cleanupNodes(); S32 count = mList.size(); +#if LL_MESH_ENABLED if (mesh_adjust) { for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter) @@ -6185,6 +6186,7 @@ S32 LLObjectSelection::getObjectCount(BOOL mesh_adjust) } } +#endif return count; } diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 7b57f09e59..6088c31559 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -292,7 +292,11 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop( { BOOL handled = FALSE; - if ((cargo_type == DAD_TEXTURE) || (cargo_type == DAD_MESH)) + bool is_mesh = false; +#if LL_MESH_ENABLED + is_mesh = cargo_type == DAD_MESH; +#endif + if ((cargo_type == DAD_TEXTURE) || is_mesh) { LLInventoryItem *item = (LLInventoryItem *)cargo_data; @@ -1177,8 +1181,12 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, // returns true, then the cast was valid, and we can perform // the third test without problems. LLInventoryItem* item = (LLInventoryItem*)cargo_data; + bool is_mesh = false; +#if LL_MESH_ENABLED + is_mesh = cargo_type == DAD_MESH; +#endif if (getEnabled() && - ((cargo_type == DAD_TEXTURE) || (cargo_type == DAD_MESH)) && + ((cargo_type == DAD_TEXTURE) || is_mesh) && allowDrop(item)) { if (drop) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 15924d67cf..d679ccd3d8 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -331,7 +331,9 @@ LLToolDragAndDrop::LLDragAndDropDictionary::LLDragAndDropDictionary() addEntry(DAD_ANIMATION, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dUpdateInventory, &LLToolDragAndDrop::dad3dNULL)); addEntry(DAD_GESTURE, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dActivateGesture, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dUpdateInventory, &LLToolDragAndDrop::dad3dNULL)); addEntry(DAD_LINK, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL)); +#if LL_MESH_ENABLED addEntry(DAD_MESH, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dMeshObject, &LLToolDragAndDrop::dad3dNULL)); +#endif // TODO: animation on self could play it? edit it? // TODO: gesture on self could play it? edit it? }; @@ -1035,6 +1037,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj, hit_obj->sendTEUpdate(); } +#if LL_MESH_EANBLED void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj, LLInventoryItem* item, LLToolDragAndDrop::ESource source, @@ -1059,6 +1062,7 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj, dialog_refresh_all(); } +#endif /* void LLToolDragAndDrop::dropTextureOneFaceAvatar(LLVOAvatar* avatar, S32 hit_face, LLInventoryItem* item) @@ -1501,7 +1505,9 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ case DAD_ANIMATION: case DAD_GESTURE: case DAD_CALLINGCARD: +#if LL_MESH_ENABLED case DAD_MESH: +#endif { LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data; if(gInventory.getItem(inv_item->getUUID()) @@ -1858,10 +1864,12 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject( dropTextureOneFace(obj, face, item, mSource, mSourceID); } } +#if LL_MESH_ENABLED else if (cargo_type == DAD_MESH) { dropMesh(obj, item, mSource, mSourceID); } +#endif else { llwarns << "unsupported asset type" << llendl; @@ -1886,11 +1894,13 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject( return dad3dApplyToObject(obj, face, mask, drop, DAD_TEXTURE); } +#if LL_MESH_ENABLED EAcceptance LLToolDragAndDrop::dad3dMeshObject( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { return dad3dApplyToObject(obj, face, mask, drop, DAD_MESH); } +#endif diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index 596cc2ee88..ceeaa8c820 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -154,8 +154,10 @@ protected: MASK mask, BOOL drop); EAcceptance dad3dTextureObject(LLViewerObject* obj, S32 face, MASK mask, BOOL drop); +#if LL_MESH_ENABLED EAcceptance dad3dMeshObject(LLViewerObject* obj, S32 face, MASK mask, BOOL drop); +#endif // EAcceptance dad3dTextureSelf(LLViewerObject* obj, S32 face, // MASK mask, BOOL drop); EAcceptance dad3dWearItem(LLViewerObject* obj, S32 face, @@ -242,10 +244,12 @@ public: LLInventoryItem* item, ESource source, const LLUUID& src_id); +#if LL_MESH_ENABLED static void dropMesh(LLViewerObject* hit_obj, LLInventoryItem* item, ESource source, const LLUUID& src_id); +#endif //static void dropTextureOneFaceAvatar(LLVOAvatar* avatar,S32 hit_face, // LLInventoryItem* item) diff --git a/indra/newview/llviewerassettype.cpp b/indra/newview/llviewerassettype.cpp index 4c088a72b7..370767002a 100644 --- a/indra/newview/llviewerassettype.cpp +++ b/indra/newview/llviewerassettype.cpp @@ -85,7 +85,9 @@ LLViewerAssetDictionary::LLViewerAssetDictionary() addEntry(LLViewerAssetType::AT_LINK, new ViewerAssetEntry(DAD_LINK)); addEntry(LLViewerAssetType::AT_LINK_FOLDER, new ViewerAssetEntry(DAD_LINK)); +#if LL_MESH_ENABLED addEntry(LLViewerAssetType::AT_MESH, new ViewerAssetEntry(DAD_MESH)); +#endif addEntry(LLViewerAssetType::AT_NONE, new ViewerAssetEntry(DAD_NONE)); }; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 525610f983..c953fb23e3 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -177,7 +177,9 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); +#if LL_MESH_ENABLED LLFloaterReg::add("import_collada", "floater_import_collada.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); +#endif LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("im_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); @@ -258,7 +260,9 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_anim", "floater_animation_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); LLFloaterReg::add("upload_image", "floater_image_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); +#if LL_MESH_ENABLED LLFloaterReg::add("upload_model", "floater_model_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); +#endif LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index dd65ca2d25..af4549f7e1 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -350,6 +350,7 @@ class LLFileUploadImage : public view_listener_t } }; +#if LL_MESH_ENABLED class LLFileUploadScene : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -376,6 +377,7 @@ class LLFileUploadModel : public view_listener_t return TRUE; } }; +#endif class LLFileUploadSound : public view_listener_t { @@ -1144,6 +1146,7 @@ void upload_new_resource( lldebugs << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type) << llendl; lldebugs << "Asset Type: " << LLAssetType::lookup(asset_type) << llendl; +#if LL_MESH_ENABLED std::string url = gAgent.getRegion()->getCapability( "NewFileAgentInventory"); @@ -1171,8 +1174,8 @@ void upload_new_resource( asset_type)); } else +#endif { - llinfos << "NewAgentInventory capability not found, new agent inventory via asset system." << llendl; // check for adequate funds // TODO: do this check on the sim if (LLAssetType::AT_SOUND == asset_type || @@ -1217,6 +1220,7 @@ void upload_new_resource( } } +#if LL_MESH_ENABLED BOOL upload_new_variable_price_resource( const LLTransactionID &tid, LLAssetType::EType asset_type, @@ -1288,6 +1292,7 @@ BOOL upload_new_variable_price_resource( return FALSE; } } +#endif LLAssetID generate_asset_id_for_new_upload(const LLTransactionID& tid) { @@ -1358,8 +1363,10 @@ void init_menu_file() view_listener_t::addCommit(new LLFileUploadImage(), "File.UploadImage"); view_listener_t::addCommit(new LLFileUploadSound(), "File.UploadSound"); view_listener_t::addCommit(new LLFileUploadAnim(), "File.UploadAnim"); +#if LL_MESH_ENABLED view_listener_t::addCommit(new LLFileUploadModel(), "File.UploadModel"); view_listener_t::addCommit(new LLFileUploadScene(), "File.UploadScene"); +#endif view_listener_t::addCommit(new LLFileUploadBulk(), "File.UploadBulk"); view_listener_t::addCommit(new LLFileCloseWindow(), "File.CloseWindow"); view_listener_t::addCommit(new LLFileCloseAllWindows(), "File.CloseAllWindows"); diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index 08444551a9..bb7cfce862 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -74,6 +74,7 @@ void upload_new_resource( S32 expected_upload_cost, void *userdata); +#if LL_MESH_ENABLED // TODO* : Move all uploads to use this new function // since at some point, that upload path will be deprecated and no longer // used @@ -91,6 +92,7 @@ BOOL upload_new_variable_price_resource( U32 everyone_perms, const std::string& display_name, const LLSD& asset_resources); +#endif LLAssetID generate_asset_id_for_new_upload(const LLTransactionID& tid); void increase_new_upload_stats(LLAssetType::EType asset_type); diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index d35be8e1bf..697e8afa65 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -535,7 +535,9 @@ LLUIImagePtr LLEmbeddedItems::getItemImage(llwchar ext_char) const case LLAssetType::AT_BODYPART: img_name = "Inv_Skin"; break; case LLAssetType::AT_ANIMATION: img_name = "Inv_Animation"; break; case LLAssetType::AT_GESTURE: img_name = "Inv_Gesture"; break; +#if LL_MESH_ENABLED case LLAssetType::AT_MESH: img_name = "Inv_Mesh"; break; +#endif default: llassert(0); } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index fc4b590bf4..9f559331b0 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -591,8 +591,10 @@ public: if (gSavedSettings.getBOOL("DebugShowUploadCost")) { +#if LL_MESH_ENABLED addText(xpos, ypos, llformat(" Meshes: L$%d", gPipeline.mDebugMeshUploadCost)); ypos += y_inc/2; +#endif addText(xpos, ypos, llformat(" Sculpties: L$%d", gPipeline.mDebugSculptUploadCost)); ypos += y_inc/2; addText(xpos, ypos, llformat(" Textures: L$%d", gPipeline.mDebugTextureUploadCost)); @@ -602,6 +604,7 @@ public: ypos += y_inc; } +#if LL_MESH_ENABLED //temporary hack to give feedback on mesh upload progress if (!gMeshRepo.mUploads.empty()) { @@ -631,6 +634,7 @@ public: ypos += y_inc; } +#endif } void draw() diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index db9e0b88e1..d66aa567a8 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -926,6 +926,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool BOOL is404 = FALSE; +#if LL_MESH_ENABLED if (isSculpted()) { // if it's a mesh @@ -945,6 +946,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool } } } +#endif // Check if we need to change implementations bool is_flexible = (volume_params.getPathParams().getCurveType() == LL_PCODE_PATH_FLEXIBLE); @@ -989,10 +991,11 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool updateSculptTexture(); + if (isSculpted()) { updateSculptTexture(); - +#if LL_MESH_ENABLED // if it's a mesh if ((volume_params.getSculptType() & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH) { @@ -1008,6 +1011,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool } } else // otherwise is sculptie +#endif { if (mSculptTexture.notNull()) { @@ -2659,12 +2663,13 @@ BOOL LLVOVolume::isMesh() const { LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); U8 sculpt_type = sculpt_params->getSculptType(); - +#if LL_MESH_ENABLED if ((sculpt_type & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH) // mesh is a mesh { return TRUE; } +#endif } return FALSE; @@ -3010,6 +3015,7 @@ F32 LLVOVolume::getBinRadius() F32 scale = 1.f; +#if LL_MESH_ENABLED if (isSculpted()) { LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); @@ -3031,6 +3037,7 @@ F32 LLVOVolume::getBinRadius() scale = 1.f/llmax(vert_count/1024.f, 1.f); } } +#endif const LLVector4a* ext = mDrawable->getSpatialExtents(); @@ -3513,9 +3520,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) drawablep->clearState(LLDrawable::HAS_ALPHA); +#if LL_MESH_ENABLED bool rigged = vobj->isAttachment() && vobj->isMesh() && gMeshRepo.getSkinInfo(vobj->getVolume()->getParams().getSculptID()); +#endif bool bake_sunlight = LLPipeline::sBakeSunlight && drawablep->isStatic(); @@ -3526,6 +3535,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) drawablep->updateFaceSize(i); LLFace* facep = drawablep->getFace(i); +#if LL_MESH_ENABLED if (rigged) { if (!facep->isState(LLFace::RIGGED)) @@ -3622,6 +3632,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) facep->clearState(LLFace::RIGGED); } } +#endif if (cur_total > max_total || facep->getIndicesCount() <= 0 || facep->getGeomCount() <= 0) { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 583b3df0e5..c5c7277211 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2025,7 +2025,9 @@ void LLPipeline::rebuildPriorityGroups() assertInitialized(); +#if LL_MESH_ENABLED gMeshRepo.notifyLoadedMeshes(); +#endif // Iterate through all drawables on the priority build queue, for (LLSpatialGroup::sg_list_t::iterator iter = mGroupQ1.begin(); @@ -3859,6 +3861,7 @@ void LLPipeline::renderDebug() gPipeline.mDebugTextureUploadCost = textures.size() * 10; gPipeline.mDebugSculptUploadCost = sculpts.size()*10; +#if LL_MESH_ENABLED U32 mesh_cost = 0; for (std::set::iterator iter = meshes.begin(); iter != meshes.end(); ++iter) @@ -3867,6 +3870,7 @@ void LLPipeline::renderDebug() } gPipeline.mDebugMeshUploadCost = mesh_cost; +#endif } for (LLCullResult::bridge_list_t::const_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i) diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 4e8760947c..95f951b393 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -45,6 +45,7 @@ #include "llgl.h" #include "lldrawable.h" #include "llrendertarget.h" +#include "llmodel.h" //for LL_MESH_ENaBLED #include @@ -61,7 +62,10 @@ class LLCullResult; class LLVOAvatar; class LLGLSLShader; class LLCurlRequest; + +#if LL_MESH_ENABLED class LLMeshResponder; +#endif typedef enum e_avatar_skinning_method { @@ -465,7 +469,9 @@ public: S32 mDebugTextureUploadCost; S32 mDebugSculptUploadCost; +#if LL_MESH_ENABLED S32 mDebugMeshUploadCost; +#endif S32 mLightingChanges; S32 mGeometryChanges; @@ -712,13 +718,6 @@ public: protected: std::vector mSelectedFaces; - - typedef std::map > mesh_load_map; - mesh_load_map mLoadingMeshes[4]; - - typedef std::list mesh_response_list; - mesh_response_list mMeshResponseList; - LLPointer mFaceSelectImagep; U32 mLightMask; diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 8b431e9c54..b54bad98d0 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -160,7 +160,7 @@ layout="topleft" left="5" name="CustomGraphics Panel" - top="101" + top="76" width="485"> Low @@ -625,7 +625,7 @@ follows="left|top" height="12" layout="topleft" - left_delta="-260" + left="200" name="AvatarRenderingText" top_pad="8" width="128"> @@ -673,7 +673,7 @@ left="358" left_pad="-30" name="TerrainDetailText" - top="488" + top="226" width="155"> Terrain detail: -- cgit v1.3 From 6e37ec08f678451a526f34218cb070d117cdf60a Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 14 Jun 2010 23:13:10 -0500 Subject: Builds with LLConvexDecompInter as a static lib. --- indra/cmake/CMakeLists.txt | 2 ++ indra/llcommon/llassettype.h | 2 -- indra/llinventory/llinventorytype.h | 3 --- indra/llmath/llvolume.cpp | 8 ++++---- indra/llmath/llvolume.h | 4 ++-- indra/newview/CMakeLists.txt | 3 +++ indra/newview/llassetuploadresponders.h | 1 + indra/newview/lldrawpoolavatar.h | 1 + indra/newview/llinventorybridge.h | 1 + indra/newview/lltooldraganddrop.cpp | 2 +- indra/newview/lltooldraganddrop.h | 1 + indra/newview/llvovolume.cpp | 2 +- indra/newview/skins/default/xui/en/floater_about.xml | 4 +++- 13 files changed, 20 insertions(+), 14 deletions(-) (limited to 'indra/llinventory') diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 4fc25dcc24..8612c46376 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -34,6 +34,7 @@ set(cmake_SOURCE_FILES FindXmlRpcEpi.cmake FMOD.cmake FreeType.cmake + GLOD.cmake GStreamer010Plugin.cmake GooglePerfTools.cmake JPEG.cmake @@ -41,6 +42,7 @@ set(cmake_SOURCE_FILES LLAudio.cmake LLCharacter.cmake LLCommon.cmake + LLConvexDecompInter.cmake LLCrashLogger.cmake LLDatabase.cmake LLImage.cmake diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h index ebc43134cb..27d35e95ff 100644 --- a/indra/llcommon/llassettype.h +++ b/indra/llcommon/llassettype.h @@ -114,10 +114,8 @@ public: AT_LINK_FOLDER = 25, // Inventory folder link -#if LL_MESH_ENABLED AT_MESH = 49, // Mesh data in our proprietary SLM format -#endif AT_COUNT = 50, diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h index d2fc67ef64..17ed3df951 100644 --- a/indra/llinventory/llinventorytype.h +++ b/indra/llinventory/llinventorytype.h @@ -67,10 +67,7 @@ public: IT_WEARABLE = 18, IT_ANIMATION = 19, IT_GESTURE = 20, - -#if LL_MESH_ENABLED IT_MESH = 22, -#endif IT_COUNT = 23, IT_NONE = -1 diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 10cef533b0..53f484fb79 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5355,9 +5355,9 @@ bool LLVolumeFace::VertexMapData::operator==(const LLVolumeFace::VertexData& rhs getNormal().equal3(rhs.getNormal()); } -bool LLVolumeFace::VertexMapData::ComparePosition::operator()(const LLVector4a& a, const LLVector4a& b) const +bool LLVolumeFace::VertexMapData::ComparePosition::operator()(const LLVector3& a, const LLVector3& b) const { - return a.less3(b); + return a < b; } void LLVolumeFace::optimize(F32 angle_cutoff) @@ -5375,7 +5375,7 @@ void LLVolumeFace::optimize(F32 angle_cutoff) getVertexData(index, cv); BOOL found = FALSE; - VertexMapData::PointMap::iterator point_iter = point_map.find(cv.getPosition()); + VertexMapData::PointMap::iterator point_iter = point_map.find(LLVector3(cv.getPosition().getF32())); if (point_iter != point_map.end()) { //duplicate point might exist for (U32 j = 0; j < point_iter->second.size(); ++j) @@ -5407,7 +5407,7 @@ void LLVolumeFace::optimize(F32 angle_cutoff) } else { - point_map[d.getPosition()].push_back(d); + point_map[LLVector3(d.getPosition().getF32())].push_back(d); } } } diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 98db7f31c0..4aef3be973 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -873,10 +873,10 @@ public: struct ComparePosition { - bool operator()(const LLVector4a& a, const LLVector4a& b) const; + bool operator()(const LLVector3& a, const LLVector3& b) const; }; - typedef std::map, VertexMapData::ComparePosition > PointMap; + typedef std::map, VertexMapData::ComparePosition > PointMap; }; void optimize(F32 angle_cutoff = 2.f); diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index d2ae81180b..9de1d4aca5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -16,6 +16,7 @@ include(FindOpenGL) include(LLAudio) include(LLCharacter) include(LLCommon) +include(LLConvexDecompInter) include(LLImage) include(LLImageJ2COJ) include(LLInventory) @@ -49,6 +50,7 @@ include_directories( ${LLAUDIO_INCLUDE_DIRS} ${LLCHARACTER_INCLUDE_DIRS} ${LLCOMMON_INCLUDE_DIRS} + ${LLCONVEXDECOMPINTER_INCLUDE_DIRS} ${LLIMAGE_INCLUDE_DIRS} ${LLINVENTORY_INCLUDE_DIRS} ${LLMATH_INCLUDE_DIRS} @@ -1683,6 +1685,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${CRYPTO_LIBRARIES} ${LLLOGIN_LIBRARIES} ${GOOGLE_PERFTOOLS_LIBRARIES} + ${LLCONVEXDECOMPINTER_LIBRARIES} ) build_version(viewer) diff --git a/indra/newview/llassetuploadresponders.h b/indra/newview/llassetuploadresponders.h index 9abaccfde0..5890fbbc08 100644 --- a/indra/newview/llassetuploadresponders.h +++ b/indra/newview/llassetuploadresponders.h @@ -34,6 +34,7 @@ #define LL_LLASSETUPLOADRESPONDER_H #include "llhttpclient.h" +#include "llvolume.h" //for LL_MESH_ENABLED // Abstract class for supporting asset upload // via capabilities diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h index 46ffc42f04..b01394534b 100644 --- a/indra/newview/lldrawpoolavatar.h +++ b/indra/newview/lldrawpoolavatar.h @@ -34,6 +34,7 @@ #define LL_LLDRAWPOOLAVATAR_H #include "lldrawpool.h" +#include "llvolume.h" // for LL_MESH_ENABLED class LLVOAvatar; class LLGLSLShader; diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 8de7d63173..0e3b5bc3c9 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -40,6 +40,7 @@ #include "llinventoryobserver.h" #include "llviewercontrol.h" #include "llwearable.h" +#include "llvolume.h" //for LL_MESH_ENABLED class LLInventoryPanel; class LLInventoryModel; diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index d679ccd3d8..c4ecba1aa2 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1037,7 +1037,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj, hit_obj->sendTEUpdate(); } -#if LL_MESH_EANBLED +#if LL_MESH_ENABLED void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj, LLInventoryItem* item, LLToolDragAndDrop::ESource source, diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index ceeaa8c820..09da4c2955 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -43,6 +43,7 @@ #include "llpermissions.h" #include "llwindow.h" #include "llviewerinventory.h" +#include "llvolume.h" //for LL_MESH_ENABLED class LLToolDragAndDrop; class LLViewerRegion; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d66aa567a8..8f51edc1de 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1594,7 +1594,7 @@ void LLVOVolume::updateFaceSize(S32 idx) LLFace* facep = mDrawable->getFace(idx); if (idx >= getVolume()->getNumVolumeFaces()) { - facep->setSize(0,0); + facep->setSize(0,0, true); } else { diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 294a68255d..860cff6664 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -160,10 +160,12 @@ xmlrpc-epi Copyright (C) 2000 Epinions, Inc. zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler. google-perftools Copyright (c) 2005, Google Inc. +Second Life Viewer uses Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (and its Licensors). All Rights Reserved. See www.havok.com for details. + All rights reserved. See licenses.txt for details. Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C) - + -- cgit v1.3 From 2dd3a6be720ed6ce7c17415fc8d81869cf46f3a0 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 13 Jul 2010 12:02:14 -0500 Subject: Fix for mesh upload, consolidate generating bad indices, and normal generation. --- indra/llcommon/llassettype.cpp | 3 --- indra/llinventory/llinventorytype.cpp | 5 ----- indra/llmath/llvolume.cpp | 36 ++++++++++++++++++++++++++--------- indra/llmath/llvolume.h | 2 +- 4 files changed, 28 insertions(+), 18 deletions(-) (limited to 'indra/llinventory') diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp index 476a23ec64..bdd115364e 100644 --- a/indra/llcommon/llassettype.cpp +++ b/indra/llcommon/llassettype.cpp @@ -99,10 +99,7 @@ LLAssetDictionary::LLAssetDictionary() addEntry(LLAssetType::AT_LINK, new AssetEntry("LINK", "link", "sym link", false, false, true)); addEntry(LLAssetType::AT_LINK_FOLDER, new AssetEntry("FOLDER_LINK", "link_f", "sym folder link", false, false, true)); -#if LL_MESH_ENABLED addEntry(LLAssetType::AT_MESH, new AssetEntry("MESH", "mesh", "mesh", false, false, false)); -#endif - addEntry(LLAssetType::AT_NONE, new AssetEntry("NONE", "-1", NULL, FALSE, FALSE, FALSE)); }; diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp index 82cd22a832..5c5500b6f4 100644 --- a/indra/llinventory/llinventorytype.cpp +++ b/indra/llinventory/llinventorytype.cpp @@ -89,10 +89,7 @@ LLInventoryDictionary::LLInventoryDictionary() addEntry(LLInventoryType::IT_WEARABLE, new InventoryEntry("wearable", "wearable", 2, LLAssetType::AT_CLOTHING, LLAssetType::AT_BODYPART)); addEntry(LLInventoryType::IT_ANIMATION, new InventoryEntry("animation", "animation", 1, LLAssetType::AT_ANIMATION)); addEntry(LLInventoryType::IT_GESTURE, new InventoryEntry("gesture", "gesture", 1, LLAssetType::AT_GESTURE)); -#if LL_MESH_ENABLED addEntry(LLInventoryType::IT_MESH, new InventoryEntry("mesh", "mesh", 1, LLAssetType::AT_MESH)); -#endif - } @@ -152,9 +149,7 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] = LLInventoryType::IT_NONE, // AT_NONE LLInventoryType::IT_NONE, // AT_NONE LLInventoryType::IT_NONE, // AT_NONE -#if LL_MESH_ENABLED LLInventoryType::IT_MESH // AT_MESH -#endif }; // static diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 38944d3855..51bcfb38d4 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5369,7 +5369,17 @@ bool LLVolumeFace::VertexMapData::operator==(const LLVolumeFace::VertexData& rhs bool LLVolumeFace::VertexMapData::ComparePosition::operator()(const LLVector3& a, const LLVector3& b) const { - return a < b; + if (a.mV[0] != b.mV[0]) + { + return a.mV[0] < b.mV[0]; + } + + if (a.mV[1] != b.mV[1]) + { + return a.mV[1] < b.mV[1]; + } + + return a.mV[2] < b.mV[2]; } void LLVolumeFace::optimize(F32 angle_cutoff) @@ -6145,12 +6155,13 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con { S32 new_verts = mNumVertices+1; S32 new_size = new_verts*16; - + S32 old_size = mNumVertices*16; + //positions LLVector4a* dst = (LLVector4a*) ll_aligned_malloc_16(new_size); if (mPositions) { - LLVector4a::memcpyNonAliased16((F32*) dst, (F32*) mPositions, new_size/4); + LLVector4a::memcpyNonAliased16((F32*) dst, (F32*) mPositions, old_size/4); ll_aligned_free_16(mPositions); } mPositions = dst; @@ -6159,22 +6170,25 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con dst = (LLVector4a*) ll_aligned_malloc_16(new_size); if (mNormals) { - LLVector4a::memcpyNonAliased16((F32*) dst, (F32*) mNormals, new_size/4); + LLVector4a::memcpyNonAliased16((F32*) dst, (F32*) mNormals, old_size/4); ll_aligned_free_16(mNormals); } mNormals = dst; //tex coords new_size = ((new_verts*8)+0xF) & ~0xF; + old_size = ((mNumVertices*8)+0xF) & ~0xF; + dst = (LLVector4a*) ll_aligned_malloc_16(new_size); { LLVector2* dst = (LLVector2*) ll_aligned_malloc_16(new_size); if (mTexCoords) { - LLVector4a::memcpyNonAliased16((F32*) dst, (F32*) mTexCoords, new_size/4); + LLVector4a::memcpyNonAliased16((F32*) dst, (F32*) mTexCoords, old_size/4); ll_aligned_free_16(mTexCoords); } } + mTexCoords = (LLVector2*) dst; //just clear binormals ll_aligned_free_16(mBinormals); @@ -6223,12 +6237,15 @@ void LLVolumeFace::pushIndex(const U16& idx) S32 new_count = mNumIndices + 1; S32 new_size = ((new_count*2)+0xF) & ~0xF; - S32 old_size = (mNumIndices+0xF) & ~0xF; + S32 old_size = ((mNumIndices*2)+0xF) & ~0xF; if (new_size != old_size) { U16* dst = (U16*) ll_aligned_malloc_16(new_size); - LLVector4a::memcpyNonAliased16((F32*) dst, (F32*) mIndices, new_size/4); - ll_aligned_free_16(mIndices); + if (mIndices) + { + LLVector4a::memcpyNonAliased16((F32*) dst, (F32*) mIndices, old_size/4); + ll_aligned_free_16(mIndices); + } mIndices = dst; } @@ -6339,7 +6356,8 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat U16* new_indices = (U16*) ll_aligned_malloc_16((new_count*2+0xF) & ~0xF); if (mNumIndices > 0) { //copy old index buffer - LLVector4a::memcpyNonAliased16((F32*) new_indices, (F32*) mIndices, llmax(mNumIndices/2, 4)); + S32 old_size = (mNumIndices*2+0xF) & ~0xF; + LLVector4a::memcpyNonAliased16((F32*) new_indices, (F32*) mIndices, old_size/4); } //free old index buffer diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 9cce94e6cf..af28337f57 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -41,7 +41,7 @@ class LLVolumeParams; class LLProfile; class LLPath; -#define LL_MESH_ENABLED 0 +#define LL_MESH_ENABLED 1 template class LLOctreeNode; -- cgit v1.3 From 5c9fc08604bf7abb807f09fa5519ea420ef146c5 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Mon, 19 Jul 2010 14:55:58 +0100 Subject: Bury the dead code day: Cleanup redundant XUI files --- indra/llinventory/llparcel.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index b08cb28218..d741cc855b 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -58,7 +58,6 @@ static const std::string PARCEL_OWNERSHIP_STATUS_STRING[LLParcel::OS_COUNT+1] = }; // NOTE: Adding parcel categories also requires updating: -// * floater_directory.xml category combobox // * floater_about_land.xml category combobox // * Web site "create event" tools // DO NOT DELETE ITEMS FROM THIS LIST WITHOUT DEEPLY UNDERSTANDING WHAT YOU'RE DOING. -- cgit v1.3