summaryrefslogtreecommitdiffstats
path: root/src/assimp-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/assimp-test.c')
-rw-r--r--src/assimp-test.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/assimp-test.c b/src/assimp-test.c
new file mode 100644
index 0000000..24866cf
--- /dev/null
+++ b/src/assimp-test.c
@@ -0,0 +1,31 @@
+/*
+ * This file is part of MXE.
+ * See index.html for further information.
+ */
+
+#include <assimp/cimport.h>
+#include <assimp/scene.h>
+#include <assimp/postprocess.h>
+#include <string.h>
+
+int main(int argc, char *argv[])
+{
+ const struct aiScene* scene = NULL;
+
+ /* NFF file for a single spere with radius 5 at pos 0x0x0 */
+ const char* buf =
+ "--- begin of file\n"
+ "s 0 0 0 5\n"
+ "--- end of file\n";
+
+ (void)argc;
+ (void)argv;
+
+ scene = aiImportFileFromMemory(buf, strlen(buf), aiProcessPreset_TargetRealtime_MaxQuality, "nff");
+ (void)scene;
+
+ if (scene->mNumMeshes != 1) return 1;
+
+ aiReleaseImport(scene);
+ return 0;
+}