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

@@ -30,8 +30,8 @@ namespace filament::uberz {
// offset fields into pointers.
void convertOffsetsToPointers(struct ReadableArchive* archive);
#pragma clang diagnostic push
#pragma clang diagnostic warning "-Wpadded"
UTILS_WARNING_PUSH
UTILS_WARNING_ENABLE_PADDED
// Precompiled set of materials bundled with a list of features flags that each material supports.
// This is the readable counterpart to WriteableArchive.
@@ -72,7 +72,7 @@ struct ArchiveFlag {
ArchiveFeature value;
};
#pragma clang diagnostic pop
UTILS_WARNING_POP
} // namespace filament::uberz

View File

@@ -34,7 +34,10 @@ namespace filament::uberz {
// Users do not need to access this class directly, they should go through gltfio.
class WritableArchive {
public:
WritableArchive(size_t materialCount) : mMaterials(materialCount) {}
WritableArchive(size_t materialCount) : mMaterials(uint32_t(materialCount)) {
assert(materialCount <= UINT_MAX);
}
void addMaterial(const char* name, const uint8_t* package, size_t packageSize);
void addSpecLine(std::string_view line);
utils::FixedCapacityVector<uint8_t> serialize() const;