mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
update assimp lib
This commit is contained in:
parent
03a348deb7
commit
d3f8fee74e
1725 changed files with 196314 additions and 62009 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -58,11 +58,12 @@ public:
|
|||
~ConsoleProgressHandler() override = default;
|
||||
|
||||
bool Update(float percentage) override {
|
||||
std::cout << percentage * 100.0f << " %\n";
|
||||
std::cout << "\r" << percentage * 100.0f << " %";
|
||||
return true;
|
||||
}
|
||||
};
|
||||
const char* AICMD_MSG_ABOUT =
|
||||
|
||||
constexpr char AICMD_MSG_ABOUT[] =
|
||||
"------------------------------------------------------ \n"
|
||||
"Open Asset Import Library (\"Assimp\", https://github.com/assimp/assimp) \n"
|
||||
" -- Commandline toolchain --\n"
|
||||
|
|
@ -70,7 +71,7 @@ const char* AICMD_MSG_ABOUT =
|
|||
|
||||
"Version %i.%i %s%s%s%s%s(GIT commit %x)\n\n";
|
||||
|
||||
const char* AICMD_MSG_HELP =
|
||||
constexpr char AICMD_MSG_HELP[] =
|
||||
"assimp <verb> <parameters>\n\n"
|
||||
" verbs:\n"
|
||||
" \tinfo - Quick file stats\n"
|
||||
|
|
@ -96,8 +97,7 @@ const char* AICMD_MSG_HELP =
|
|||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Application entry point
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
int main (int argc, char* argv[]) {
|
||||
if (argc <= 1) {
|
||||
printf("assimp: No command specified. Use \'assimp help\' for a detailed command list\n");
|
||||
return AssimpCmdError::Success;
|
||||
|
|
@ -291,7 +291,7 @@ const aiScene* ImportModel(
|
|||
// Now validate this flag combination
|
||||
if(!globalImporter->ValidateFlags(imp.ppFlags)) {
|
||||
printf("ERROR: Unsupported post-processing flags \n");
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
printf("Validating postprocessing flags ... OK\n");
|
||||
if (imp.showLog) {
|
||||
|
|
@ -303,7 +303,7 @@ const aiScene* ImportModel(
|
|||
const clock_t first = clock();
|
||||
ConsoleProgressHandler *ph = new ConsoleProgressHandler;
|
||||
globalImporter->SetProgressHandler(ph);
|
||||
|
||||
|
||||
const aiScene* scene = globalImporter->ReadFile(path,imp.ppFlags);
|
||||
|
||||
if (imp.showLog) {
|
||||
|
|
@ -311,7 +311,7 @@ const aiScene* ImportModel(
|
|||
}
|
||||
if (!scene) {
|
||||
printf("ERROR: Failed to load file: %s\n", globalImporter->GetErrorString());
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const clock_t second = ::clock();
|
||||
|
|
@ -550,10 +550,7 @@ int ProcessStandardArguments(
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
int Assimp_TestBatchLoad (
|
||||
const char* const* params,
|
||||
unsigned int num)
|
||||
{
|
||||
int Assimp_TestBatchLoad(const char* const* params, unsigned int num) {
|
||||
for(unsigned int i = 0; i < num; ++i) {
|
||||
globalImporter->ReadFile(params[i],aiProcessPreset_TargetRealtime_MaxQuality);
|
||||
// we're totally silent. scene destructs automatically.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue