mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-18 03:24:15 -04:00
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
This commit is contained in:
33
AssetStudioFBXNative/asfbx_context.cpp
Normal file
33
AssetStudioFBXNative/asfbx_context.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
#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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user