Log android error if model couldn't be loaded from asset manager

This commit is contained in:
saschawillems 2017-03-09 20:00:55 +01:00
parent e3c93c5b7f
commit a57c8931e5

View file

@ -12,7 +12,6 @@
#include <string>
#include <fstream>
#include <vector>
#include <map>
#include "vulkan/vulkan.h"
@ -167,6 +166,10 @@ namespace vks
// So they need to be loaded via the asset manager
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);
size_t size = AAsset_getLength(asset);