Skip to content

Commit

Permalink
Change: Switch to simdjson's ondemand
Browse files Browse the repository at this point in the history
  • Loading branch information
spnda committed Mar 17, 2023
1 parent d2bf171 commit 182d902
Show file tree
Hide file tree
Showing 7 changed files with 1,444 additions and 948 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ if (FASTGLTF_DOWNLOAD_SIMDJSON)
target_include_directories(fastgltf_simdjson PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/deps/simdjson> $<INSTALL_INTERFACE:include>)
compiler_flags(fastgltf_simdjson)
enable_debug_inlining(fastgltf_simdjson)
if (SIMDJSON_VERBOSE_LOGGING)
target_compile_definitions(fastgltf_simdjson PUBLIC SIMDJSON_VERBOSE_LOGGING=1)
endif()

install(
FILES deps/simdjson/simdjson.h
Expand Down
3 changes: 2 additions & 1 deletion examples/gl_viewer/gl_viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ bool loadGltf(Viewer* viewer, std::string_view cPath) {

constexpr auto gltfOptions = fastgltf::Options::DontRequireValidAssetMember | fastgltf::Options::AllowDouble | fastgltf::Options::LoadGLBBuffers | fastgltf::Options::LoadExternalBuffers;
fastgltf::GltfDataBuffer data;
data.loadFromFile(path);
if (!data.loadFromFile(path))
return false;

auto type = fastgltf::determineGltfFileType(&data);
if (type == fastgltf::GltfType::glTF) {
Expand Down
Loading

0 comments on commit 182d902

Please sign in to comment.