update macos/ios to Filament v1.51.2

This commit is contained in:
Nick Fisher
2024-04-20 13:46:58 +08:00
parent 15882891e2
commit ea04e94c1f
156 changed files with 5394 additions and 5884 deletions

View File

@@ -97,8 +97,8 @@ struct AssetConfiguration {
*
* // Load buffers and textures from disk.
* ResourceLoader resourceLoader({engine, ".", true});
* resourceLoader.addTextureProvider("image/png", decoder)
* resourceLoader.addTextureProvider("image/jpeg", decoder)
* resourceLoader.addTextureProvider("image/png", decoder);
* resourceLoader.addTextureProvider("image/jpeg", decoder);
* resourceLoader.loadResources(asset);
*
* // Free the glTF hierarchy as it is no longer needed.
@@ -197,7 +197,7 @@ public:
* This cannot be called after FilamentAsset::releaseSourceData().
* See also AssetLoader::createInstancedAsset().
*/
FilamentInstance* createInstance(FilamentAsset* primary);
FilamentInstance* createInstance(FilamentAsset* asset);
/**
* Allows clients to enable diagnostic shading on newly-loaded assets.

View File

@@ -69,9 +69,12 @@ class UTILS_PUBLIC ResourceLoader {
public:
using BufferDescriptor = filament::backend::BufferDescriptor;
ResourceLoader(const ResourceConfiguration& config);
explicit ResourceLoader(const ResourceConfiguration& config);
~ResourceLoader();
void setConfiguration(const ResourceConfiguration& config);
/**
* Feeds the binary content of an external resource into the loader's URI cache.
*
@@ -90,7 +93,8 @@ public:
/**
* Register a plugin that can consume PNG / JPEG content and produce filament::Texture objects.
*
* Destruction of the given provider is the client's responsibility.
* Destruction of the given provider is the client's responsibility and must be done after the
* destruction of this ResourceLoader.
*/
void addTextureProvider(const char* mimeType, TextureProvider* provider);
@@ -153,8 +157,6 @@ public:
private:
bool loadResources(FFilamentAsset* asset, bool async);
void normalizeSkinningWeights(FFilamentAsset* asset) const;
AssetPool* mPool;
struct Impl;
Impl* pImpl;
};