summaryrefslogtreecommitdiffstats
path: root/src/assimp-test.c
blob: 24866cf126ec8300fa09bff411b8fd3048e57d5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
}