diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-12-21 10:38:08 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-12-21 10:38:08 -0500 |
commit | e0d77c277a46fa1161505a177e99b456854a98fd (patch) | |
tree | 9c0bb28f90368e34fb907950ca54b94df85b5fa2 | |
parent | c87142e5d779fb3d5375842658a63a1af2573094 (diff) | |
parent | e7f3f3bdbbec310030209e09d389cd434adb7991 (diff) |
Automated merge from mesh-development
-rw-r--r-- | indra/llcommon/llfasttimer_class.h | 6 | ||||
-rw-r--r-- | indra/llcommon/llthread.cpp | 2 | ||||
-rw-r--r-- | indra/llmath/llsimdmath.h | 2 | ||||
-rw-r--r-- | indra/llmath/llvolume.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 69 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.h | 9 | ||||
-rw-r--r-- | indra/newview/llcallbacklist.cpp | 65 | ||||
-rw-r--r-- | indra/newview/llcallbacklist.h | 9 | ||||
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 44 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 6 | ||||
-rw-r--r-- | indra/newview/llfloatermodelwizard.cpp | 141 | ||||
-rw-r--r-- | indra/newview/llfloatermodelwizard.h | 38 | ||||
-rw-r--r-- | indra/newview/llviewercontrol.cpp | 40 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_model_wizard.xml | 832 |
14 files changed, 920 insertions, 345 deletions
diff --git a/indra/llcommon/llfasttimer_class.h b/indra/llcommon/llfasttimer_class.h index 2a645315c9..038a2d246a 100644 --- a/indra/llcommon/llfasttimer_class.h +++ b/indra/llcommon/llfasttimer_class.h @@ -31,16 +31,14 @@ #define FAST_TIMER_ON 1 #define TIME_FAST_TIMERS 0 -#define DEBUG_FAST_TIMER_THREADS 0 +#define DEBUG_FAST_TIMER_THREADS 1 class LLMutex; #include <queue> #include "llsd.h" -#if DEBUG_FAST_TIMER_THREADS -void assert_main_thread(); -#endif +LL_COMMON_API void assert_main_thread(); class LL_COMMON_API LLFastTimer { diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index f0b7ac5def..b4617c5453 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -62,7 +62,7 @@ U32 ll_thread_local sThreadID = 0; U32 LLThread::sIDIter = 0; -void assert_main_thread() +LL_COMMON_API void assert_main_thread() { static U32 s_thread_id = LLThread::currentID(); if (LLThread::currentID() != s_thread_id) diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h index b6ac5190a7..c7cdf7b32c 100644 --- a/indra/llmath/llsimdmath.h +++ b/indra/llmath/llsimdmath.h @@ -35,7 +35,9 @@ #error SSE2 not enabled. LLVector4a and related class will not compile. #endif +#if !LL_WINDOWS #include <stdint.h> +#endif template <typename T> T* LL_NEXT_ALIGNED_ADDRESS(T* address) { diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index c0b50b606e..8a7b19800c 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -29,7 +29,9 @@ #include "llmath.h" #include <set> +#if !LL_WINDOWS #include <stdint.h> +#endif #include "llerror.h" #include "llmemtype.h" diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 80734b0d41..0e080e713b 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2759,75 +2759,6 @@ BOOL LLAppearanceMgr::getIsProtectedCOFItem(const LLUUID& obj_id) const */ } -// Shim class to allow arbitrary boost::bind -// expressions to be run as one-time idle callbacks. -// -// TODO: rework idle function spec to take a boost::function in the first place. -class OnIdleCallbackOneTime -{ -public: - OnIdleCallbackOneTime(nullary_func_t callable): - mCallable(callable) - { - } - static void onIdle(void *data) - { - gIdleCallbacks.deleteFunction(onIdle, data); - OnIdleCallbackOneTime* self = reinterpret_cast<OnIdleCallbackOneTime*>(data); - self->call(); - delete self; - } - void call() - { - mCallable(); - } -private: - nullary_func_t mCallable; -}; - -void doOnIdleOneTime(nullary_func_t callable) -{ - OnIdleCallbackOneTime* cb_functor = new OnIdleCallbackOneTime(callable); - gIdleCallbacks.addFunction(&OnIdleCallbackOneTime::onIdle,cb_functor); -} - -// Shim class to allow generic boost functions to be run as -// recurring idle callbacks. Callable should return true when done, -// false to continue getting called. -// -// TODO: rework idle function spec to take a boost::function in the first place. -class OnIdleCallbackRepeating -{ -public: - OnIdleCallbackRepeating(bool_func_t callable): - mCallable(callable) - { - } - // Will keep getting called until the callable returns true. - static void onIdle(void *data) - { - OnIdleCallbackRepeating* self = reinterpret_cast<OnIdleCallbackRepeating*>(data); - bool done = self->call(); - if (done) - { - gIdleCallbacks.deleteFunction(onIdle, data); - delete self; - } - } - bool call() - { - return mCallable(); - } -private: - bool_func_t mCallable; -}; - -void doOnIdleRepeating(bool_func_t callable) -{ - OnIdleCallbackRepeating* cb_functor = new OnIdleCallbackRepeating(callable); - gIdleCallbacks.addFunction(&OnIdleCallbackRepeating::onIdle,cb_functor); -} - class CallAfterCategoryFetchStage2: public LLInventoryFetchItemsObserver { public: diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index c65d9dc9ee..4b1d95cf25 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -248,15 +248,6 @@ private: LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id,const std::string& name); -typedef boost::function<void ()> nullary_func_t; -typedef boost::function<bool ()> bool_func_t; - -// Call a given callable once in idle loop. -void doOnIdleOneTime(nullary_func_t callable); - -// Repeatedly call a callable in idle loop until it returns true. -void doOnIdleRepeating(bool_func_t callable); - // Invoke a given callable after category contents are fully fetched. void callAfterCategoryFetch(const LLUUID& cat_id, nullary_func_t cb); diff --git a/indra/newview/llcallbacklist.cpp b/indra/newview/llcallbacklist.cpp index a54c77b4a0..357a6582d1 100644 --- a/indra/newview/llcallbacklist.cpp +++ b/indra/newview/llcallbacklist.cpp @@ -115,6 +115,71 @@ void LLCallbackList::callFunctions() } } +// Shim class to allow arbitrary boost::bind +// expressions to be run as one-time idle callbacks. +class OnIdleCallbackOneTime +{ +public: + OnIdleCallbackOneTime(nullary_func_t callable): + mCallable(callable) + { + } + static void onIdle(void *data) + { + gIdleCallbacks.deleteFunction(onIdle, data); + OnIdleCallbackOneTime* self = reinterpret_cast<OnIdleCallbackOneTime*>(data); + self->call(); + delete self; + } + void call() + { + mCallable(); + } +private: + nullary_func_t mCallable; +}; + +void doOnIdleOneTime(nullary_func_t callable) +{ + OnIdleCallbackOneTime* cb_functor = new OnIdleCallbackOneTime(callable); + gIdleCallbacks.addFunction(&OnIdleCallbackOneTime::onIdle,cb_functor); +} + +// Shim class to allow generic boost functions to be run as +// recurring idle callbacks. Callable should return true when done, +// false to continue getting called. +class OnIdleCallbackRepeating +{ +public: + OnIdleCallbackRepeating(bool_func_t callable): + mCallable(callable) + { + } + // Will keep getting called until the callable returns true. + static void onIdle(void *data) + { + OnIdleCallbackRepeating* self = reinterpret_cast<OnIdleCallbackRepeating*>(data); + bool done = self->call(); + if (done) + { + gIdleCallbacks.deleteFunction(onIdle, data); + delete self; + } + } + bool call() + { + return mCallable(); + } +private: + bool_func_t mCallable; +}; + +void doOnIdleRepeating(bool_func_t callable) +{ + OnIdleCallbackRepeating* cb_functor = new OnIdleCallbackRepeating(callable); + gIdleCallbacks.addFunction(&OnIdleCallbackRepeating::onIdle,cb_functor); +} + #ifdef _DEBUG void test1(void *data) diff --git a/indra/newview/llcallbacklist.h b/indra/newview/llcallbacklist.h index 07ac21f5e9..97f3bfd9ee 100644 --- a/indra/newview/llcallbacklist.h +++ b/indra/newview/llcallbacklist.h @@ -52,6 +52,15 @@ protected: callback_list_t mCallbackList; }; +typedef boost::function<void ()> nullary_func_t; +typedef boost::function<bool ()> bool_func_t; + +// Call a given callable once in idle loop. +void doOnIdleOneTime(nullary_func_t callable); + +// Repeatedly call a callable in idle loop until it returns true. +void doOnIdleRepeating(bool_func_t callable); + extern LLCallbackList gIdleCallbacks; #endif diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 660157df1e..85d0ae02cf 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -94,8 +94,7 @@ #include "lltoggleablemenu.h" #include "llvfile.h" #include "llvfs.h" - - +#include "llcallbacklist.h" #include "glod/glod.h" @@ -108,7 +107,6 @@ const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PRE const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16; const S32 PREVIEW_TEXTURE_HEIGHT = 300; -const S32 NUM_LOD = 4; void drawBoxOutline(const LLVector3& pos, const LLVector3& size); @@ -477,12 +475,10 @@ void LLFloaterModelPreview::onPreviewLODCommit(LLUICtrl* ctrl, void* userdata) S32 which_mode = 0; - LLCtrlSelectionInterface* iface = fp->childGetSelectionInterface("preview_lod_combo"); - if (iface) - { - which_mode = iface->getFirstSelectedIndex(); - } - which_mode = (NUM_LOD-1)-which_mode; // combo box list of lods is in reverse order + LLComboBox* combo = (LLComboBox*) ctrl;
+
+ which_mode = (NUM_LOD-1)-combo->getFirstSelectedIndex(); // combo box list of lods is in reverse order
+
fp->mModelPreview->setPreviewLOD(which_mode); } @@ -1600,8 +1596,8 @@ void LLModelLoader::run() } processElement(scene); - - mPreview->loadModelCallback(mLod); + + doOnIdleOneTime(boost::bind(&LLModelPreview::loadModelCallback,mPreview,mLod)); } } @@ -2053,6 +2049,8 @@ LLModelPreview::~LLModelPreview() U32 LLModelPreview::calcResourceCost() { + assert_main_thread(); + rebuildUploadData(); if ( mModelLoader->getLoadState() != LLModelLoader::ERROR_PARSING ) @@ -2134,6 +2132,8 @@ U32 LLModelPreview::calcResourceCost() void LLModelPreview::rebuildUploadData() { + assert_main_thread(); + mUploadData.clear(); mTextureSet.clear(); @@ -2256,6 +2256,8 @@ void LLModelPreview::clearModel(S32 lod) void LLModelPreview::loadModel(std::string filename, S32 lod) { + assert_main_thread(); + LLMutexLock lock(this); if (mModelLoader) @@ -2311,6 +2313,8 @@ void LLModelPreview::loadModel(std::string filename, S32 lod) void LLModelPreview::setPhysicsFromLOD(S32 lod) { + assert_main_thread(); + if (lod >= 0 && lod <= 3) { mModel[LLModel::LOD_PHYSICS] = mModel[lod]; @@ -2366,7 +2370,9 @@ void LLModelPreview::clearGLODGroup() } void LLModelPreview::loadModelCallback(S32 lod) -{ //NOT the main thread +{ + assert_main_thread(); + LLMutexLock lock(this); if (!mModelLoader) { @@ -2421,6 +2427,8 @@ void LLModelPreview::resetPreviewTarget() void LLModelPreview::generateNormals() { + assert_main_thread(); + S32 which_lod = mPreviewLOD; @@ -2688,7 +2696,7 @@ bool LLModelPreview::containsRiggedAsset( void ) } return false; } -void LLModelPreview::genLODs(S32 which_lod) +void LLModelPreview::genLODs(S32 which_lod, U32 decimation) { if (mBaseModel.empty()) { @@ -2905,7 +2913,7 @@ void LLModelPreview::genLODs(S32 which_lod) { if (lod < start) { - triangle_count /= 3; + triangle_count /= decimation; } } else @@ -3063,6 +3071,8 @@ void LLModelPreview::genLODs(S32 which_lod) void LLModelPreview::updateStatusMessages() { + assert_main_thread(); + //triangle/vertex/submesh count for each mesh asset for each lod std::vector<S32> tris[LLModel::NUM_LODS]; std::vector<S32> verts[LLModel::NUM_LODS]; @@ -3576,6 +3586,8 @@ void LLModelPreview::update() //----------------------------------------------------------------------------- BOOL LLModelPreview::render() { + assert_main_thread(); + LLMutexLock lock(this); mNeedsUpdate = FALSE; @@ -4141,6 +4153,8 @@ void LLModelPreview::setPreviewLOD(S32 lod) //static void LLFloaterModelPreview::onBrowseLOD(void* data) { + assert_main_thread(); + LLFloaterModelPreview* mp = (LLFloaterModelPreview*) data; mp->loadModel(mp->mModelPreview->mPreviewLOD); } @@ -4148,6 +4162,8 @@ void LLFloaterModelPreview::onBrowseLOD(void* data) //static void LLFloaterModelPreview::onUpload(void* user_data) { + assert_main_thread(); + LLFloaterModelPreview* mp = (LLFloaterModelPreview*) user_data; mp->mModelPreview->rebuildUploadData(); diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index e233f3672a..64b220d86b 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -52,6 +52,8 @@ class domTranslate; class LLMenuButton; class LLToggleableMenu; +const S32 NUM_LOD = 4;
+ class LLModelLoader : public LLThread { public: @@ -258,7 +260,7 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex void clearModel(S32 lod); void loadModel(std::string filename, S32 lod); void loadModelCallback(S32 lod); - void genLODs(S32 which_lod = -1); + void genLODs(S32 which_lod = -1, U32 decimation = 3); void generateNormals(); void consolidate(); void clearMaterials(); @@ -278,7 +280,7 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex friend class LLFloaterModelPreview::DecompRequest; friend class LLPhysicsDecomp; - LLFloater* mFMP; + LLFloater* mFMP; BOOL mNeedsUpdate; bool mDirty; diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp index 79c29ef017..6a92e43d1a 100644 --- a/indra/newview/llfloatermodelwizard.cpp +++ b/indra/newview/llfloatermodelwizard.cpp @@ -28,19 +28,71 @@ #include "llviewerprecompiledheaders.h" +#include "llbutton.h" #include "lldrawable.h" +#include "llcombobox.h" #include "llfloater.h" #include "llfloatermodelwizard.h" #include "llfloatermodelpreview.h" #include "llfloaterreg.h" +#include "llslider.h" +static const std::string stateNames[]={ + "choose_file", + "optimize", + "physics", + "review", + "upload"}; LLFloaterModelWizard::LLFloaterModelWizard(const LLSD& key) : LLFloater(key) { } +void LLFloaterModelWizard::setState(int state) +{ + mState = state; + setButtons(state); + + for(size_t t=0; t<LL_ARRAY_SIZE(stateNames); ++t) + { + LLView *view = getChild<LLView>(stateNames[t]+"_panel"); + if (view) + { + view->setVisible(state == (int) t ? TRUE : FALSE); + } + } + + if (state == OPTIMIZE) + { + mModelPreview->genLODs(-1); + } +} + +void LLFloaterModelWizard::setButtons(int state) +{ + for(size_t i=0; i<LL_ARRAY_SIZE(stateNames); ++i) + { + LLButton *button = getChild<LLButton>(stateNames[i]+"_btn"); + + if (i < state) + { + button->setEnabled(TRUE); + button->setToggleState(FALSE); + } + else if (i == state) + { + button->setEnabled(TRUE); + button->setToggleState(TRUE); + } + else + { + button->setEnabled(FALSE); + } + } +} + void LLFloaterModelWizard::loadModel() { mModelPreview->mLoading = TRUE; @@ -48,6 +100,30 @@ void LLFloaterModelWizard::loadModel() (new LLMeshFilePicker(mModelPreview, 3))->getFile(); } +void LLFloaterModelWizard::onClickCancel() +{ + closeFloater(); +} + +void LLFloaterModelWizard::onClickBack() +{ + setState(llmax((int) CHOOSE_FILE, mState-1)); +} + +void LLFloaterModelWizard::onClickNext() +{ + setState(llmin((int) UPLOAD, mState+1)); +} + +bool LLFloaterModelWizard::onEnableNext() +{ + return true; +} + +bool LLFloaterModelWizard::onEnableBack() +{ + return true; +} BOOL LLFloaterModelWizard::postBuild() { @@ -56,7 +132,20 @@ BOOL LLFloaterModelWizard::postBuild() childSetValue("import_scale", (F32) 0.67335826); getChild<LLUICtrl>("browse")->setCommitCallback(boost::bind(&LLFloaterModelWizard::loadModel, this)); + getChild<LLUICtrl>("cancel")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onClickCancel, this)); + getChild<LLUICtrl>("back")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onClickBack, this)); + getChild<LLUICtrl>("next")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onClickNext, this)); + childSetCommitCallback("preview_lod_combo", onPreviewLODCommit, this); + getChild<LLUICtrl>("accuracy_slider")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onAccuracyPerformance, this, _2)); + + childSetAction("ok_btn", onUpload, this); + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; + + enable_registrar.add("Next.OnEnable", boost::bind(&LLFloaterModelWizard::onEnableNext, this)); + enable_registrar.add("Back.OnEnable", boost::bind(&LLFloaterModelWizard::onEnableBack, this)); + + mPreviewRect = preview_panel->getRect(); mModelPreview = new LLModelPreview(512, 512, this); @@ -64,9 +153,55 @@ BOOL LLFloaterModelWizard::postBuild() center(); + setState(CHOOSE_FILE); + + childSetTextArg("import_dimensions", "[X]", LLStringUtil::null); + childSetTextArg("import_dimensions", "[Y]", LLStringUtil::null); + childSetTextArg("import_dimensions", "[Z]", LLStringUtil::null); + return TRUE; } +void LLFloaterModelWizard::onUpload(void* user_data) +{ + LLFloaterModelWizard* mp = (LLFloaterModelWizard*) user_data; + + mp->mModelPreview->rebuildUploadData(); + + gMeshRepo.uploadModel(mp->mModelPreview->mUploadData, mp->mModelPreview->mPreviewScale, + mp->childGetValue("upload_textures").asBoolean(), mp->childGetValue("upload_skin"), mp->childGetValue("upload_joints")); + + mp->closeFloater(false); +} + + +void LLFloaterModelWizard::onAccuracyPerformance(const LLSD& data) +{ + int val = (int) data.asInteger(); + + mModelPreview->genLODs(-1, NUM_LOD-val); + + mModelPreview->refresh(); +} + +void LLFloaterModelWizard::onPreviewLODCommit(LLUICtrl* ctrl, void* userdata) +{ + LLFloaterModelWizard *fp =(LLFloaterModelWizard *)userdata; + + if (!fp->mModelPreview) + { + return; + } + + S32 which_mode = 0; + + LLComboBox* combo = (LLComboBox*) ctrl; + + which_mode = (NUM_LOD-1)-combo->getFirstSelectedIndex(); // combo box list of lods is in reverse order + + fp->mModelPreview->setPreviewLOD(which_mode); +} + void LLFloaterModelWizard::draw() { LLFloater::draw(); @@ -74,14 +209,14 @@ void LLFloaterModelWizard::draw() mModelPreview->update(); - if (mModelPreview && mModelPreview->mModelLoader) + if (mModelPreview) { gGL.color3f(1.f, 1.f, 1.f); gGL.getTexUnit(0)->bind(mModelPreview); - - LLView* preview_panel = getChild<LLView>("preview_panel"); + LLView *view = getChild<LLView>(stateNames[mState]+"_panel"); + LLView* preview_panel = view->getChild<LLView>("preview_panel"); LLRect rect = preview_panel->getRect(); if (rect != mPreviewRect) diff --git a/indra/newview/llfloatermodelwizard.h b/indra/newview/llfloatermodelwizard.h index c766697d47..ab69d93b63 100644 --- a/indra/newview/llfloatermodelwizard.h +++ b/indra/newview/llfloatermodelwizard.h @@ -35,24 +35,36 @@ public: virtual ~LLFloaterModelWizard() {}; /*virtual*/ BOOL postBuild(); void draw(); - void loadModel(); - //void onSave(); - //void onReset(); - //void onCancel(); - ///*virtual*/ void onOpen(const LLSD& key); private: - + enum EWizardState + { + CHOOSE_FILE = 0, + OPTIMIZE, + PHYSICS, + REVIEW, + UPLOAD + }; + + void setState(int state); + void setButtons(int state); + void onClickCancel(); + void onClickBack(); + void onClickNext(); + bool onEnableNext(); + bool onEnableBack(); + void loadModel(); + static void onPreviewLODCommit(LLUICtrl*,void*); + void onAccuracyPerformance(const LLSD& data); + static void onUpload(void* data); + LLModelPreview* mModelPreview; LLRect mPreviewRect; + int mState; + + + }; -/* -namespace LLFloaterDisplayNameUtil -{ - // Register with LLFloaterReg - void registerFloater(); -} -*/ #endif diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 8991c21518..dadda29416 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -128,6 +128,45 @@ static bool handleSetShaderChanged(const LLSD& newvalue) return true; } +static bool handleRenderPerfTestChanged(const LLSD& newvalue) +{ + bool status = !newvalue.asBoolean(); + if (!status) + { + gPipeline.clearRenderTypeMask(LLPipeline::RENDER_TYPE_WL_SKY, + LLPipeline::RENDER_TYPE_GROUND, + LLPipeline::RENDER_TYPE_TERRAIN, + LLPipeline::RENDER_TYPE_GRASS, + LLPipeline::RENDER_TYPE_TREE, + LLPipeline::RENDER_TYPE_WATER, + LLPipeline::RENDER_TYPE_PASS_GRASS, + LLPipeline::RENDER_TYPE_HUD, + LLPipeline::RENDER_TYPE_PARTICLES, + LLPipeline::RENDER_TYPE_CLOUDS, + LLPipeline::RENDER_TYPE_HUD_PARTICLES, + LLPipeline::END_RENDER_TYPES); + gPipeline.setRenderDebugFeatureControl(LLPipeline::RENDER_DEBUG_FEATURE_UI, false); + } + else + { + gPipeline.setRenderTypeMask(LLPipeline::RENDER_TYPE_WL_SKY, + LLPipeline::RENDER_TYPE_GROUND, + LLPipeline::RENDER_TYPE_TERRAIN, + LLPipeline::RENDER_TYPE_GRASS, + LLPipeline::RENDER_TYPE_TREE, + LLPipeline::RENDER_TYPE_WATER, + LLPipeline::RENDER_TYPE_PASS_GRASS, + LLPipeline::RENDER_TYPE_HUD, + LLPipeline::RENDER_TYPE_PARTICLES, + LLPipeline::RENDER_TYPE_CLOUDS, + LLPipeline::RENDER_TYPE_HUD_PARTICLES, + LLPipeline::END_RENDER_TYPES); + gPipeline.setRenderDebugFeatureControl(LLPipeline::RENDER_DEBUG_FEATURE_UI, true); + } + + return true; +} + bool handleRenderTransparentWaterChanged(const LLSD& newvalue) { LLWorld::getInstance()->updateWaterObjects(); @@ -565,6 +604,7 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderShadowDetail")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderDeferredSSAO")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderDeferredGI")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); + gSavedSettings.getControl("RenderPerformanceTest")->getSignal()->connect(boost::bind(&handleRenderPerfTestChanged, _2)); gSavedSettings.getControl("TextureMemory")->getSignal()->connect(boost::bind(&handleVideoMemoryChanged, _2)); gSavedSettings.getControl("AuditTexture")->getSignal()->connect(boost::bind(&handleAuditTextureChanged, _2)); gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&handleChatFontSizeChanged, _2)); diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml index 4a4b8075c8..18dc33a23a 100644 --- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml +++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml @@ -1,230 +1,602 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater - legacy_header_height="18" - layout="topleft" - name="Model Wizard" - help_topic="model_wizard" - bg_opaque_image_overlay="0.5 0.5 0.5 1" - height="450" - save_rect="true" - title="UPLOAD MODEL WIZARD" - width="530"> - <panel - height="600"> - <button - top="30" - left="410" - height="32" - name="upload" - enabled="false" - label="5. Upload" - border="false" - image_unselected="model_wizard/middle_button_off.png" - image_selected="model_wizard/middle_button_press.png" - image_hover_unselected="model_wizard/middle_button_over.png" - image_disabled="model_wizard/middle_button_disabled.png" - image_disabled_selected="model_wizard/middle_button_disabled.png" - width="110"/> - <button - top="30" - left="310" - height="32" - tab_stop="false" - name="review" - label="4. Review" - enabled="false" - border="false" - image_unselected="model_wizard/middle_button_off.png" - image_selected="model_wizard/middle_button_press.png" - image_hover_unselected="model_wizard/middle_button_over.png" - image_disabled="model_wizard/middle_button_disabled.png" - image_disabled_selected="model_wizard/middle_button_disabled.png" - width="110"/> - <button - top="30" - left="210" - height="32" - name="physics" - label="3. Physics" - tab_stop="false" - enabled="false" - border="false" - image_unselected="model_wizard/middle_button_off.png" - image_selected="model_wizard/middle_button_press.png" - image_hover_unselected="model_wizard/middle_button_over.png" - image_disabled="model_wizard/middle_button_disabled.png" - image_disabled_selected="model_wizard/middle_button_disabled.png" - width="110"/> - <button - top="30" - left="115" - name="optimize" - label="2. Optimize" - tab_stop="false" - height="32" - border="false" - image_unselected="model_wizard/middle_button_off.png" - image_selected="model_wizard/middle_button_press.png" - image_hover_unselected="model_wizard/middle_button_over.png" - image_disabled="model_wizard/middle_button_disabled.png" - image_disabled_selected="model_wizard/middle_button_disabled.png" - width="110"/> - <button - top="30" - left="15" - name="choose_file" - enabled="false" - label="1. Choose File" - height="32" - image_unselected="model_wizard/left_button_off.png" - image_selected="model_wizard/left_button_press.png" - image_hover_unselected="model_wizard/left_button_over.png" - image_disabled="model_wizard/left_button_disabled.png" - image_disabled_selected="model_wizard/left_button_disabled.png" - width="110"/> - <panel - top_pad="20" - height="20" - width="500" - bg_opaque_color="DkGray2" - background_visible="true" - background_opaque="true" - left="20"> - <text - width="200" - left="10" - top="2" - height="10" - font="SansSerifBig" - layout="topleft" - > - Upload Model - </text></panel> - <text - top_pad="14" - width="460" - height="20" - font="SansSerifSmall" - layout="topleft" - word_wrap="true" - left_delta="0"> - This wizard will help you import mesh models to Second Life. First specify a file containing the model you wish to import. Second Life supports COLLADA (.dae) files. - </text> - - <panel - top_delta="40" - left="15" - height="240" - width="500" - bg_opaque_color="DkGray2" - background_visible="true" - background_opaque="true"> - - <text - type="string" - length="1" - follows="left|top" - top="10" - height="10" - layout="topleft" - left_delta="10" - name="Cache location" - width="300"> - Filename: - </text> - <line_editor - border_style="line" - border_thickness="1" - follows="left|top" - font="SansSerifSmall" - height="20" - layout="topleft" - left_delta="0" - max_length="4096" - name="lod_file" - top_pad="5" - width="220" /> - <button - follows="left|top" - height="23" - label="Browse..." - label_selected="Browse..." - layout="topleft" - left_pad="10" - name="browse" - top_delta="-1" - width="75"> - </button> - <text - top_delta="-15" - width="200" - height="15" - font="SansSerifSmall" - layout="topleft" - left_pad="24"> - Model Preview: - </text> - - <!-- Placeholder panel for 3D preview render --> - - <panel - left_delta="-2" - top_pad="0" - name="preview_panel" - bevel_style="none" - border_style="line" - border="true" - height="150" - follows="all" - width="150"> - </panel> - <text - top_pad="10" - width="130" - height="15" - left="340" - word_wrap="true" - > - Dimensions (meters): - </text> - <text - top_pad="5" - width="150" - height="15" - name="import_dimensions" - left_delta="0"> - X: [X] | Y: [Y] | Z: [Z] - </text> - - <text - top="100" - width="320" - height="40" - left="10" - word_wrap="true" - > - Note: -Advanced users familiar with 3d content creation tools may prefer to use the Advanced Mesh Import window. - </text> - </panel> - <button - top="410" - right="-175" - width="80" - height="20" - label="<< Back" /> - <button - top="410" - right="-92" - width="80" - height="20" - label="Next >> " /> - <button - top="410" - right="-15" - width="70" - height="20" - label="Cancel" /> - </panel> - <spinner visible="false" left="10" height="20" follows="top|left" width="80" top_pad="-50" value="1.0" min_val="0.01" max_val="64.0" name="import_scale"/> -</floater> +<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ layout="topleft"
+ name="Model Wizard"
+ help_topic="model_wizard"
+ bg_opaque_image_overlay="0.5 0.5 0.5 1"
+ height="450"
+ save_rect="true"
+ title="UPLOAD MODEL WIZARD"
+ width="530">
+ <button
+ top="30"
+ tab_stop="false"
+ left="410"
+ height="32"
+ name="upload_btn"
+ enabled="false"
+ label="5. Upload"
+ border="false"
+ image_unselected="model_wizard/middle_button_off.png"
+ image_selected="model_wizard/middle_button_press.png"
+ image_hover_unselected="model_wizard/middle_button_over.png"
+ image_disabled="model_wizard/middle_button_disabled.png"
+ image_disabled_selected="model_wizard/middle_button_disabled.png"
+ width="110"/>
+ <button
+ top="30"
+ left="310"
+ height="32"
+ tab_stop="false"
+ name="review_btn"
+ label="4. Review"
+ enabled="false"
+ border="false"
+ image_unselected="model_wizard/middle_button_off.png"
+ image_selected="model_wizard/middle_button_press.png"
+ image_hover_unselected="model_wizard/middle_button_over.png"
+ image_disabled="model_wizard/middle_button_disabled.png"
+ image_disabled_selected="model_wizard/middle_button_disabled.png"
+ width="110"/>
+ <button
+ top="30"
+ left="210"
+ height="32"
+ name="physics_btn"
+ label="3. Physics"
+ tab_stop="false"
+ enabled="false"
+ border="false"
+ image_unselected="model_wizard/middle_button_off.png"
+ image_selected="model_wizard/middle_button_press.png"
+ image_hover_unselected="model_wizard/middle_button_over.png"
+ image_disabled="model_wizard/middle_button_disabled.png"
+ image_disabled_selected="model_wizard/middle_button_disabled.png"
+ width="110"/>
+ <button
+ top="30"
+ left="115"
+ name="optimize_btn"
+ label="2. Optimize"
+ tab_stop="false"
+ height="32"
+ border="false"
+ image_unselected="model_wizard/middle_button_off.png"
+ image_selected="model_wizard/middle_button_press.png"
+ image_hover_unselected="model_wizard/middle_button_over.png"
+ image_disabled="model_wizard/middle_button_disabled.png"
+ image_disabled_selected="model_wizard/middle_button_disabled.png"
+ width="110"/>
+ <button
+ top="30"
+ left="15"
+ name="choose_file_btn"
+ tab_stop="false"
+ enabled="false"
+ label="1. Choose File"
+ height="32"
+ image_unselected="model_wizard/left_button_off.png"
+ image_selected="model_wizard/left_button_press.png"
+ image_hover_unselected="model_wizard/left_button_over.png"
+ image_disabled="model_wizard/left_button_disabled.png"
+ image_disabled_selected="model_wizard/left_button_disabled.png"
+ width="110"/>
+ <panel
+ height="388"
+ top_pad="0"
+ name="choose_file_panel"
+ visible="true"
+ width="530"
+ left="0">
+ <panel
+ height="20"
+ top_pad="20"
+ width="500"
+ name="header_panel"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
+ left="20">
+ <text
+ width="200"
+ left="10"
+ top="2"
+ name="header_text"
+ height="10"
+ font="SansSerifBig"
+ layout="topleft">
+ Upload Model
+ </text>
+ </panel>
+ <text
+ top_pad="14"
+ width="460"
+ height="20"
+ name="description"
+ font="SansSerifSmall"
+ layout="topleft"
+ word_wrap="true"
+ left_delta="0">
+ This wizard will help you import mesh models to Second Life. First specify a file containing the model you wish to import. Second Life supports COLLADA (.dae) files.
+ </text>
+ <panel
+ top_delta="40"
+ left="15"
+ height="240"
+ width="500"
+ name="content"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true">
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ top="10"
+ height="10"
+ layout="topleft"
+ left_delta="10"
+ name="Cache location"
+ width="300">
+ Filename:
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top"
+ font="SansSerifSmall"
+ height="20"
+ layout="topleft"
+ left_delta="0"
+ max_length="4096"
+ name="lod_file"
+ top_pad="5"
+ width="220" />
+ <button
+ follows="left|top"
+ height="23"
+ label="Browse..."
+ label_selected="Browse..."
+ layout="topleft"
+ left_pad="10"
+ name="browse"
+ top_delta="-1"
+ width="75">
+ </button>
+ <text
+ top_delta="-15"
+ width="200"
+ height="15"
+ font="SansSerifSmall"
+ layout="topleft"
+ left_pad="24">
+ Model Preview:
+ </text>
+ <!-- Placeholder panel for 3D preview render -->
+ <panel
+ left_delta="-2"
+ top_pad="0"
+ name="preview_panel"
+ bevel_style="none"
+ border_style="line"
+ border="true"
+ height="150"
+ follows="all"
+ width="150">
+ </panel>
+ <text
+ top_pad="10"
+ width="130"
+ height="15"
+ left="340"
+ word_wrap="true">
+ Dimensions (meters):
+ </text>
+ <text
+ top_pad="5"
+ width="160"
+ height="15"
+ name="import_dimensions"
+ left_delta="0">
+ X: [X] | Y: [Y] | Z: [Z]
+ </text>
+ <text
+ top="100"
+ width="320"
+ height="40"
+ left="10"
+ word_wrap="true">
+ Note:
+ Advanced users familiar with 3d content creation tools may prefer to use the Advanced Mesh Import window.
+ </text>
+ <combo_box left_pad="0" top_delta="0" follows="left|top" list_position="below" height="18"
+ name="preview_lod_combo_2" width="90" tool_tip="LOD to view in preview render">
+ <combo_item name="high">
+ High
+ </combo_item>
+ <combo_item name="medium">
+ Medium
+ </combo_item>
+ <combo_item name="lowest">
+ Lowest
+ </combo_item>
+ <combo_item name="low">
+ Low
+ </combo_item>
+ </combo_box>
+ </panel>
+ </panel>
+
+
+ <panel
+ height="388"
+ top_delta="0"
+ name="optimize_panel"
+ visible="false"
+ width="530"
+ left="0">
+ <panel
+ height="20"
+ top_pad="20"
+ name="header_panel"
+ width="500"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
+ left="20">
+ <text
+ width="200"
+ left="10"
+ name="header_text"
+ top="2"
+ height="10"
+ font="SansSerifBig"
+ layout="topleft">
+ Optimize
+ </text>
+ </panel>
+ <text
+ top_pad="14"
+ width="460"
+ height="20"
+ font="SansSerifSmall"
+ layout="topleft"
+ name="description"
+ word_wrap="true"
+ left_delta="0">
+ This wizard is optimizing your model. This may take several minutes. To stop the process click the back button
+ </text>
+ <panel
+ top_delta="40"
+ visible="false"
+ left="15"
+ height="240"
+ width="500"
+ name="content"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true">
+ <text
+ top="20"
+ width="300"
+ height="12"
+ font="SansSerifBold"
+ left="112">Generating Level of Detail</text>
+ <progress_bar
+ name="optimize_progress_bar"
+ image_fill="model_wizard\progress_light.png"
+ color_bg="1 1 1 1"
+ color_bar="1 1 1 0.96"
+ follows="left|right|top"
+ width="260"
+ height="16"
+ image_bar="model_wizard\progress_bar_bg.png"
+ top_pad="14"
+ left="110"/>
+ <icon
+ top_pad="10"
+ left_delta="0"
+ width="13"
+ height="12"
+ image_name="model_wizard\check_mark.png"/>
+ <text
+ top_delta="0"
+ left_delta="18"
+ name="high_detail_text"
+ width="200"
+ height="14">Generate Level of Detail: High</text>
+ <icon
+ top_pad="10"
+ left_delta="-18"
+ width="13"
+ height="12"
+ image_name="model_wizard\check_mark.png"/>
+ <text
+ top_delta="0"
+ left_delta="18"
+ name="medium_detail_text"
+ width="200"
+ height="14">Generate Level of Detail: Medium</text>
+ <icon
+ top_pad="10"
+ left_delta="-18"
+ width="13"
+ height="12"
+ image_name="model_wizard\check_mark.png"/>
+ <text
+ top_delta="0"
+ left_delta="18"
+ name="low_detail_text"
+ width="200"
+ height="14">Generate Level of Detail: Low</text>
+ <icon
+ top_pad="10"
+ left_delta="-18"
+ width="13"
+ height="12"
+ image_name="model_wizard\check_mark.png"/>
+ <text
+ top_delta="0"
+ left_delta="18"
+ name="lowest_detail_text"
+ width="200"
+ height="14">Generate Level of Detail: Lowest</text>
+ </panel>
+ <panel
+ top_delta="0"
+ left_delta="0"
+ height="240"
+ width="500"
+ name="content2"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true">
+ <text top="10" left="10" width="85" follows="left|top" height="15" name="lod_label">
+ Model Preview:
+ </text>
+ <combo_box left_pad="5" top_delta="-2" follows="left|top" list_position="below" height="18"
+ name="preview_lod_combo" width="90" tool_tip="LOD to view in preview render">
+ <combo_item name="high">
+ High
+ </combo_item>
+ <combo_item name="medium">
+ Medium
+ </combo_item>
+ <combo_item name="lowest">
+ Lowest
+ </combo_item>
+ <combo_item name="low">
+ Low
+ </combo_item>
+ </combo_box>
+ <panel
+ left="10"
+ top_pad="5"
+ name="preview_panel"
+ bevel_style="none"
+ border_style="line"
+ border="true"
+ height="175"
+ follows="all"
+ width="175">
+ </panel>
+ <text top="50" left="210" font="SansSerifSmallBold" width="300" height="4">Performance Accuracy</text>
+
+ <slider
+ follows="left|top"
+ height="20"
+ increment="1"
+ layout="topleft"
+ left="220"
+ max_val="2"
+ initial_vauel="1"
+ min_val="0"
+ name="accuracy_slider"
+ show_text="false"
+ top="105"
+ width="250" />
+ <text font="SansSerifSmall" top_pad="4" width="300" left_delta="6" height="4">| | |</text>
+
+ </panel>
+ </panel>
+
+
+
+ <panel
+ height="388"
+ top_delta="0"
+ name="physics_panel"
+ visible="false"
+ width="530"
+ left="0">
+ <panel
+ height="20"
+ top_pad="20"
+ name="header_panel"
+ width="500"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
+ left="20">
+ <text
+ width="200"
+ left="10"
+ name="header_text"
+ top="2"
+ height="10"
+ font="SansSerifBig"
+ layout="topleft">
+ Physics
+ </text>
+ </panel>
+ <text
+ top_pad="14"
+ width="460"
+ height="20"
+ font="SansSerifSmall"
+ layout="topleft"
+ name="description"
+ word_wrap="true"
+ left_delta="0">
+ The wizard will create a physical shape, which determines how the object interacts with other objects and avatars. Set the slider to the detail level most appropriate for how your object will be used:
+ </text>
+ <panel
+ top_delta="40"
+ left="15"
+ height="240"
+ width="500"
+ name="content"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"/>
+ </panel>
+
+
+ <panel
+ height="388"
+ top_delta="0"
+ name="review_panel"
+ visible="false"
+ width="530"
+ left="0">
+ <panel
+ height="20"
+ top_pad="20"
+ name="header_panel"
+ width="500"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
+ left="20">
+ <text
+ width="200"
+ left="10"
+ name="header_text"
+ top="2"
+ height="10"
+ font="SansSerifBig"
+ layout="topleft">
+ Review
+ </text>
+ </panel>
+ <text
+ top_pad="14"
+ width="460"
+ height="20"
+ font="SansSerifSmall"
+ layout="topleft"
+ name="description"
+ word_wrap="true"
+ left_delta="0">
+ Review the details below then click. Upload to upload your model. Your L$ balance will be charged when you click Upload.
+ </text>
+ <panel
+ top_delta="40"
+ left="15"
+ height="240"
+ width="500"
+ name="content"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"/>
+ </panel>
+
+
+
+
+ <panel
+ height="388"
+ top_delta="0"
+ name="upload_panel"
+ visible="false"
+ width="530"
+ left="0">
+ <panel
+ height="20"
+ top_pad="20"
+ name="header_panel"
+ width="500"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
+ left="20">
+ <text
+ width="200"
+ left="10"
+ name="header_text"
+ top="2"
+ height="10"
+ font="SansSerifBig"
+ layout="topleft">
+ Upload Complete!
+ </text>
+ </panel>
+ <text
+ top_pad="14"
+ width="460"
+ height="20"
+ font="SansSerifSmall"
+ layout="topleft"
+ name="description"
+ word_wrap="true"
+ left_delta="0">
+ Congratulations! Your model has been sucessfully uploaded. You will find the model in the Objects folder in your inventory.
+ </text>
+ <panel
+ top_delta="40"
+ left="15"
+ height="240"
+ width="500"
+ name="content"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true">
+ <button top="10" follows="top|left" height="20" label="Upload"
+ left="15" width="80" name="ok_btn" tool_tip="Upload to simulator"/>
+ </panel>
+ </panel>
+
+
+
+ <button
+ top="410"
+ right="-245"
+ width="90"
+ height="20"
+ name="back"
+ label="<< Back" />
+ <button
+ top_delta="0"
+ right="-150"
+ width="90"
+ height="20"
+ name="next"
+ label="Next >> " />
+ <button
+ top_delta="0"
+ right="-15"
+ width="90"
+ height="20"
+ name="cancel"
+ label="Cancel" />
+ <spinner visible="false" left="10" height="20" follows="top|left" width="80" top_pad="-50" value="1.0" min_val="0.01" max_val="64.0" name="import_scale"/>
+
+ <string name="status_idle">Idle</string>
+ <string name="status_reading_file">Loading...</string>
+ <string name="status_generating_meshes">Generating Meshes...</string>
+ <string name="high">High</string>
+ <string name="medium">Medium</string>
+ <string name="low">Low</string>
+ <string name="lowest">Lowest</string>
+ <string name="mesh_status_good">Ship it!</string>
+ <string name="mesh_status_na">N/A</string>
+ <string name="mesh_status_none">None</string>
+ <string name="mesh_status_submesh_mismatch">Levels of detail have a different number of textureable faces.</string>
+ <string name="mesh_status_mesh_mismatch">Levels of detail have a different number of mesh instances.</string>
+ <string name="mesh_status_too_many_vertices">Level of detail has too many vertices.</string>
+ <string name="mesh_status_missing_lod">Missing required level of detail.</string>
+ <string name="layer_all">All</string>
+ <!-- Text to display in physics layer combo box for "all layers" -->
+
+</floater>
|