Integrating FBX SDK in a UWP DirectX11 XAML App Template

Integrating FBX SDK in a UWP DirectX11 XAML App Template

Anonymous
Not applicable
1,162 Views
4 Replies
Message 1 of 5

Integrating FBX SDK in a UWP DirectX11 XAML App Template

Anonymous
Not applicable

I generated a DirectX11XAML template project in Visual Studio 2019 Community Edition. I modified pch.h of the project to include fbxsdk.h and common.h from the ImportScene sample of fbx samples. I also added to my CrateFBX project the necessary import and library dependancies that I added manuall into the new CrateFBX to get it to compile and link an exe. I modifed the constructor of CrateFBXMain and posted an image of the code:

 

 FbxManager* lSdkManager = NULL;
 FbxScene* lScene = NULL;
 bool lResult;
 // Prepare the FBX SDK.
 InitializeSdkObjects(lSdkManager, lScene);
 // Load the scene.
 // The example can take a FBX file as an argument.
 FbxString lFilePath("unitsphere.fbx");
 FBXSDK_printf("\n\nFile: %s\n\n", lFilePath.Buffer());
 lResult = LoadScene(lSdkManager, lScene, lFilePath.Buffer());
 
So when I run the UWP CrateFBX app there is an initialization exception coming out at runtime inside the LoadScene function. Does anyone know why I would be experiencing the exception in a DirectX11XAML template app as generated by Visual Studio Community Edition 2019?
 
Thank You!

cratefbxmain.PNGInitializationException.PNGpchh.PNGSolutionExplorer.PNG

0 Likes
Accepted solutions (1)
1,163 Views
4 Replies
Replies (4)
Message 2 of 5

regalir
Autodesk
Autodesk

I am not familiar with UWP but, just to make sure, did you download the fbxXXXX_fbxsdk_vsYYYYstore_win.exe package to have the UWP version of the FBX SDK? Since you mentioned that you used the ImportScene sample, I suspect that you downloaded the standard package (the "store" variant does not provide the samples).

0 Likes
Message 3 of 5

Anonymous
Not applicable

My attempt at downloading the fbxXXXX_fbxsdk_vsYYYYstore_win.exe package and then modifying my own Visual Studio 2019 project to use the include and lib directory and lib files from fbx sdk led to:

 

Capture.PNG

 

 

only these lines were included in my own project:

 FbxManager* lSdkManager = NULL;
 FbxScene* lScene = NULL;
 bool lResult;

 

along with an #include "fbxsdk.h" in "pch.h" of my own project.

0 Likes
Message 4 of 5

regalir
Autodesk
Autodesk
Accepted solution

We don't provide the FBX SDK libraries for VS2019.

 

The FBX SDK v2019.x offers the UAP version of the library for VS 2015 and VS 2017 only (you need FBX SDK v2019.5 for the VS 2017). VS 2013 and VS 2012 are WindowsStore builds.

Unless you can find a way to use a VS 2017 (or 2015) flavor inside VS 2019 (I'm not sure it can really be done), you probably need to compile your projects with the compatible compiler.

0 Likes
Message 5 of 5

regalir
Autodesk
Autodesk

Actually, you can try to change the Platform Target in your Project properties pages, under the General tab.

0 Likes