Skip to content

Commit

Permalink
Merge pull request #835 from overte-org/feature/cgltf
Browse files Browse the repository at this point in the history
glTF importer using cgltf library
  • Loading branch information
ksuprynowicz authored Feb 26, 2024
2 parents 6631128 + 3515300 commit c6e39bd
Show file tree
Hide file tree
Showing 8 changed files with 393 additions and 1,938 deletions.
15 changes: 15 additions & 0 deletions cmake/ports/cgltf/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# header-only library

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jkuhlmann/cgltf
REF de399881c65c438a635627c749440eeea7e05599
SHA512 753923116b92642848ff2bda70695ddd0e7be6db43ed3cfc37aff4cba90a29a92e3dbda139a5f2c80cad1d2cdaf81e1383e4ea7a12195f61fe8cfeb105e53ea2
HEAD_REF master
)

file(COPY "${SOURCE_PATH}/cgltf.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(COPY "${SOURCE_PATH}/cgltf_write.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")

# Handle copyright
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
7 changes: 7 additions & 0 deletions cmake/ports/cgltf/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "cgltf",
"version": "1.13",
"description": "Single-file glTF 2.0 loader and writer written in C99",
"homepage": "https://github.com/jkuhlmann/cgltf",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion cmake/ports/hifi-deps/CONTROL
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
Source: hifi-deps
Version: 0.1.5-github-actions
Description: Collected dependencies for High Fidelity applications
Build-Depends: bullet3, draco, etc2comp, glad, glm, node, nvtt, openexr (!android), openssl (windows), opus, polyvox, tbb (!android), vhacd, webrtc (!android|!(linux&arm)), zlib
Build-Depends: bullet3, cgltf, draco, etc2comp, glad, glm, node, nvtt, openexr (!android), openssl (windows), opus, polyvox, tbb (!android), vhacd, webrtc (!android|!(linux&arm)), zlib
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ hfm::Model::Pointer ModelLoader::load(const hifi::ByteArray& data, const hifi::V
if (!serializer) {
return hfm::Model::Pointer();
}
qDebug() << "ModelLoader::load: " << url;
return serializer->read(data, mapping, url);
}
Loading

0 comments on commit c6e39bd

Please sign in to comment.