| 207 | } |
| 208 | |
| 209 | bool glTF::ParseGLBHeader(core::BinaryReader* pBinReader, Header &header) |
| 210 | { |
| 211 | header.magic = pBinReader->Read<uint32>(); |
| 212 | if (!(header.magic == *reinterpret_cast<uint32*>("glTF"))) |
| 213 | { |
| 214 | LOG("invalid glb file header!", core::LogLevel::Warning); |
| 215 | return false; |
| 216 | } |
| 217 | header.version = pBinReader->Read<uint32>(); |
| 218 | if (!(header.version == 2)) |
| 219 | { |
| 220 | LOG("invalid glb file header version!", core::LogLevel::Warning); |
| 221 | return false; |
| 222 | } |
| 223 | header.length = pBinReader->Read<uint32>(); |
| 224 | return true; |
| 225 | } |
| 226 | |
| 227 | bool glTF::ParseGLBChunk(core::BinaryReader* pBinReader, Chunk &chunk) |
| 228 | { |
nothing calls this directly
no outgoing calls
no test coverage detected