feat: update Filament to v1.56.4

This commit is contained in:
Nick Fisher
2025-01-07 08:27:19 +08:00
parent b1c0d4b2e8
commit 020bfbcbf6
60 changed files with 1772 additions and 21074 deletions

View File

@@ -140,6 +140,7 @@ public:
* @param values Array of values to set to the named parameter array.
* @param count Size of the array to set.
* @throws utils::PreConditionPanic if name doesn't exist or no-op if exceptions are disabled.
* @see Material::hasParameter
*/
template<typename T, typename = is_supported_parameter_t<T>>
void setParameter(const char* UTILS_NONNULL name, size_t nameLength,
@@ -234,6 +235,32 @@ public:
setParameter(name, strlen(name), type, color);
}
/**
* Gets the value of a parameter by name.
*
* Note: Only supports non-texture parameters such as numeric and math types.
*
* @param name Name of the parameter as defined by Material. Cannot be nullptr.
* @param nameLength Length in `char` of the name parameter.
* @throws utils::PreConditionPanic if name doesn't exist or no-op if exceptions are disabled.
*
* @see Material::hasParameter
*/
template<typename T>
T getParameter(const char* UTILS_NONNULL name, size_t nameLength) const;
/** inline helper to provide the name as a null-terminated C string */
template<typename T, typename = is_supported_parameter_t<T>>
inline T getParameter(StringLiteral name) const {
return getParameter<T>(name.data, name.size);
}
/** inline helper to provide the name as a null-terminated C string */
template<typename T, typename = is_supported_parameter_t<T>>
inline T getParameter(const char* UTILS_NONNULL name) const {
return getParameter<T>(name, strlen(name));
}
/**
* Set-up a custom scissor rectangle; by default it is disabled.
*