Model optimization
This commit is contained in:
1 parent
be6a8cca9e
commit
d24748df1e
5 files changed
+244
-10
No files matched your search
@@ -138,7 +138,10 @@ namespace ZL {
|
||||
|
||||
// Load mesh
|
||||
try {
|
||||
gameObj.mesh.data = LoadFromTextFile02(objData.meshPath, zipPath);
|
||||
if (objData.meshPath.size() > 4 && objData.meshPath.compare(objData.meshPath.size() - 4, 4, ".bin") == 0)
|
||||
gameObj.mesh.data = LoadModelFromBinFile(objData.meshPath, zipPath);
|
||||
else
|
||||
gameObj.mesh.data = LoadFromTextFile02(objData.meshPath, zipPath);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
std::cerr << "GameObjectLoader: Failed to load mesh for '" << objData.name << "': " << e.what() << std::endl;
|
||||
@@ -211,7 +214,10 @@ namespace ZL {
|
||||
|
||||
// Load mesh
|
||||
try {
|
||||
intObj.mesh.data = LoadFromTextFile02(objData.meshPath, zipPath);
|
||||
if (objData.meshPath.size() > 4 && objData.meshPath.compare(objData.meshPath.size() - 4, 4, ".bin") == 0)
|
||||
intObj.mesh.data = LoadModelFromBinFile(objData.meshPath, zipPath);
|
||||
else
|
||||
intObj.mesh.data = LoadFromTextFile02(objData.meshPath, zipPath);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
std::cerr << "GameObjectLoader: Failed to load mesh for interactive '" << objData.name << "': " << e.what() << std::endl;
|
||||
|
||||
Reference in new issue
Block a user