AssetStudio/AssetStudioFBXNative/asfbx_context.cpp
hozuki c76e41b1ab
Replace C++/CLI components with P/Invoke components (#562)
* Replace C++/CLI components with P/Invoke

* Deleted C++/CLI projects

* Use Utf8StringHandle to marshal UTF-8 strings

* Use plaform-default calling convention

* Handle DLL preloading on Linux and macOS

* Change intermediate and output directories of native projects

* Improve P/Invoke documentation
2020-08-06 10:35:50 +08:00

34 lines
479 B
C++

#include <fbxsdk.h>
#include "asfbx_context.h"
AsFbxContext::AsFbxContext()
{
pSdkManager = nullptr;
pScene = nullptr;
pTextures = nullptr;
pMaterials = nullptr;
pExporter = nullptr;
pBindPose = nullptr;
}
AsFbxContext::~AsFbxContext()
{
framePaths.clear();
delete pMaterials;
delete pTextures;
if (pExporter != nullptr) {
pExporter->Destroy();
}
if (pScene != nullptr) {
pScene->Destroy();
}
if (pSdkManager != nullptr) {
pSdkManager->Destroy();
}
}