mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 03:55:53 +08:00
Begin supporting draco.
This commit is contained in:
parent
b864ea7349
commit
7ae7110800
@ -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
|
||||
|
@ -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!.
|
||||
//
|
||||
@ -1070,6 +1071,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user