summaryrefslogtreecommitdiffstats
path: root/src/assimp-test.c
diff options
context:
space:
mode:
authorJosh Heidenreich <josh.sickmate@gmail.com>2014-01-28 22:36:27 (GMT)
committerTony Theodore <tonyt@logyst.com>2014-02-01 01:23:26 (GMT)
commit5832d3b707c991d8243891f571837e0c48c75180 (patch)
tree845b8dfc95961066d832adfa35281d7b31fee002 /src/assimp-test.c
parent04862bc8d97ac85187eaf1248d9ee8c767050419 (diff)
downloadmxe-5832d3b707c991d8243891f571837e0c48c75180.zip
mxe-5832d3b707c991d8243891f571837e0c48c75180.tar.gz
mxe-5832d3b707c991d8243891f571837e0c48c75180.tar.bz2
add package assimp
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;
+}