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