Add additional performance tweaks already integrated in LL's develop branch
parent
eb87f8b4e9
commit
7e87933db3
|
|
@ -156,7 +156,7 @@ public:
|
|||
public:
|
||||
typedef std::vector<LLAvatarJoint*> avatar_joint_list_t;
|
||||
const avatar_joint_list_t& getSkeleton() { return mSkeleton; }
|
||||
typedef std::map<std::string, std::string> joint_alias_map_t;
|
||||
typedef std::map<std::string, std::string, std::less<>> joint_alias_map_t;
|
||||
const joint_alias_map_t& getJointAliases();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ LLQuaternion::Order bvhStringToOrder( char *str )
|
|||
// LLBVHLoader()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string>& joint_alias_map )
|
||||
LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string, std::less<>>& joint_alias_map )
|
||||
{
|
||||
reset();
|
||||
errorLine = 0;
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ class LLBVHLoader
|
|||
friend class LLKeyframeMotion;
|
||||
public:
|
||||
// Constructor
|
||||
LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string>& joint_alias_map );
|
||||
LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string, std::less<>>& joint_alias_map );
|
||||
~LLBVHLoader();
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -917,7 +917,7 @@ LLDAELoader::LLDAELoader(
|
|||
void* opaque_userdata,
|
||||
JointTransformMap& jointTransformMap,
|
||||
JointNameSet& jointsFromNodes,
|
||||
std::map<std::string, std::string>& jointAliasMap,
|
||||
std::map<std::string, std::string, std::less<>>& jointAliasMap,
|
||||
U32 maxJointsPerMesh,
|
||||
U32 modelLimit,
|
||||
// <FS:Beq> mesh loader suffix configuration
|
||||
|
|
|
|||
|
|
@ -49,22 +49,22 @@ public:
|
|||
dae_model_map mModelsMap;
|
||||
|
||||
LLDAELoader(
|
||||
std::string filename,
|
||||
S32 lod,
|
||||
LLModelLoader::load_callback_t load_cb,
|
||||
LLModelLoader::joint_lookup_func_t joint_lookup_func,
|
||||
LLModelLoader::texture_load_func_t texture_load_func,
|
||||
LLModelLoader::state_callback_t state_cb,
|
||||
void* opaque_userdata,
|
||||
JointTransformMap& jointTransformMap,
|
||||
JointNameSet& jointsFromNodes,
|
||||
std::map<std::string, std::string>& jointAliasMap,
|
||||
U32 maxJointsPerMesh,
|
||||
U32 modelLimit,
|
||||
std::string filename,
|
||||
S32 lod,
|
||||
LLModelLoader::load_callback_t load_cb,
|
||||
LLModelLoader::joint_lookup_func_t joint_lookup_func,
|
||||
LLModelLoader::texture_load_func_t texture_load_func,
|
||||
LLModelLoader::state_callback_t state_cb,
|
||||
void* opaque_userdata,
|
||||
JointTransformMap& jointTransformMap,
|
||||
JointNameSet& jointsFromNodes,
|
||||
std::map<std::string, std::string, std::less<>>& jointAliasMap,
|
||||
U32 maxJointsPerMesh,
|
||||
U32 modelLimit,
|
||||
// <FS:Beq> configrable lod suffix support
|
||||
// bool preprocess);
|
||||
bool preprocess,
|
||||
const LODSuffixArray& lod_suffix);
|
||||
// bool preprocess);
|
||||
bool preprocess,
|
||||
const LODSuffixArray& lod_suffix);
|
||||
// </FS:Beq>
|
||||
virtual ~LLDAELoader() ;
|
||||
|
||||
|
|
|
|||
|
|
@ -66,19 +66,19 @@ static const std::string lod_suffix[LLModel::NUM_LODS] =
|
|||
};
|
||||
|
||||
|
||||
LLGLTFLoader::LLGLTFLoader(std::string filename,
|
||||
S32 lod,
|
||||
LLModelLoader::load_callback_t load_cb,
|
||||
LLModelLoader::joint_lookup_func_t joint_lookup_func,
|
||||
LLModelLoader::texture_load_func_t texture_load_func,
|
||||
LLModelLoader::state_callback_t state_cb,
|
||||
void * opaque_userdata,
|
||||
JointTransformMap & jointTransformMap,
|
||||
JointNameSet & jointsFromNodes,
|
||||
std::map<std::string, std::string> &jointAliasMap,
|
||||
U32 maxJointsPerMesh,
|
||||
U32 modelLimit) //,
|
||||
//bool preprocess)
|
||||
LLGLTFLoader::LLGLTFLoader(std::string filename,
|
||||
S32 lod,
|
||||
LLModelLoader::load_callback_t load_cb,
|
||||
LLModelLoader::joint_lookup_func_t joint_lookup_func,
|
||||
LLModelLoader::texture_load_func_t texture_load_func,
|
||||
LLModelLoader::state_callback_t state_cb,
|
||||
void * opaque_userdata,
|
||||
JointTransformMap & jointTransformMap,
|
||||
JointNameSet & jointsFromNodes,
|
||||
std::map<std::string, std::string, std::less<>> & jointAliasMap,
|
||||
U32 maxJointsPerMesh,
|
||||
U32 modelLimit) //,
|
||||
//bool preprocess)
|
||||
: LLModelLoader( filename,
|
||||
lod,
|
||||
load_cb,
|
||||
|
|
|
|||
|
|
@ -121,18 +121,18 @@ class LLGLTFLoader : public LLModelLoader
|
|||
typedef std::map<std::string, LLImportMaterial> material_map;
|
||||
|
||||
LLGLTFLoader(std::string filename,
|
||||
S32 lod,
|
||||
LLModelLoader::load_callback_t load_cb,
|
||||
LLModelLoader::joint_lookup_func_t joint_lookup_func,
|
||||
LLModelLoader::texture_load_func_t texture_load_func,
|
||||
LLModelLoader::state_callback_t state_cb,
|
||||
void * opaque_userdata,
|
||||
JointTransformMap & jointTransformMap,
|
||||
JointNameSet & jointsFromNodes,
|
||||
std::map<std::string, std::string> &jointAliasMap,
|
||||
U32 maxJointsPerMesh,
|
||||
U32 modelLimit); //,
|
||||
//bool preprocess );
|
||||
S32 lod,
|
||||
LLModelLoader::load_callback_t load_cb,
|
||||
LLModelLoader::joint_lookup_func_t joint_lookup_func,
|
||||
LLModelLoader::texture_load_func_t texture_load_func,
|
||||
LLModelLoader::state_callback_t state_cb,
|
||||
void * opaque_userdata,
|
||||
JointTransformMap & jointTransformMap,
|
||||
JointNameSet & jointsFromNodes,
|
||||
std::map<std::string, std::string,std::less<>> &jointAliasMap,
|
||||
U32 maxJointsPerMesh,
|
||||
U32 modelLimit); //,
|
||||
//bool preprocess );
|
||||
virtual ~LLGLTFLoader();
|
||||
|
||||
virtual bool OpenFile(const std::string &filename);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class LLJoint;
|
|||
|
||||
typedef std::map<std::string, LLMatrix4> JointTransformMap;
|
||||
typedef std::map<std::string, LLMatrix4>::iterator JointTransformMapIt;
|
||||
typedef std::map<std::string, std::string> JointMap;
|
||||
typedef std::map<std::string, std::string, std::less<>> JointMap;
|
||||
typedef std::deque<std::string> JointNameSet;
|
||||
|
||||
const S32 SLM_SUPPORTED_VERSION = 3;
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ void LLFloaterBvhPreview::setAnimCallbacks()
|
|||
getChild<LLUICtrl>("ease_out_time")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateEaseOut, this, _1));
|
||||
}
|
||||
|
||||
std::map <std::string, std::string> LLFloaterBvhPreview::getJointAliases()
|
||||
std::map <std::string, std::string, std::less<>> LLFloaterBvhPreview::getJointAliases()
|
||||
{
|
||||
LLPointer<LLVOAvatar> av = (LLVOAvatar*)mAnimPreview->getDummyAvatar();
|
||||
return av->getJointAliases();
|
||||
|
|
@ -337,7 +337,7 @@ bool LLFloaterBvhPreview::loadBVH()
|
|||
ELoadStatus load_status = E_ST_OK;
|
||||
S32 line_number = 0;
|
||||
|
||||
std::map<std::string, std::string> joint_alias_map = getJointAliases();
|
||||
auto joint_alias_map = getJointAliases();
|
||||
|
||||
loaderp = new LLBVHLoader(file_buffer, load_status, line_number, joint_alias_map);
|
||||
std::string status = getString(STATUS[load_status]);
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public:
|
|||
// </FS:Sei>
|
||||
private:
|
||||
void setAnimCallbacks() ;
|
||||
std::map <std::string, std::string> getJointAliases();
|
||||
std::map <std::string, std::string, std::less<>> getJointAliases();
|
||||
|
||||
// <FS> Reload animation from disk
|
||||
bool loadBVH();
|
||||
|
|
|
|||
|
|
@ -1671,7 +1671,7 @@ void LLFloaterModelPreview::updateAvatarTab(bool highlight_overrides)
|
|||
{
|
||||
// Populate table
|
||||
|
||||
std::map<std::string, std::string> joint_alias_map;
|
||||
std::map<std::string, std::string, std::less<>> joint_alias_map;
|
||||
mModelPreview->getJointAliases(joint_alias_map);
|
||||
|
||||
S32 conflicts = 0;
|
||||
|
|
|
|||
|
|
@ -1020,7 +1020,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
|
|||
clearGLODGroup();
|
||||
}
|
||||
// </FS:Beq>
|
||||
std::map<std::string, std::string> joint_alias_map;
|
||||
std::map<std::string, std::string, std::less<>> joint_alias_map;
|
||||
getJointAliases(joint_alias_map);
|
||||
|
||||
LLHandle<LLModelPreview> preview_handle = getHandle();
|
||||
|
|
|
|||
|
|
@ -471,7 +471,7 @@ bool LLLocalMeshImportDAE::processObject(domMesh* current_mesh, LLLocalMeshObjec
|
|||
}
|
||||
|
||||
// Function to load the JointMap
|
||||
JointMap loadJointMap()
|
||||
static JointMap loadJointMap()
|
||||
{
|
||||
JointMap joint_map = gAgentAvatarp->getJointAliases();
|
||||
|
||||
|
|
@ -483,7 +483,7 @@ JointMap loadJointMap()
|
|||
extra_names.insert(extra_names.end(), more_extra_names.begin(), more_extra_names.end());
|
||||
|
||||
// add the extras to jointmap
|
||||
for (auto extra_name : extra_names)
|
||||
for (const auto& extra_name : extra_names)
|
||||
{
|
||||
joint_map[extra_name] = extra_name;
|
||||
}
|
||||
|
|
@ -1067,7 +1067,7 @@ bool LLLocalMeshImportDAE::processSkin(daeDatabase* collada_db, daeElement* coll
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLLocalMeshImportDAE::processSkeletonJoint(domNode* current_node, std::map<std::string, std::string>& joint_map, std::map<std::string, LLMatrix4>& joint_transforms, bool recurse_children)
|
||||
bool LLLocalMeshImportDAE::processSkeletonJoint(domNode* current_node, std::map<std::string, std::string, std::less<>>& joint_map, std::map<std::string, LLMatrix4>& joint_transforms, bool recurse_children)
|
||||
{
|
||||
// safety checks & name check
|
||||
const auto node_name = current_node->getName();
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public:
|
|||
loadFile_return loadFile(LLLocalMeshFile* data, LLLocalMeshFileLOD lod);
|
||||
bool processObject(domMesh* current_mesh, LLLocalMeshObject* current_object);
|
||||
bool processSkin(daeDatabase* collada_db, daeElement* collada_document_root, domMesh* current_mesh, domSkin* current_skin, std::unique_ptr<LLLocalMeshObject>& current_object);
|
||||
bool processSkeletonJoint(domNode* current_node, std::map<std::string, std::string>& joint_map, std::map<std::string, LLMatrix4>& joint_transforms, bool recurse_children=false);
|
||||
bool processSkeletonJoint(domNode* current_node, std::map<std::string, std::string, std::less<>>& joint_map, std::map<std::string, LLMatrix4>& joint_transforms, bool recurse_children=false);
|
||||
|
||||
bool readMesh_CommonElements(const domInputLocalOffset_Array& inputs,
|
||||
int& offset_position, int& offset_normals, int& offset_uvmap, int& index_stride,
|
||||
|
|
|
|||
Loading…
Reference in New Issue