new level test
[deeprace] / libs / goat3d / src / read.c
index cad023d..dd2000c 100644 (file)
@@ -54,6 +54,12 @@ int g3dimpl_scnload(struct goat3d *g, struct goat3d_io *io)
        struct ts_node *tsroot, *c;
        const char *str;
 
+       /* attempt to load it as gltf first */
+       if((g3dimpl_loadgltf(g, io)) == 0) {
+               return 0;
+       }
+       io->seek(0, SEEK_SET, io->cls);
+
        tsio.data = io->cls;
        tsio.read = io->read;
        tsio.write = io->write;