Changed references to the asset pack
This commit is contained in:
parent
69bb4d6ac0
commit
10031d4cca
12 changed files with 22 additions and 22 deletions
|
|
@ -34,7 +34,7 @@ namespace vks
|
|||
#if defined(__ANDROID__)
|
||||
AAsset* asset = AAssetManager_open(androidApp->activity->assetManager, filename.c_str(), AASSET_MODE_STREAMING);
|
||||
if (!asset) {
|
||||
vks::tools::exitFatal("Could not load texture from " + filename + "\n\nThe file may be part of the additional asset pack.\n\nRun \"download_assets.py\" in the repository root to download the latest version.", -1);
|
||||
vks::tools::exitFatal("Could not load texture from " + filename + "\n\nMake sure the assets submodule has been checked out and is up-to-date.", -1);
|
||||
}
|
||||
size_t size = AAsset_getLength(asset);
|
||||
assert(size > 0);
|
||||
|
|
@ -45,7 +45,7 @@ namespace vks
|
|||
delete[] textureData;
|
||||
#else
|
||||
if (!vks::tools::fileExists(filename)) {
|
||||
vks::tools::exitFatal("Could not load texture from " + filename + "\n\nThe file may be part of the additional asset pack.\n\nRun \"download_assets.py\" in the repository root to download the latest version.", -1);
|
||||
vks::tools::exitFatal("Could not load texture from " + filename + "\n\nMake sure the assets submodule has been checked out and is up-to-date.", -1);
|
||||
}
|
||||
result = ktxTexture_CreateFromNamedFile(filename.c_str(), KTX_TEXTURE_CREATE_LOAD_IMAGE_DATA_BIT, target);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ const std::string getAssetPath()
|
|||
{
|
||||
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
|
||||
return "";
|
||||
#elif defined(DVK_EXAMPLE_ASSETS_DIR)
|
||||
return DVK_EXAMPLE_ASSETS_DIR;
|
||||
#elif defined(VK_EXAMPLE_ASSETS_DIR)
|
||||
return VK_EXAMPLE_ASSETS_DIR;
|
||||
#else
|
||||
return "./../assets/";
|
||||
#endif
|
||||
|
|
@ -28,8 +28,8 @@ const std::string getShaderBasePath()
|
|||
{
|
||||
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
|
||||
return "shaders/";
|
||||
#elif defined(DVK_EXAMPLE_SHADERS_DIR)
|
||||
return DVK_EXAMPLE_SHADERS_DIR;
|
||||
#elif defined(VK_EXAMPLE_SHADERS_DIR)
|
||||
return VK_EXAMPLE_SHADERS_DIR;
|
||||
#else
|
||||
return "./../shaders/";
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ void vkglTF::Texture::fromglTfImage(tinygltf::Image &gltfimage, std::string path
|
|||
#if defined(__ANDROID__)
|
||||
AAsset* asset = AAssetManager_open(androidApp->activity->assetManager, filename.c_str(), AASSET_MODE_STREAMING);
|
||||
if (!asset) {
|
||||
vks::tools::exitFatal("Could not load texture from " + filename + "\n\nThe file may be part of the additional asset pack.\n\nRun \"download_assets.py\" in the repository root to download the latest version.", -1);
|
||||
vks::tools::exitFatal("Could not load texture from " + filename + "\n\nMake sure the assets submodule has been checked out and is up-to-date.", -1);
|
||||
}
|
||||
size_t size = AAsset_getLength(asset);
|
||||
assert(size > 0);
|
||||
|
|
@ -300,7 +300,7 @@ void vkglTF::Texture::fromglTfImage(tinygltf::Image &gltfimage, std::string path
|
|||
delete[] textureData;
|
||||
#else
|
||||
if (!vks::tools::fileExists(filename)) {
|
||||
vks::tools::exitFatal("Could not load texture from " + filename + "\n\nThe file may be part of the additional asset pack.\n\nRun \"download_assets.py\" in the repository root to download the latest version.", -1);
|
||||
vks::tools::exitFatal("Could not load texture from " + filename + "\n\nMake sure the assets submodule has been checked out and is up-to-date.", -1);
|
||||
}
|
||||
result = ktxTexture_CreateFromNamedFile(filename.c_str(), KTX_TEXTURE_CREATE_LOAD_IMAGE_DATA_BIT, &ktxTexture);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue