From 59fd68e7fa51a3e737df6a0d28a675a7b4176dfc Mon Sep 17 00:00:00 2001 From: Try Date: Tue, 25 Aug 2026 00:36:33 +0200 Subject: [PATCH] missing alpha_test field in G2 --- include/zenkit/Mesh.hh | 3 +++ src/Mesh.cc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/include/zenkit/Mesh.hh b/include/zenkit/Mesh.hh index 41c7b99e..ad9831b8 100644 --- a/include/zenkit/Mesh.hh +++ b/include/zenkit/Mesh.hh @@ -110,6 +110,9 @@ namespace zenkit { /// \brief A list of materials used by this mesh. std::vector materials {}; + /// \brief If alpha testing should be enabled. + std::uint8_t alpha_test {true}; + /// \brief A list of vertices of this mesh. std::vector vertices {}; diff --git a/src/Mesh.cc b/src/Mesh.cc index 0462c4a3..195ce90a 100644 --- a/src/Mesh.cc +++ b/src/Mesh.cc @@ -59,6 +59,9 @@ namespace zenkit { for (auto& material : this->materials) { material.load(*matreader); } + if (version == MESH_VERSION_G2) { + this->alpha_test = c->read_byte() != 0; + } break; }