diff --git a/indra/llmath/llmatrix3a.inl b/indra/llmath/llmatrix3a.inl index 37819fea3cfec1fcd1c94c91efb81f815ee84a03..270f1e905b13f131936079c50db15a7f7d0bc224 100644 --- a/indra/llmath/llmatrix3a.inl +++ b/indra/llmath/llmatrix3a.inl @@ -66,7 +66,6 @@ inline void LLMatrix3a::setTranspose(const LLMatrix3a& src) inline const LLVector4a& LLMatrix3a::getColumn(const U32 column) const { - llassert( column < 3 ); return mColumns[column]; } diff --git a/indra/llmath/m3math.h b/indra/llmath/m3math.h index 2be5452f8dc05b66fc0a0d41472d3f81c8e9d4f7..3970a5de31166e09008795103bf22f11939138ca 100644 --- a/indra/llmath/m3math.h +++ b/indra/llmath/m3math.h @@ -27,7 +27,7 @@ #ifndef LL_M3MATH_H #define LL_M3MATH_H -#include "llerror.h" +//#include "llerror.h" #include "stdtypes.h" class LLVector4; diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h index 56cb2ae73e57be7f0cdce9c1065479a965819cf6..4e77d9e5ff686e9128a4789200079ac0ee81392f 100644 --- a/indra/llmath/v3color.h +++ b/indra/llmath/v3color.h @@ -30,7 +30,7 @@ class LLColor4; class LLVector4; -#include "llerror.h" +//#include "llerror.h" #include "llmath.h" #include "llsd.h" diff --git a/indra/llmath/v3dmath.h b/indra/llmath/v3dmath.h index 578dcdc8ea5e1d85d425cc6947668b0e530b7a66..fba549a3b7206013f84d2596ac3c8f1df6ff1f3c 100644 --- a/indra/llmath/v3dmath.h +++ b/indra/llmath/v3dmath.h @@ -27,7 +27,7 @@ #ifndef LL_V3DMATH_H #define LL_V3DMATH_H -#include "llerror.h" +//#include "llerror.h" #include "v3math.h" class LLVector3d diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h index 0432aeba4cca1a9bba7cfb77ce16d7042aa6bc51..206a99b567333738c37a67449e16d29d9dfc935b 100644 --- a/indra/llmath/v3math.h +++ b/indra/llmath/v3math.h @@ -27,7 +27,7 @@ #ifndef LL_V3MATH_H #define LL_V3MATH_H -#include "llerror.h" +//#include "llerror.h" #include "llmath.h" #include "llsd.h" diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h index b047f86e6ef0c9fbcefaa3a7dfd3b4aec33ef402..6946b570abb7c72e90db7ecc83b218c6eb465a3e 100644 --- a/indra/llmath/v4color.h +++ b/indra/llmath/v4color.h @@ -27,7 +27,7 @@ #ifndef LL_V4COLOR_H #define LL_V4COLOR_H -#include "llerror.h" +//#include "llerror.h" //#include "vmath.h" #include "llmath.h" #include "llsd.h" diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h index 623c8b200353bb60bd5f052213a2b3a8f86cc7e8..f999e0533e1c78d43c40970a99a5f1e97ce3702b 100644 --- a/indra/llmath/v4math.h +++ b/indra/llmath/v4math.h @@ -27,7 +27,7 @@ #ifndef LL_V4MATH_H #define LL_V4MATH_H -#include "llerror.h" +//#include "llerror.h" #include "llmath.h" #include "v3math.h" diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index d736133f3ffc14ba21ec732be273c5338bcf0e76..5b2fcf422c81748f16e5a7d19cd74d7b95e98585 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -33,7 +33,7 @@ #include <boost/unordered_map.hpp> #include <list> -#include "llerror.h" +//#include "llerror.h" #include "v4color.h" #include "llstring.h" #include "stdtypes.h" diff --git a/indra/llrender/llrendersegment.cpp b/indra/llrender/llrendersegment.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8f856f62f301129fab1860d5e1614917366529ce --- /dev/null +++ b/indra/llrender/llrendersegment.cpp @@ -0,0 +1,54 @@ +/** + * @file llrendersegment.cpp + * @brief + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +// Sphere creates a set of display lists that can then be called to create +// a lit sphere at different LOD levels. You only need one instance of sphere +// per viewer - then call the appropriate list. + +#include "linden_common.h" +#include "llrendersegment.h" +#include "llerror.h" +#include "llglheaders.h" + +LLRenderSegment gSegment; +//============================================================================= +void LLRenderSegment::renderSegment( const LLVector3& start, const LLVector3& end, int color ) +{ + LLColor4 colorA = LLColor4::yellow; + + gGL.color4fv( colorA.mV ); + + gGL.begin(LLRender::LINES); + { + gGL.vertex3fv( start.mV ); + + gGL.vertex3fv( end.mV ); + } + + gGL.end(); + +} +//============================================================================= \ No newline at end of file diff --git a/indra/llrender/llrendersegment.h b/indra/llrender/llrendersegment.h new file mode 100644 index 0000000000000000000000000000000000000000..d929d6f628d233f9b5696332bec11e064d0f4464 --- /dev/null +++ b/indra/llrender/llrendersegment.h @@ -0,0 +1,49 @@ +/** + * @file llrendersegment.h + * @brief + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLRENDERSEGMENT_H +#define LL_LLRENDERSEGMENT_H + +#include "llmath.h" +#include "v3math.h" +#include "v4math.h" +#include "m3math.h" +#include "m4math.h" +#include "v4color.h" +#include "llgl.h" + + +class LLRenderSegment +{ +public: + void renderSegment( const LLVector3& start, const LLVector3& end, int color ); + +private: +}; + +extern LLRenderSegment gSegment; + +#endif diff --git a/indra/newview/llnavmeshstation.cpp b/indra/newview/llnavmeshstation.cpp index 3a29730328600e3c805730997acdabbd1b8b6452..6f491c34c9bae37c56ee5012bc7c4ea01b9cce03 100644 --- a/indra/newview/llnavmeshstation.cpp +++ b/indra/newview/llnavmeshstation.cpp @@ -30,6 +30,7 @@ #include "LLPathingLib.h"//prep# fixme #include "llagent.h" #include "llviewerregion.h" +#include "llsdutil.h" //=============================================================================== LLNavMeshStation::LLNavMeshStation() { @@ -111,7 +112,17 @@ class LLNavMeshDownloadResponder : public LLCurl::Responder if ( pObserver ) { llinfos<<"Do something immensely important w/content"<<llendl; - LLPathingLib::getInstance()->extractNavMeshSrcFromLLSD( content ); + llinfos<<"LLsd buffer"<<ll_pretty_print_sd(content)<<llendl; + + if ( content.has("navmesh_data") ) + { + LLSD::Binary& stuff = content["navmesh_data"].asBinary(); + LLPathingLib::getInstance()->extractNavMeshSrcFromLLSD( stuff ); + } + else + { + llwarns<<"no mesh data "<<llendl; + } } } } @@ -152,30 +163,16 @@ bool LLNavMeshStation::postNavMeshToServer( LLSD& data, const LLHandle<LLNavMesh //=============================================================================== void LLNavMeshStation::downloadNavMeshSrc( const LLHandle<LLNavMeshDownloadObserver>& observerHandle ) { - mCurlRequest = new LLCurlRequest(); - if ( mNavMeshDownloadURL.empty() ) { llinfos << "Unable to upload navmesh because of missing URL" << llendl; } else - { - LLCurlRequest::headers_t headers; + { LLSD data; data["agent_id"] = gAgent.getID(); data["region_id"] = gAgent.getRegion()->getRegionID(); - mCurlRequest->post( mNavMeshDownloadURL, headers, data, - new LLNavMeshDownloadResponder( observerHandle ) ); - do - { - mCurlRequest->process(); - //sleep for 10ms to prevent eating a whole core - apr_sleep(10000); - } while ( mCurlRequest->getQueued() > 0 ); + LLHTTPClient::post(mNavMeshDownloadURL, data, new LLNavMeshDownloadResponder( observerHandle ) ); } - - delete mCurlRequest; - - mCurlRequest = NULL; } //=============================================================================== \ No newline at end of file diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 6c2b71dd0a0c539b1bb3755808dd3018f1389ad2..529ca9f0227bfe95c977003f575657e78a152f51 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -48,6 +48,8 @@ #include "llvolumemgr.h" #include "lltextureatlas.h" #include "llglslshader.h" +#include "llrendersegment.h" +#include "llagent.h" static LLFastTimer::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling"); static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); @@ -3992,6 +3994,12 @@ class LLOctreeRenderNonOccluded : public LLOctreeTraveler<LLDrawable> { renderAgentTarget(avatar); } + + //prep# + //LLVector3 pos = gAgent.getPositionGlobal(); + //LLVector3d vel = gAgent.getVelocity(); + //gSegment.renderSegment( pos, pos+vel, 0 ); + if (gDebugGL) { diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 5a496c76f0c4d967f712ecd83bc94606a66732ab..2c826788a204414f2d4a1c0b1ec8c977470b31e1 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -145,8 +145,15 @@ class LLPathingTools : public view_listener_t, LLNavMeshDownloadObserver bool handleEvent(const LLSD& userdata) { //make sure we have a pathing system - LLPathingLib::initSystem(); - + if ( !LLPathingLib::getInstance() ) + { + LLPathingLib::initSystem(); + } + //prep# test remove + //LLSD content; + //LLPathingLib::getInstance()->extractNavMeshSrcFromLLSD( content ); + //return true; + //prep# end test if ( LLPathingLib::getInstance() == NULL ) { llinfos<<"No implementation of pathing library."<<llendl; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index a50f66f2829d46690f2475c5a562f0d8a3ec224c..f797822d41c9dd0f4380139adb22943412b7282a 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -104,7 +104,8 @@ #include "lltoolpie.h" #include "llcurl.h" #include "llnotifications.h" - +//prep# +#include "LLPathingLib.h" void check_stack_depth(S32 stack_depth) { @@ -3785,6 +3786,12 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) LLVertexBuffer::unbind(); + //prep# + if ( LLPathingLib::getInstance() ) + { + LLPathingLib::getInstance()->renderNavMesh(); + } + if (!LLPipeline::sReflectionRender && !LLPipeline::sRenderDeferred) { if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))