mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-12 07:48:16 -05:00
chore: add output implementations for gltf and glb
This commit is contained in:
20
src/ObjCommon/XModel/Gltf/GltfConstants.h
Normal file
20
src/ObjCommon/XModel/Gltf/GltfConstants.h
Normal file
@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "Utils/FileUtils.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace gltf
|
||||
{
|
||||
constexpr uint32_t GLTF_MAGIC = FileUtils::MakeMagic32('g', 'l', 'T', 'F');
|
||||
constexpr uint32_t GLTF_VERSION = 2u;
|
||||
|
||||
constexpr uint32_t CHUNK_MAGIC_JSON = FileUtils::MakeMagic32('J', 'S', 'O', 'N');
|
||||
constexpr uint32_t CHUNK_MAGIC_BIN = FileUtils::MakeMagic32('B', 'I', 'N', '\x00');
|
||||
|
||||
constexpr auto GLTF_LENGTH_OFFSET = 8u;
|
||||
constexpr auto GLTF_JSON_CHUNK_LENGTH_OFFSET = 12u;
|
||||
constexpr auto GLTF_JSON_CHUNK_DATA_OFFSET = 20u;
|
||||
|
||||
constexpr auto GLTF_DATA_URI_PREFIX = "data:application/octet-stream;base64,";
|
||||
} // namespace gltf
|
Reference in New Issue
Block a user