Merge 3d6856b3f8
into 739ee5db94
This commit is contained in:
commit
968c8e5659
184
CMakeLists.txt
184
CMakeLists.txt
|
@ -1,117 +1,63 @@
|
||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
project(FBX2glTF)
|
project(FBX2glTF)
|
||||||
|
|
||||||
set(typical_usage_str
|
|
||||||
"Example usage:\n\
|
|
||||||
> mkdir -p build_debug\n\
|
|
||||||
> conan install . -i build_debug -s build_type=Debug -e FBXSDK_SDKS=/home/zell/FBXSDK\n\
|
|
||||||
> conan build . -bf build_debug")
|
|
||||||
|
|
||||||
if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
|
||||||
message(FATAL_ERROR
|
|
||||||
"Building from within the source tree is not supported! ${typical_usage_str}")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
|
|
||||||
# FBX
|
# FBX
|
||||||
foreach (FBXSDK_VERSION "2019.2")
|
foreach (FBXSDK_VERSION "2020.3.7")
|
||||||
find_package(FBX)
|
find_package(FBX)
|
||||||
if (FBXSDK_FOUND)
|
if (FBXSDK_FOUND)
|
||||||
break()
|
break()
|
||||||
endif()
|
endif ()
|
||||||
endforeach(FBXSDK_VERSION)
|
endforeach (FBXSDK_VERSION)
|
||||||
if (NOT FBXSDK_FOUND)
|
if (NOT FBXSDK_FOUND)
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
"Can't find FBX SDK in either:\n"
|
"Can't find FBX SDK in either:\n"
|
||||||
" - Mac OS X: ${FBXSDK_APPLE_ROOT}\n"
|
" - Mac OS X: ${FBXSDK_APPLE_ROOT}\n"
|
||||||
" - Windows: ${FBXSDK_WINDOWS_ROOT}\n"
|
" - Windows: ${FBXSDK_WINDOWS_ROOT}\n"
|
||||||
" - Linux: ${FBXSDK_LINUX_ROOT}"
|
" - Linux: ${FBXSDK_LINUX_ROOT}"
|
||||||
)
|
)
|
||||||
endif()
|
endif ()
|
||||||
|
|
||||||
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan_paths.cmake")
|
|
||||||
message(FATAL_ERROR
|
|
||||||
"The Conan package manager must run ('install') first. ${typical_usage_str}")
|
|
||||||
endif()
|
|
||||||
include("${CMAKE_BINARY_DIR}/conan_paths.cmake")
|
|
||||||
|
|
||||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_BINARY_DIR}")
|
set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
|
||||||
|
|
||||||
# stuff we get from Conan
|
# stuff we get from Conan
|
||||||
find_package(boost_filesystem MODULE REQUIRED)
|
find_package(Boost REQUIRED COMPONENTS filesystem optional)
|
||||||
find_package(boost_optional MODULE REQUIRED)
|
find_package(nlohmann-fifo-map CONFIG REQUIRED)
|
||||||
find_package(libxml2 MODULE REQUIRED)
|
find_package(LibXml2 REQUIRED)
|
||||||
find_package(zlib MODULE REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
find_package(fmt MODULE REQUIRED)
|
find_package(fmt CONFIG REQUIRED)
|
||||||
|
find_package(draco CONFIG REQUIRED)
|
||||||
|
|
||||||
# create a compilation database for e.g. clang-tidy
|
# create a compilation database for e.g. clang-tidy
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
# DRACO
|
|
||||||
ExternalProject_Add(Draco
|
|
||||||
GIT_REPOSITORY https://github.com/google/draco
|
|
||||||
GIT_TAG 1.3.4
|
|
||||||
PREFIX draco
|
|
||||||
INSTALL_DIR
|
|
||||||
CMAKE_ARGS
|
|
||||||
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
|
|
||||||
-DBUILD_FOR_GLTF=1
|
|
||||||
)
|
|
||||||
set(DRACO_INCLUDE_DIR "${CMAKE_BINARY_DIR}/draco/include")
|
|
||||||
if (WIN32)
|
|
||||||
set(DRACO_LIB "${CMAKE_BINARY_DIR}/draco/lib/dracoenc.lib")
|
|
||||||
else()
|
|
||||||
set(DRACO_LIB "${CMAKE_BINARY_DIR}/draco/lib/libdracoenc.a")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# MATHFU
|
# MATHFU
|
||||||
set(mathfu_build_benchmarks OFF CACHE BOOL "")
|
set(mathfu_build_benchmarks OFF CACHE BOOL "")
|
||||||
set(mathfu_build_tests OFF CACHE BOOL "")
|
set(mathfu_build_tests OFF CACHE BOOL "")
|
||||||
ExternalProject_Add(MathFu
|
ExternalProject_Add(MathFu
|
||||||
PREFIX mathfu
|
PREFIX mathfu
|
||||||
GIT_REPOSITORY https://github.com/google/mathfu
|
GIT_REPOSITORY https://github.com/google/mathfu
|
||||||
GIT_TAG v1.1.0
|
GIT_TAG v1.1.0
|
||||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo "Skipping MathFu configure step."
|
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo "Skipping MathFu configure step."
|
||||||
BUILD_COMMAND ${CMAKE_COMMAND} -E echo "Skipping MathFu build step."
|
BUILD_COMMAND ${CMAKE_COMMAND} -E echo "Skipping MathFu build step."
|
||||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Skipping MathFu install step."
|
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Skipping MathFu install step."
|
||||||
)
|
)
|
||||||
set(MATHFU_INCLUDE_DIRS
|
set(MATHFU_INCLUDE_DIRS
|
||||||
"${CMAKE_BINARY_DIR}/mathfu/src/MathFu/include/"
|
"${CMAKE_BINARY_DIR}/mathfu/src/MathFu/include/"
|
||||||
"${CMAKE_BINARY_DIR}/mathfu/src/MathFu/dependencies/vectorial/include")
|
"${CMAKE_BINARY_DIR}/mathfu/src/MathFu/dependencies/vectorial/include")
|
||||||
|
|
||||||
# OrderedMap
|
|
||||||
ExternalProject_Add(FiFoMap
|
|
||||||
PREFIX fifo_map
|
|
||||||
GIT_REPOSITORY https://github.com/nlohmann/fifo_map
|
|
||||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo "Skipping FiFoMap configure step."
|
|
||||||
BUILD_COMMAND ${CMAKE_COMMAND} -E echo "Skipping FiFoMap build step."
|
|
||||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Skipping FiFoMap install step."
|
|
||||||
)
|
|
||||||
set(FIFO_MAP_INCLUDE_DIR "${CMAKE_BINARY_DIR}/fifo_map/src/FiFoMap/src")
|
|
||||||
|
|
||||||
|
|
||||||
# cppcodec
|
|
||||||
ExternalProject_Add(CPPCodec
|
|
||||||
PREFIX cppcodec
|
|
||||||
GIT_REPOSITORY https://github.com/tplgy/cppcodec
|
|
||||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo "Skipping CPPCodec configure step."
|
|
||||||
BUILD_COMMAND ${CMAKE_COMMAND} -E echo "Skipping CPPCodec build step."
|
|
||||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Skipping CPPCodec install step."
|
|
||||||
)
|
|
||||||
set(CPPCODEC_INCLUDE_DIR "${CMAKE_BINARY_DIR}/cppcodec/src/CPPCodec")
|
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
find_library(CF_FRAMEWORK CoreFoundation)
|
find_library(CF_FRAMEWORK CoreFoundation)
|
||||||
message("CoreFoundation Framework: ${CF_FRAMEWORK}")
|
message("CoreFoundation Framework: ${CF_FRAMEWORK}")
|
||||||
set(FRAMEWORKS ${CF_FRAMEWORK})
|
set(FRAMEWORKS ${CF_FRAMEWORK})
|
||||||
endif()
|
endif ()
|
||||||
|
|
||||||
set(LIB_SOURCE_FILES
|
set(LIB_SOURCE_FILES
|
||||||
src/FBX2glTF.h
|
src/FBX2glTF.h
|
||||||
|
@ -181,66 +127,64 @@ add_executable(appFBX2glTF src/FBX2glTF.cpp)
|
||||||
set_target_properties(appFBX2glTF PROPERTIES OUTPUT_NAME "FBX2glTF")
|
set_target_properties(appFBX2glTF PROPERTIES OUTPUT_NAME "FBX2glTF")
|
||||||
|
|
||||||
add_dependencies(libFBX2glTF
|
add_dependencies(libFBX2glTF
|
||||||
Draco
|
MathFu
|
||||||
MathFu
|
|
||||||
FiFoMap
|
|
||||||
CPPCodec
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
# Disable annoying & spammy warning from FBX SDK header file
|
# Disable annoying & spammy warning from FBX SDK header file
|
||||||
target_compile_options(libFBX2glTF PRIVATE
|
target_compile_options(libFBX2glTF PRIVATE
|
||||||
"-Wno-null-dereference"
|
"-Wno-null-dereference"
|
||||||
"-Wunused"
|
"-Wunused"
|
||||||
)
|
)
|
||||||
target_compile_options(appFBX2glTF PRIVATE
|
target_compile_options(appFBX2glTF PRIVATE
|
||||||
"-Wno-null-dereference"
|
"-Wno-null-dereference"
|
||||||
"-Wunused"
|
"-Wunused"
|
||||||
)
|
)
|
||||||
endif()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(libFBX2glTF
|
target_link_libraries(libFBX2glTF
|
||||||
${FRAMEWORKS}
|
${FRAMEWORKS}
|
||||||
boost_filesystem::boost_filesystem
|
Boost::filesystem
|
||||||
boost_optional::boost_optional
|
Boost::optional
|
||||||
${DRACO_LIB}
|
draco::draco
|
||||||
optimized ${FBXSDK_LIBRARY}
|
optimized ${FBXSDK_LIBRARY}
|
||||||
debug ${FBXSDK_LIBRARY_DEBUG}
|
debug ${FBXSDK_LIBRARY_DEBUG}
|
||||||
fmt::fmt
|
fmt::fmt-header-only
|
||||||
libxml2::libxml2
|
LibXml2::LibXml2
|
||||||
zlib::zlib
|
ZLIB::ZLIB
|
||||||
${CMAKE_DL_LIBS}
|
nlohmann-fifo-map::nlohmann-fifo-map
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_DL_LIBS}
|
||||||
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
find_package(Iconv MODULE REQUIRED)
|
find_package(Iconv MODULE REQUIRED)
|
||||||
target_link_libraries(libFBX2glTF Iconv)
|
target_link_libraries(libFBX2glTF Iconv)
|
||||||
else()
|
else ()
|
||||||
find_package(libiconv MODULE REQUIRED)
|
find_package(unofficial-iconv CONFIG REQUIRED)
|
||||||
target_link_libraries(libFBX2glTF libiconv::libiconv)
|
target_link_libraries(libFBX2glTF unofficial::iconv::libiconv unofficial::iconv::libcharset)
|
||||||
endif()
|
endif ()
|
||||||
|
|
||||||
target_include_directories(libFBX2glTF PUBLIC
|
target_include_directories(libFBX2glTF PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
target_include_directories(libFBX2glTF SYSTEM PUBLIC
|
target_include_directories(libFBX2glTF SYSTEM PUBLIC
|
||||||
"third_party/stb"
|
"third_party/stb"
|
||||||
"third_party/json"
|
"third_party/json"
|
||||||
${FBXSDK_INCLUDE_DIR}
|
${FBXSDK_INCLUDE_DIR}
|
||||||
${DRACO_INCLUDE_DIR}
|
${MATHFU_INCLUDE_DIRS}
|
||||||
${MATHFU_INCLUDE_DIRS}
|
${CPPCODEC_INCLUDE_DIRS}
|
||||||
${FIFO_MAP_INCLUDE_DIR}
|
${draco_INCLUDE_DIRS}
|
||||||
${CPPCODEC_INCLUDE_DIR}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(appFBX2glTF PUBLIC
|
target_include_directories(appFBX2glTF PUBLIC
|
||||||
"third_party/CLI11"
|
"third_party/CLI11"
|
||||||
)
|
)
|
||||||
target_link_libraries(appFBX2glTF libFBX2glTF)
|
target_link_libraries(appFBX2glTF libFBX2glTF)
|
||||||
|
|
||||||
install (TARGETS libFBX2glTF appFBX2glTF
|
install(TARGETS libFBX2glTF appFBX2glTF
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
)
|
)
|
||||||
|
|
|
@ -24,7 +24,7 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED FBXSDK_VERSION)
|
if (NOT DEFINED FBXSDK_VERSION)
|
||||||
set(FBXSDK_VERSION "2019.2")
|
set(FBXSDK_VERSION "2020.3.7")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(_fbxsdk_vstudio_version "vs2017")
|
set(_fbxsdk_vstudio_version "vs2017")
|
||||||
|
@ -43,8 +43,8 @@ set(FBXSDK_WINDOWS_ROOT "${FBXSDK_SDKS_ABS}/Windows/${FBXSDK_VERSION}")
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(_fbxsdk_root "${FBXSDK_APPLE_ROOT}")
|
set(_fbxsdk_root "${FBXSDK_APPLE_ROOT}")
|
||||||
set(_fbxsdk_libdir_debug "lib/clang/debug")
|
set(_fbxsdk_libdir_debug "lib/debug")
|
||||||
set(_fbxsdk_libdir_release "lib/clang/release")
|
set(_fbxsdk_libdir_release "lib/release")
|
||||||
set(_fbxsdk_libname_debug "libfbxsdk.a")
|
set(_fbxsdk_libname_debug "libfbxsdk.a")
|
||||||
set(_fbxsdk_libname_release "libfbxsdk.a")
|
set(_fbxsdk_libname_release "libfbxsdk.a")
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
|
@ -61,11 +61,11 @@ elseif (WIN32)
|
||||||
elseif (UNIX)
|
elseif (UNIX)
|
||||||
set(_fbxsdk_root "${FBXSDK_LINUX_ROOT}")
|
set(_fbxsdk_root "${FBXSDK_LINUX_ROOT}")
|
||||||
if (ARCH_32)
|
if (ARCH_32)
|
||||||
set(_fbxsdk_libdir_debug "lib/gcc/x86/debug")
|
set(_fbxsdk_libdir_debug "lib/debug")
|
||||||
set(_fbxsdk_libdir_release "lib/gcc/x86/release")
|
set(_fbxsdk_libdir_release "lib/release")
|
||||||
else()
|
else()
|
||||||
set(_fbxsdk_libdir_debug "lib/gcc/x64/debug")
|
set(_fbxsdk_libdir_debug "lib/debug")
|
||||||
set(_fbxsdk_libdir_release "lib/gcc/x64/release")
|
set(_fbxsdk_libdir_release "lib/release")
|
||||||
endif()
|
endif()
|
||||||
set(_fbxsdk_libname_debug "libfbxsdk.a")
|
set(_fbxsdk_libname_debug "libfbxsdk.a")
|
||||||
set(_fbxsdk_libname_release "libfbxsdk.a")
|
set(_fbxsdk_libname_release "libfbxsdk.a")
|
||||||
|
|
71
README.md
71
README.md
|
@ -144,51 +144,44 @@ We currently depend on the open source projects
|
||||||
and [fmt](https://github.com/fmtlib/fmt);
|
and [fmt](https://github.com/fmtlib/fmt);
|
||||||
all of which are automatically downloaded and/or built.
|
all of which are automatically downloaded and/or built.
|
||||||
|
|
||||||
**At present, only version 2019.2 of the FBX SDK is supported**. The
|
**At present, only version 2020.3.7 of the FBX SDK is supported**. The
|
||||||
build system will not successfully locate any other version.
|
build system will not successfully locate any other version.
|
||||||
|
|
||||||
### Linux and MacOS X
|
### Linux and MacOS X
|
||||||
|
|
||||||
Your development environment will need to have:
|
1. Init vcpkg root
|
||||||
|
```shell
|
||||||
- build essentials (gcc for Linux, clang for Mac)
|
git clone https://github.com/microsoft/vcpkg
|
||||||
- cmake
|
export VCPKG_ROOT=/path/to/vcpkg
|
||||||
- python 3.\* and associated pip3/pip command
|
export PATH=${VCPKG_ROOT}:${PATH}
|
||||||
- zstd
|
|
||||||
|
|
||||||
Then, compilation on Unix machines will look something like:
|
|
||||||
|
|
||||||
```
|
|
||||||
# Determine SDK location & build settings for Linux vs (Recent) Mac OS X
|
|
||||||
> if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
||||||
export CONAN_CONFIG="-s compiler=apple-clang -s compiler.version=10.0 -s compiler.libcxx=libc++"
|
|
||||||
export FBXSDK_TARBALL="https://github.com/zellski/FBXSDK-Darwin/archive/2019.2.tar.gz"
|
|
||||||
elif [[ "$OSTYPE" == "linux"* ]]; then
|
|
||||||
export CONAN_CONFIG="-s compiler.libcxx=libstdc++11"
|
|
||||||
export FBXSDK_TARBALL="https://github.com/zellski/FBXSDK-Linux/archive/2019.2.tar.gz"
|
|
||||||
else
|
|
||||||
echo "This snippet only handles Mac OS X and Linux."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fetch Project
|
|
||||||
> git clone https://github.com/facebookincubator/FBX2glTF.git
|
|
||||||
> cd FBX2glTF
|
|
||||||
|
|
||||||
# Fetch and unpack FBX SDK
|
|
||||||
> curl -sL "${FBXSDK_TARBALL}" | tar xz --strip-components=1 --include */sdk/
|
|
||||||
# Then decompress the contents
|
|
||||||
> zstd -d -r --rm sdk
|
|
||||||
|
|
||||||
# Install and configure Conan, if needed
|
|
||||||
> pip3 install conan # or sometimes just "pip"; you may need to install Python/PIP
|
|
||||||
> conan remote add --force bincrafters https://api.bintray.com/conan/bincrafters/public-conan
|
|
||||||
|
|
||||||
# Initialize & run build
|
|
||||||
> conan install . -i build -s build_type=Release ${CONAN_CONFIG}
|
|
||||||
> conan build . -bf build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
If all goes well, you will end up with a statically linked executable in `./build/FBX2glTF`.
|
2. Init Autodesk SDK 2020.3.7
|
||||||
|
```shell
|
||||||
|
wget https://damassets.autodesk.net/content/dam/autodesk/www/files/fbx202037_fbxsdk_gcc_linux.tar.gz # Linux
|
||||||
|
wget https://damassets.autodesk.net/content/dam/autodesk/www/files/fbx202037_fbxsdk_clang_mac.pkg.tgz # macOS
|
||||||
|
tar -xvf /path/to/AutodeskFBXSDK
|
||||||
|
# Install using pkg if macOS
|
||||||
|
# Install using shell command if Linux
|
||||||
|
echo "yes\n\n" | ./fbx202037_fbxsdk_gcc_linux /path/to/autodeskfbxsdk/install
|
||||||
|
cp /path/to/autodeskfbxsdk/install/include sdk/Linux/2020.3.7
|
||||||
|
cp /path/to/autodeskfbxsdk/install/lib sdk/Linux/2020.3.7
|
||||||
|
```
|
||||||
|
3. Run cmake
|
||||||
|
```shell
|
||||||
|
cmake .
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Run make
|
||||||
|
```shell
|
||||||
|
make -j$(nproc)
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Test
|
||||||
|
```shell
|
||||||
|
# if we prepared fbx in /input.fbx
|
||||||
|
./FBX2glTF ./FBX2glTF --binary --verbose --keep-attribute --draco --input /input.fbx --output /output.glb
|
||||||
|
```
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include "mathfu.hpp"
|
#include "mathfu.hpp"
|
||||||
|
|
||||||
// give all modules access to our tweaked JSON
|
// give all modules access to our tweaked JSON
|
||||||
#include <fifo_map.hpp>
|
#include <nlohmann/fifo_map.hpp>
|
||||||
#include <json.hpp>
|
#include <json.hpp>
|
||||||
|
|
||||||
template <class K, class V, class ignore, class A>
|
template <class K, class V, class ignore, class A>
|
||||||
|
|
|
@ -41,12 +41,10 @@ struct PrimitiveData {
|
||||||
int8_t componentCount = attribute.glType.count;
|
int8_t componentCount = attribute.glType.count;
|
||||||
att.Init(
|
att.Init(
|
||||||
attribute.dracoAttribute,
|
attribute.dracoAttribute,
|
||||||
nullptr,
|
|
||||||
componentCount,
|
componentCount,
|
||||||
attribute.dracoComponentType,
|
attribute.dracoComponentType,
|
||||||
false,
|
false,
|
||||||
componentCount * draco::DataTypeLength(attribute.dracoComponentType),
|
componentCount * draco::DataTypeLength(attribute.dracoComponentType));
|
||||||
0);
|
|
||||||
|
|
||||||
const int dracoAttId = dracoMesh->AddAttribute(att, true, to_uint32(attribArr.size()));
|
const int dracoAttId = dracoMesh->AddAttribute(att, true, to_uint32(attribArr.size()));
|
||||||
draco::PointAttribute* attPtr = dracoMesh->attribute(dracoAttId);
|
draco::PointAttribute* attPtr = dracoMesh->attribute(dracoAttId);
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"default-registry": {
|
||||||
|
"kind": "git",
|
||||||
|
"baseline": "d7112d1a4fb50410d3639f5f586972591d848beb",
|
||||||
|
"repository": "https://github.com/microsoft/vcpkg"
|
||||||
|
},
|
||||||
|
"registries": [
|
||||||
|
{
|
||||||
|
"kind": "artifact",
|
||||||
|
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
|
||||||
|
"name": "microsoft"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"dependencies": [
|
||||||
|
"boost-filesystem",
|
||||||
|
"boost-optional",
|
||||||
|
"cppcodec",
|
||||||
|
"draco",
|
||||||
|
"fmt",
|
||||||
|
"libiconv",
|
||||||
|
"libxml2",
|
||||||
|
"nlohmann-fifo-map",
|
||||||
|
"zlib"
|
||||||
|
],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"name": "fmt",
|
||||||
|
"version": "5.3.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "libiconv",
|
||||||
|
"version": "1.15-6"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue