update headers

This commit is contained in:
Nick Fisher
2022-12-05 17:51:44 +08:00
parent 8d562f1742
commit dd100653dc
234 changed files with 62619 additions and 9800 deletions

View File

@@ -36,8 +36,8 @@ enum class AlphaMode : uint8_t {
// The following struct gets hashed so all padding bits should be explicit.
// Tell the compiler to emit a warning if it adds any padding.
#pragma clang diagnostic push
#pragma clang diagnostic warning "-Wpadded"
UTILS_WARNING_PUSH
UTILS_WARNING_ENABLE_PADDED
/**
* \struct MaterialKey MaterialProvider.h gltfio/MaterialProvider.h
@@ -98,7 +98,7 @@ struct alignas(4) MaterialKey {
static_assert(sizeof(MaterialKey) == 16, "MaterialKey has unexpected size.");
#pragma clang diagnostic pop
UTILS_WARNING_POP
bool operator==(const MaterialKey& k1, const MaterialKey& k2);
@@ -141,15 +141,22 @@ public:
* @param uvmap Output argument that gets populated with a small table that maps from a glTF uv
* index to a Filament uv index.
* @param label Optional tag that is not a part of the cache key.
* @param extras Optional extras as stringified JSON (not a part of the cache key). Don't store the pointer.
* @param extras Optional extras as stringified JSON (not a part of the cache key).
* Does not store the pointer.
*/
virtual filament::MaterialInstance* createMaterialInstance(MaterialKey* config, UvMap* uvmap,
virtual MaterialInstance* createMaterialInstance(MaterialKey* config, UvMap* uvmap,
const char* label = "material", const char* extras = nullptr) = 0;
/**
* Creates or fetches a compiled Filament material corresponding to the given config.
*/
virtual Material* getMaterial(MaterialKey* config, UvMap* uvmap,
const char* label = "material") { return nullptr; }
/**
* Gets a weak reference to the array of cached materials.
*/
virtual const filament::Material* const* getMaterials() const noexcept = 0;
virtual const Material* const* getMaterials() const noexcept = 0;
/**
* Gets the number of cached materials.
@@ -170,7 +177,7 @@ public:
* Some types of providers (e.g. ubershader) require dummy attribute values
* if the glTF model does not provide them.
*/
virtual bool needsDummyData(filament::VertexAttribute attrib) const noexcept = 0;
virtual bool needsDummyData(VertexAttribute attrib) const noexcept = 0;
};
void constrainMaterial(MaterialKey* key, UvMap* uvmap);
@@ -189,7 +196,7 @@ void processShaderString(std::string* shader, const UvMap& uvmap,
* @see createUbershaderProvider
*/
UTILS_PUBLIC
MaterialProvider* createJitShaderProvider(filament::Engine* engine, bool optimizeShaders = false);
MaterialProvider* createJitShaderProvider(Engine* engine, bool optimizeShaders = false);
/**
* Creates a material provider that loads a small set of pre-built materials.
@@ -199,7 +206,7 @@ MaterialProvider* createJitShaderProvider(filament::Engine* engine, bool optimiz
* @see createJitShaderProvider
*/
UTILS_PUBLIC
MaterialProvider* createUbershaderProvider(filament::Engine* engine, const void* archive,
MaterialProvider* createUbershaderProvider(Engine* engine, const void* archive,
size_t archiveByteCount);
} // namespace filament::gltfio