MCPcopy Create free account
hub / github.com/Illation/ETEngine / ParseGLBHeader

Method ParseGLBHeader

Engine/source/EtRendering/SceneStructure/GLTF.cpp:209–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209bool 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
227bool glTF::ParseGLBChunk(core::BinaryReader* pBinReader, Chunk &chunk)
228{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected