Windows Metadata (.winmd) for the Assimp (Open Asset Import Library) C API, enabling use with CsWin32 source generator.
- Complete metadata for the pinned Assimp C API release
- Includes native Assimp libraries for Windows x64, Windows x86, Linux x64, and macOS arm64
- Seamless integration with CsWin32
-
Install this package:
dotnet add package LittleToxic.AssimpMetadata --prerelease -
Install CsWin32 (required separately):
dotnet add package Microsoft.Windows.CsWin32 --prerelease
-
Create a
NativeMethods.txtfile in your project root:ImportFile ReleaseImport GetErrorString Scene Mesh -
Build your project. CsWin32 automatically generates P/Invoke bindings.
-
Use the generated APIs:
using Windows.Win32; unsafe { var scene = PInvoke.ImportFile("model.obj", 0); // ... work with the scene PInvoke.ReleaseImport(scene); }
- Windows x64, Windows x86, Linux x64, or macOS arm64
- Microsoft.Windows.CsWin32 (installed separately)
All Assimp C API functions are available. The metadata applies the following naming conventions to provide a cleaner .NET experience:
- Prefix Removal: The
aiprefix has been removed from unambiguous types.aiScene→SceneaiMesh→MeshaiNode→Node
- Disambiguation: Types that conflict with .NET standard types are prefixed with
Assimp.aiString→AssimpString
- Simplified Enums: Redundant prefixes in enumeration members have been stripped.
aiPostProcessSteps.aiProcess_Triangulate→PostProcessSteps.TriangulateaiTextureType_DIFFUSE→TextureType.DIFFUSE
- Functions: Standard C functions are available directly (e.g.,
ImportFile,ReleaseImport,GetErrorString).
MIT License. Assimp library is under BSD-3-Clause license.