Android build fixes (#1156)

* Add gradle build scripts to more examples

* Fix building graphicspipelinelibrary example on android

* Fix tinygltf dependencies

hostimagecopy uses tinygltf but didn't depend on it, while meshshader doesn't use it.

* Load more Vulkan functions on Android

The sparse functions are used by texturesparseresidency, while the begin/end rendering functions are used by trianglevulkan13.
This commit is contained in:
William Pearson 2024-10-08 11:30:35 -07:00 committed by GitHub
parent a2d5a1fd44
commit 358babffd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
65 changed files with 2733 additions and 15 deletions

View file

@ -199,15 +199,16 @@ public:
{
#if defined(__ANDROID__)
// Load shader from compressed asset
AAsset* asset = AAssetManager_open(androidApp->activity->assetManager, fileName, AASSET_MODE_STREAMING);
AAsset* asset = AAssetManager_open(androidApp->activity->assetManager, fileName.c_str(), AASSET_MODE_STREAMING);
assert(asset);
size_t size = AAsset_getLength(asset);
assert(size > 0);
shaderInfo.size = size;
shaderInfo.code = new uint32_t[size / 4];
AAsset_read(asset, shaderCode, size);
AAsset_read(asset, reinterpret_cast<char*>(shaderInfo.code), size);
AAsset_close(asset);
return true;
#else
std::ifstream is(fileName, std::ios::binary | std::ios::in | std::ios::ate);

View file

@ -7,7 +7,6 @@
*/
#include "vulkanexamplebase.h"
#include "VulkanglTFModel.h"
class VulkanExample : public VulkanExampleBase
{