Skip to content

Commit 182d902

Browse files
committed
Change: Switch to simdjson's ondemand
1 parent d2bf171 commit 182d902

File tree

7 files changed

+1444
-948
lines changed

7 files changed

+1444
-948
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ if (FASTGLTF_DOWNLOAD_SIMDJSON)
5353
target_include_directories(fastgltf_simdjson PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/deps/simdjson> $<INSTALL_INTERFACE:include>)
5454
compiler_flags(fastgltf_simdjson)
5555
enable_debug_inlining(fastgltf_simdjson)
56+
if (SIMDJSON_VERBOSE_LOGGING)
57+
target_compile_definitions(fastgltf_simdjson PUBLIC SIMDJSON_VERBOSE_LOGGING=1)
58+
endif()
5659

5760
install(
5861
FILES deps/simdjson/simdjson.h

examples/gl_viewer/gl_viewer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ bool loadGltf(Viewer* viewer, std::string_view cPath) {
286286

287287
constexpr auto gltfOptions = fastgltf::Options::DontRequireValidAssetMember | fastgltf::Options::AllowDouble | fastgltf::Options::LoadGLBBuffers | fastgltf::Options::LoadExternalBuffers;
288288
fastgltf::GltfDataBuffer data;
289-
data.loadFromFile(path);
289+
if (!data.loadFromFile(path))
290+
return false;
290291

291292
auto type = fastgltf::determineGltfFileType(&data);
292293
if (type == fastgltf::GltfType::glTF) {

0 commit comments

Comments
 (0)