#include <limits.h>
#include <assert.h>
#include <goatvr.h>
+#include <assman.h>
#include "app.h"
#include "opengl.h"
#include "sdr.h"
app_resize(opt.width, opt.height);
app_fullscreen(opt.fullscreen);
+ if(opt.data_url) {
+ info_log("Adding URL asset source: %s\n", opt.data_url);
+ ass_add_url("data", opt.data_url);
+ }
+
if(opt.vr) {
if(goatvr_init() == -1) {
return false;
false, // fullscreen
0, // scene file
true, // music
- true // reflections
+ true, // reflections
+ 0 // data url
};
enum {
OPT_SCENEFILE,
OPT_MUSIC,
OPT_REFLECT,
+ OPT_DATAURL,
OPT_HELP
};
{0, "scene", OPT_SCENEFILE, "scene file to open"},
{'m', "music", OPT_MUSIC, "play background audio"},
{'r', "reflect", OPT_REFLECT, "render reflections"},
+ {0, "url", OPT_DATAURL, "data URL"},
{'h', "help", OPT_HELP, "print usage and exit"},
OPTCFG_OPTIONS_END
};
opt.reflect = is_enabled(oc);
break;
+ case OPT_DATAURL:
+ opt.data_url = strdup(optcfg_next_value(oc));
+ break;
+
case OPT_HELP:
printf("Usage: demo [options]\nOptions:\n");
optcfg_print_options(oc);