Merge branch 'draco' of https://github.com/abwood/tinygltf into draco

This commit is contained in:
Alex Wood 2019-01-24 15:40:28 -05:00
commit df39e04e7b
2 changed files with 14 additions and 1 deletions

View File

@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.5)
project(glview)
set ( CMAKE_PREFIX_PATH cmake )
set ( DRACO_DIR "" CACHE STRING "Path to draco" )
find_package ( GLEW REQUIRED )
find_package ( GLFW3 REQUIRED )
find_package ( OpenGL REQUIRED )
@ -21,6 +23,12 @@ endif (APPLE)
set(CMAKE_CXX_STANDARD 11)
if (${DRACO_DIR} STREQUAL "")
else ()
add_definitions(-DTINYGLTF_USE_DRACO)
include_directories(${DRACO_DIR}/include)
endif ()
include_directories(
../../
../common

View File

@ -26,6 +26,7 @@
// THE SOFTWARE.
// Version:
// - v2.1.0 Add draco compression.
// - v2.0.1 Add comparsion feature(Thanks to @Selmar).
// - v2.0.0 glTF 2.0!.
//
@ -1077,6 +1078,10 @@ class TinyGLTF {
#include "stb_image_write.h"
#endif
#ifdef TINYGLTF_USE_DRACO
#include "draco/compression/decode.h"
#endif // TINYGLTF_USE_DRACO
#ifdef __clang__
#pragma clang diagnostic pop
#endif