Log android error if model couldn't be loaded from asset manager
This commit is contained in:
parent
e3c93c5b7f
commit
a57c8931e5
1 changed files with 4 additions and 1 deletions
|
|
@ -12,7 +12,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
|
||||||
|
|
||||||
#include "vulkan/vulkan.h"
|
#include "vulkan/vulkan.h"
|
||||||
|
|
||||||
|
|
@ -167,6 +166,10 @@ namespace vks
|
||||||
// So they need to be loaded via the asset manager
|
// So they need to be loaded via the asset manager
|
||||||
|
|
||||||
AAsset* asset = AAssetManager_open(androidApp->activity->assetManager, filename.c_str(), AASSET_MODE_STREAMING);
|
AAsset* asset = AAssetManager_open(androidApp->activity->assetManager, filename.c_str(), AASSET_MODE_STREAMING);
|
||||||
|
if (!asset) {
|
||||||
|
LOGE("Could not load mesh from \"%s\"!", filename.c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
assert(asset);
|
assert(asset);
|
||||||
size_t size = AAsset_getLength(asset);
|
size_t size = AAsset_getLength(asset);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue