|
@@ -10,6 +10,12 @@ using namespace anki;
|
|
|
Error SampleApp::init(int argc, char** argv, CString sampleName)
|
|
Error SampleApp::init(int argc, char** argv, CString sampleName)
|
|
|
{
|
|
{
|
|
|
HeapAllocator<U32> alloc(allocAligned, nullptr);
|
|
HeapAllocator<U32> alloc(allocAligned, nullptr);
|
|
|
|
|
+
|
|
|
|
|
+ // Init the super class
|
|
|
|
|
+ ConfigSet config = DefaultConfigSet::get();
|
|
|
|
|
+ config.set("window_fullscreen", true);
|
|
|
|
|
+
|
|
|
|
|
+#if !ANKI_OS_ANDROID
|
|
|
StringAuto mainDataPath(alloc, ANKI_SOURCE_DIRECTORY);
|
|
StringAuto mainDataPath(alloc, ANKI_SOURCE_DIRECTORY);
|
|
|
StringAuto assetsDataPath(alloc);
|
|
StringAuto assetsDataPath(alloc);
|
|
|
assetsDataPath.sprintf("%s/Samples/%s", ANKI_SOURCE_DIRECTORY, sampleName.cstr());
|
|
assetsDataPath.sprintf("%s/Samples/%s", ANKI_SOURCE_DIRECTORY, sampleName.cstr());
|
|
@@ -19,11 +25,9 @@ Error SampleApp::init(int argc, char** argv, CString sampleName)
|
|
|
ANKI_LOGE("Cannot find directory \"%s\". Have you moved the clone of the repository?", assetsDataPath.cstr());
|
|
ANKI_LOGE("Cannot find directory \"%s\". Have you moved the clone of the repository?", assetsDataPath.cstr());
|
|
|
return Error::USER_DATA;
|
|
return Error::USER_DATA;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- // Init the super class
|
|
|
|
|
- ConfigSet config = DefaultConfigSet::get();
|
|
|
|
|
- config.set("window_fullscreen", true);
|
|
|
|
|
config.set("rsrc_dataPaths", StringAuto(alloc).sprintf("%s:%s", mainDataPath.cstr(), assetsDataPath.cstr()));
|
|
config.set("rsrc_dataPaths", StringAuto(alloc).sprintf("%s:%s", mainDataPath.cstr(), assetsDataPath.cstr()));
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
config.set("gr_validation", 0);
|
|
config.set("gr_validation", 0);
|
|
|
ANKI_CHECK(config.setFromCommandLineArguments(argc - 1, argv + 1));
|
|
ANKI_CHECK(config.setFromCommandLineArguments(argc - 1, argv + 1));
|
|
|
ANKI_CHECK(App::init(config, allocAligned, nullptr));
|
|
ANKI_CHECK(App::init(config, allocAligned, nullptr));
|