diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2024-03-12 12:57:39 -0600 |
|---|---|---|
| committer | Lywx <kiritodev01@gmail.com> | 2024-03-12 16:27:32 -0600 |
| commit | 5c86446913e5bc445a575dfc9198d7cd89c57eb8 (patch) | |
| tree | fce392442f3d5d5db5198b25f4ec67a0ed52793d /src | |
| parent | 798bbf9add2011c9b150a84a5d82ed40a5a76c26 (diff) | |
Add byte_size node to yaml for texture
Diffstat (limited to 'src')
| -rw-r--r-- | src/factories/TextureFactory.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/factories/TextureFactory.cpp b/src/factories/TextureFactory.cpp index 9202b94..7ba02a4 100644 --- a/src/factories/TextureFactory.cpp +++ b/src/factories/TextureFactory.cpp @@ -122,6 +122,11 @@ void TextureCodeExporter::Export(std::ostream &write, std::shared_ptr<IParsedDat std::ofstream file(dpath + ".inc.c", std::ios::binary); size_t byteSize = std::max(1, (int) (texture->mFormat.depth / 8)); + const auto bsize = GetSafeNode<uint32_t>(node, "byte_size", byteSize); + + if (bsize) { + byteSize = bsize; + } SPDLOG_INFO("Byte Size: {}", byteSize); |
