From fed4bc8c95082f041a4ddb9f58fe0505d8349f9e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 7 Sep 2010 13:58:02 -0500 Subject: Fix for physics properties not being received by the viewer. --- etc/message.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/etc/message.xml b/etc/message.xml index c17ae3656d..86d374ce14 100644 --- a/etc/message.xml +++ b/etc/message.xml @@ -572,6 +572,13 @@ false + ObjectPhysicsProperties + + flavor + llsd + trusted-sender + true + capBans -- cgit v1.2.3 From ac7ac2adec18ba3ba429a15fc3bf2750e92360e8 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 9 Sep 2010 16:55:54 -0500 Subject: GLOD update for windows, poke CMakeLists.txt to copy shared libs over if glod is touched. --- indra/newview/CMakeLists.txt | 3 +++ install.xml | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 304ef4bd59..73f752b218 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1469,6 +1469,9 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapriconv-1.dll + ${SHARED_LIB_STAGING_DIR}/Release/glod.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/glod.dll + ${SHARED_LIB_STAGING_DIR}/Debug/glod.dll ${SHARED_LIB_STAGING_DIR}/Release/openjpeg.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjpeg.dll ${SHARED_LIB_STAGING_DIR}/Debug/openjpegd.dll diff --git a/install.xml b/install.xml index ac4b7a0457..074147c027 100644 --- a/install.xml +++ b/install.xml @@ -70,9 +70,9 @@ windows md5sum - 39fae44d406aa56a0b3d00f5433bbf15 + 5f993f8092ddf4424ec3133dae9424dd url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/GLOD-1.0pre4-windows-20100129.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/glod-1.0pre4-windows-20100908a.tar.bz2 @@ -1011,9 +1011,9 @@ anguage Infrstructure (CLI) international standard windows md5sum - afd03c92ac261134237b648896c5e537 + a68bd49c01710edc4b9c902376844317 url - scp:install-packages.lindenlab.com:/local/www/install-packages/doc/llconvexdecomposition-0.1-windows-20100628.tar.bz2 + scp:install-packages.lindenlab.com:/local/www/install-packages/doc/llconvexdecomposition-0.1-windows-20100909.tar.bz2 linux -- cgit v1.2.3 From 5213c90637390af255ede8e71ea0b87cdf35b27d Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 9 Sep 2010 16:57:05 -0500 Subject: Enable minimal rebuild and incremental linking for RelWithDebInfo builds. --- indra/cmake/00-Common.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 893e485d1a..beb4f181b5 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -38,7 +38,7 @@ if (WINDOWS) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP" CACHE STRING "C++ compiler debug options" FORCE) set(CMAKE_CXX_FLAGS_RELWITHDEBINFO - "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP" + "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP /Gm /INCREMENTAL" CACHE STRING "C++ compiler release-with-debug options" FORCE) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP" -- cgit v1.2.3 From 4a0f245d3e3c7805aadb571388ceffcc0a7e6085 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 9 Sep 2010 16:57:23 -0500 Subject: Massage importer UI --- indra/newview/llfloatermodelpreview.cpp | 96 ++++++++++++++++------ .../skins/default/xui/en/floater_model_preview.xml | 3 +- 2 files changed, 71 insertions(+), 28 deletions(-) diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index b0cde6962b..a78d0075c2 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -269,8 +269,6 @@ BOOL LLFloaterModelPreview::postBuild() childSetCommitCallback("show edges", onShowEdgesCommit, this); childSetCommitCallback("auto fill", onAutoFillCommit, this); - childSetCommitCallback("explode", onExplodeCommit, this); - childSetTextArg("status", "[STATUS]", getString("status_idle")); for (S32 lod = 0; lod < LLModel::NUM_LODS; ++lod) @@ -535,7 +533,7 @@ void LLFloaterModelPreview::onShowEdgesCommit(LLUICtrl* ctrl, void* userdata) //static void LLFloaterModelPreview::onExplodeCommit(LLUICtrl* ctrl, void* userdata) { - LLFloaterModelPreview* fp = (LLFloaterModelPreview*) userdata; + LLFloaterModelPreview* fp = LLFloaterModelPreview::sInstance; fp->mModelPreview->refresh(); } @@ -778,7 +776,7 @@ void LLFloaterModelPreview::showDecompFloater() mDecompFloater = new LLPhysicsDecompFloater(key); S32 left = 20; - S32 right = 270; + S32 right = 320; S32 cur_y = 30; @@ -839,15 +837,19 @@ void LLFloaterModelPreview::showDecompFloater() continue; } + std::string name(param[i].mName ? param[i].mName : ""); + std::string description(param[i].mDescription ? param[i].mDescription : ""); + if (param[i].mType == LLCDParam::LLCD_FLOAT) { LLSliderCtrl::Params p; - p.name(param[i].mName); - p.label(param[i].mName); + p.name(name); + p.label(name); p.rect(LLRect(left, cur_y, right, cur_y-20)); p.min_value(param[i].mDetails.mRange.mLow.mFloat); p.max_value(param[i].mDetails.mRange.mHigh.mFloat); p.increment(param[i].mDetails.mRange.mDelta.mFloat); + p.tool_tip(description); p.decimal_digits(3); p.initial_value(param[i].mDefault.mFloat); LLSliderCtrl* slider = LLUICtrlFactory::create(p); @@ -858,12 +860,13 @@ void LLFloaterModelPreview::showDecompFloater() else if (param[i].mType == LLCDParam::LLCD_INTEGER) { LLSliderCtrl::Params p; - p.name(param[i].mName); - p.label(param[i].mName); + p.name(name); + p.label(name); p.rect(LLRect(left, cur_y, right, cur_y-20)); p.min_value(param[i].mDetails.mRange.mLow.mIntOrEnumValue); p.max_value(param[i].mDetails.mRange.mHigh.mIntOrEnumValue); p.increment(param[i].mDetails.mRange.mDelta.mIntOrEnumValue); + p.tool_tip(description); p.initial_value(param[i].mDefault.mIntOrEnumValue); LLSliderCtrl* slider = LLUICtrlFactory::create(p); slider->setCommitCallback(onPhysicsParamCommit, (void*) ¶m[i]); @@ -874,9 +877,10 @@ void LLFloaterModelPreview::showDecompFloater() { LLCheckBoxCtrl::Params p; p.rect(LLRect(left, cur_y, right, cur_y-20)); - p.name(param[i].mName); - p.label(param[i].mName); + p.name(name); + p.label(name); p.initial_value(param[i].mDefault.mBool); + p.tool_tip(description); LLCheckBoxCtrl* check_box = LLUICtrlFactory::create(p); check_box->setCommitCallback(onPhysicsParamCommit, (void*) ¶m[i]); mDecompFloater->addChild(check_box); @@ -884,24 +888,61 @@ void LLFloaterModelPreview::showDecompFloater() } else if (param[i].mType == LLCDParam::LLCD_ENUM) { - LLComboBox::Params p; - p.rect(LLRect(left, cur_y, right/3, cur_y-20)); - p.name(param[i].mName); - p.label(param[i].mName); - LLComboBox* combo_box = LLUICtrlFactory::create(p); - for (S32 k = 0; k < param[i].mDetails.mEnumValues.mNumEnums; ++k) - { - combo_box->add(param[i].mDetails.mEnumValues.mEnumsArray[k].mName, - LLSD::Integer(param[i].mDetails.mEnumValues.mEnumsArray[k].mValue)); + S32 cur_x = left; + + { //add label + LLTextBox::Params p; + const LLFontGL* font = (LLFontGL*) p.font(); + + p.rect(LLRect(left, cur_y, left+font->getWidth(name), cur_y-20)); + p.name(name); + p.label(name); + p.initial_value(name); + LLTextBox* text_box = LLUICtrlFactory::create(p); + mDecompFloater->addChild(text_box); + cur_x += text_box->getRect().getWidth(); + } + + { //add combo_box + LLComboBox::Params p; + p.rect(LLRect(cur_x, cur_y, right-right/4, cur_y-20)); + p.name(name); + p.label(name); + p.tool_tip(description); + + LLComboBox* combo_box = LLUICtrlFactory::create(p); + for (S32 k = 0; k < param[i].mDetails.mEnumValues.mNumEnums; ++k) + { + combo_box->add(param[i].mDetails.mEnumValues.mEnumsArray[k].mName, + LLSD::Integer(param[i].mDetails.mEnumValues.mEnumsArray[k].mValue)); + } + combo_box->setValue(param[i].mDefault.mIntOrEnumValue); + combo_box->setCommitCallback(onPhysicsParamCommit, (void*) ¶m[i]); + mDecompFloater->addChild(combo_box); + cur_y += 30; } - combo_box->setValue(param[i].mDefault.mIntOrEnumValue); - combo_box->setCommitCallback(onPhysicsParamCommit, (void*) ¶m[i]); - mDecompFloater->addChild(combo_box); - cur_y += 30; } } } + cur_y += 30; + //explode slider + { + LLSliderCtrl::Params p; + p.initial_value(0); + p.min_value(0); + p.max_value(1); + p.decimal_digits(2); + p.increment(0.05f); + p.label("Explode"); + p.name("explode"); + p.rect(LLRect(left, cur_y, right, cur_y-20)); + LLSliderCtrl* slider = LLUICtrlFactory::create(p); + + mDecompFloater->addChild(slider); + cur_y += 30; + } + //mesh render checkbox { LLCheckBoxCtrl::Params p; @@ -928,15 +969,16 @@ void LLFloaterModelPreview::showDecompFloater() LLTextBox::Params p; p.label("Model"); p.name("model label"); - p.rect(LLRect(right/3, cur_y, right/2, cur_y-20)); + p.rect(LLRect(right/2, cur_y, right-right/3, cur_y-20)); LLTextBox* text_box = LLUICtrlFactory::create(p); text_box->setValue("Model"); mDecompFloater->addChild(text_box); } + { //add submesh combo box LLComboBox::Params p; - p.rect(LLRect(right/2, cur_y, right, cur_y-20)); + p.rect(LLRect(right-right/2+p.font()->getWidth("Model"), cur_y, right, cur_y-20)); p.name("model"); LLComboBox* combo_box = LLUICtrlFactory::create(p); for (S32 i = 0; i < mModelPreview->mBaseModel.size(); ++i) @@ -956,6 +998,8 @@ void LLFloaterModelPreview::showDecompFloater() mDecompFloater->setRect(LLRect(10, cur_y+20, right+20, 10)); } + mDecompFloater->childSetCommitCallback("explode", LLFloaterModelPreview::onExplodeCommit, this); + mDecompFloater->openFloater(); } @@ -2922,7 +2966,7 @@ BOOL LLModelPreview::render() mFMP->childSetEnabled("consolidate", !avatar_preview); - F32 explode = mFMP->childGetValue("explode").asReal(); + F32 explode = mFMP->mDecompFloater ? mFMP->mDecompFloater->childGetValue("explode").asReal() : 0.f; glMatrixMode(GL_PROJECTION); gGL.popMatrix(); diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index 6508d2d68b..de9f3ee87e 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -44,8 +44,7 @@ - - + High LOD: Date: Thu, 9 Sep 2010 16:57:50 -0500 Subject: Better debug visualization for raycasting (trying to track down raycasting bugs). --- indra/newview/llspatialpartition.cpp | 126 ++++++++++++++++++++++------------- 1 file changed, 78 insertions(+), 48 deletions(-) diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 291cc76c29..425fa42339 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -3050,33 +3050,55 @@ public: center.set(vl->mBounds[0].getF32ptr()); size.set(vl->mBounds[1].getF32ptr()); - drawBoxOutline(center, size); + for (U32 i = 0; i < 2; i++) + { + LLGLDepthTest depth(GL_TRUE, GL_FALSE, i == 1 ? GL_LEQUAL : GL_GREATER); + + if (i == 1) + { + gGL.color4f(0,1,1,0.5f); + } + else + { + gGL.color4f(0,0.5f,0.5f, 0.25f); + } + + drawBoxOutline(center, size); + + gGL.begin(LLRender::TRIANGLES); + for (LLOctreeNode::const_element_iter iter = branch->getData().begin(); + iter != branch->getData().end(); + ++iter) + { + const LLVolumeTriangle* tri = *iter; + + gGL.vertex3fv(tri->mV[0]->getF32ptr()); + gGL.vertex3fv(tri->mV[1]->getF32ptr()); + gGL.vertex3fv(tri->mV[2]->getF32ptr()); + } + gGL.end(); + } } }; void renderRaycast(LLDrawable* drawablep) { - if (drawablep->getVObj() != gDebugRaycastObject) - { - return; - } - if (drawablep->getNumFaces()) { LLGLEnable blend(GL_BLEND); gGL.color4f(0,1,1,0.5f); - if (drawablep->getVOVolume() && gDebugRaycastFaceHit != -1) + if (drawablep->getVOVolume()) { - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - pushVerts(drawablep->getFace(gDebugRaycastFaceHit), LLVertexBuffer::MAP_VERTEX); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + //glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + //pushVerts(drawablep->getFace(gDebugRaycastFaceHit), LLVertexBuffer::MAP_VERTEX); + //glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); LLVOVolume* vobj = drawablep->getVOVolume(); LLVolume* volume = vobj->getVolume(); - if (volume && volume->getNumVolumeFaces() > gDebugRaycastFaceHit) + for (S32 i = 0; i < volume->getNumVolumeFaces(); ++i) { - const LLVolumeFace& face = volume->getVolumeFace(gDebugRaycastFaceHit); + const LLVolumeFace& face = volume->getVolumeFace(i); if (!face.mOctree) { ((LLVolumeFace*) &face)->createOctree(); @@ -3089,50 +3111,58 @@ void renderRaycast(LLDrawable* drawablep) end = vobj->agentPositionToVolume(gDebugRaycastEnd); LLRenderOctreeRaycast render(start, end); + gGL.flush(); + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); render.traverse(face.mOctree); gGL.popMatrix(); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); } } else if (drawablep->isAvatar()) { - LLGLDepthTest depth(GL_FALSE); - LLVOAvatar* av = (LLVOAvatar*) drawablep->getVObj().get(); - av->renderCollisionVolumes(); - } - - // draw intersection point - glPushMatrix(); - glLoadMatrixd(gGLModelView); - LLVector3 translate = gDebugRaycastIntersection; - glTranslatef(translate.mV[0], translate.mV[1], translate.mV[2]); - LLCoordFrame orient; - orient.lookDir(gDebugRaycastNormal, gDebugRaycastBinormal); - LLMatrix4 rotation; - orient.getRotMatrixToParent(rotation); - glMultMatrixf((float*)rotation.mMatrix); - - gGL.color4f(1,0,0,0.5f); - drawBox(LLVector3(0, 0, 0), LLVector3(0.1f, 0.022f, 0.022f)); - gGL.color4f(0,1,0,0.5f); - drawBox(LLVector3(0, 0, 0), LLVector3(0.021f, 0.1f, 0.021f)); - gGL.color4f(0,0,1,0.5f); - drawBox(LLVector3(0, 0, 0), LLVector3(0.02f, 0.02f, 0.1f)); - glPopMatrix(); - - // draw bounding box of prim - const LLVector4a* ext = drawablep->getSpatialExtents(); - - LLVector4a pos; - pos.setAdd(ext[0], ext[1]); - pos.mul(0.5f); - LLVector4a size; - size.setSub(ext[1], ext[0]); - size.mul(0.5f); + if (drawablep->getVObj() == gDebugRaycastObject) + { + LLGLDepthTest depth(GL_FALSE); + LLVOAvatar* av = (LLVOAvatar*) drawablep->getVObj().get(); + av->renderCollisionVolumes(); + } + } - LLGLDepthTest depth(GL_FALSE, GL_TRUE); - gGL.color4f(0,0.5f,0.5f,1); - drawBoxOutline(pos, size); + if (drawablep->getVObj() == gDebugRaycastObject) + { + // draw intersection point + glPushMatrix(); + glLoadMatrixd(gGLModelView); + LLVector3 translate = gDebugRaycastIntersection; + glTranslatef(translate.mV[0], translate.mV[1], translate.mV[2]); + LLCoordFrame orient; + orient.lookDir(gDebugRaycastNormal, gDebugRaycastBinormal); + LLMatrix4 rotation; + orient.getRotMatrixToParent(rotation); + glMultMatrixf((float*)rotation.mMatrix); + + gGL.color4f(1,0,0,0.5f); + drawBox(LLVector3(0, 0, 0), LLVector3(0.1f, 0.022f, 0.022f)); + gGL.color4f(0,1,0,0.5f); + drawBox(LLVector3(0, 0, 0), LLVector3(0.021f, 0.1f, 0.021f)); + gGL.color4f(0,0,1,0.5f); + drawBox(LLVector3(0, 0, 0), LLVector3(0.02f, 0.02f, 0.1f)); + glPopMatrix(); + + // draw bounding box of prim + const LLVector4a* ext = drawablep->getSpatialExtents(); + + LLVector4a pos; + pos.setAdd(ext[0], ext[1]); + pos.mul(0.5f); + LLVector4a size; + size.setSub(ext[1], ext[0]); + size.mul(0.5f); + LLGLDepthTest depth(GL_FALSE, GL_TRUE); + gGL.color4f(0,0.5f,0.5f,1); + drawBoxOutline(pos, size); + } } } -- cgit v1.2.3