Skip to content

Commit

Permalink
Update Draco to 1.2.1
Browse files Browse the repository at this point in the history
* Javascript and WebAssembly decoder size reduced by 35%
* Added specialized Javascript and Webassembly decoders for GLTF (size
reduction about 50% compared to the previous version)
  • Loading branch information
ondys committed Nov 13, 2017
1 parent 8492a2b commit a7c0d80
Show file tree
Hide file tree
Showing 101 changed files with 853 additions and 291 deletions.
43 changes: 34 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,36 @@ option(ENABLE_MESH_COMPRESSION "" ON)
option(ENABLE_POINT_CLOUD_COMPRESSION "" ON)
option(ENABLE_PREDICTIVE_EDGEBREAKER "" ON)
option(ENABLE_STANDARD_EDGEBREAKER "" ON)
option(ENABLE_BACKWARDS_COMPATIBILITY "" ON)
option(ENABLE_DECODER_ATTRIBUTE_DEDUPLICATION "" OFF)
option(ENABLE_TESTS "Enables tests." OFF)
option(ENABLE_WASM "" OFF)
option(ENABLE_WERROR "" OFF)
option(ENABLE_WEXTRA "" OFF)
option(IGNORE_EMPTY_BUILD_TYPE "" OFF)
option(BUILD_FOR_GLTF "" OFF)

if (ENABLE_POINT_CLOUD_COMPRESSION)
add_cxx_preproc_definition("DRACO_POINT_CLOUD_COMPRESSION_SUPPORTED")
endif ()
if (ENABLE_MESH_COMPRESSION)
add_cxx_preproc_definition("DRACO_MESH_COMPRESSION_SUPPORTED")
if (BUILD_FOR_GLTF)
# Override settings when building for GLTF.
add_cxx_preproc_definition("DRACO_MESH_COMPRESSION_SUPPORTED")
add_cxx_preproc_definition("DRACO_STANDARD_EDGEBREAKER_SUPPORTED")
else ()
if (ENABLE_POINT_CLOUD_COMPRESSION)
add_cxx_preproc_definition("DRACO_POINT_CLOUD_COMPRESSION_SUPPORTED")
endif ()
if (ENABLE_MESH_COMPRESSION)
add_cxx_preproc_definition("DRACO_MESH_COMPRESSION_SUPPORTED")

if (ENABLE_STANDARD_EDGEBREAKER)
add_cxx_preproc_definition("DRACO_STANDARD_EDGEBREAKER_SUPPORTED")
if (ENABLE_STANDARD_EDGEBREAKER)
add_cxx_preproc_definition("DRACO_STANDARD_EDGEBREAKER_SUPPORTED")
endif ()
if (ENABLE_PREDICTIVE_EDGEBREAKER)
add_cxx_preproc_definition("DRACO_PREDICTIVE_EDGEBREAKER_SUPPORTED")
endif ()
endif ()
if (ENABLE_PREDICTIVE_EDGEBREAKER)
add_cxx_preproc_definition("DRACO_PREDICTIVE_EDGEBREAKER_SUPPORTED")

if (ENABLE_BACKWARDS_COMPATIBILITY)
add_cxx_preproc_definition("DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED")
endif ()
endif ()

Expand Down Expand Up @@ -669,6 +682,13 @@ if (EMSCRIPTEN)
append_link_flag_to_target(draco_encoder
"-s EXPORT_NAME=\"'DracoEncoderModule'\"")

target_compile_definitions(draco_encoder PRIVATE
DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED)
if (ENABLE_DECODER_ATTRIBUTE_DEDUPLICATION)
target_compile_definitions(draco_decoder PRIVATE
DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED)
endif ()

# Make $draco_js_sources source files depend on glue_decoder.cpp.
set_property(SOURCE ${draco_js_sources} APPEND PROPERTY OBJECT_DEPENDS
${draco_build_dir}/glue_decoder.cpp)
Expand Down Expand Up @@ -794,6 +814,11 @@ else ()
draco_dec_config
draco_enc_config)

# For now, enable deduplication for both encoder and decoder.
# TODO(ostava): Support for disabling attribute deduplication for the C++
# decoder is planned in future releases.
add_preproc_definition(DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED)

if (BUILD_SHARED_LIBS)
set_target_properties(dracodec PROPERTIES SOVERSION 1)
set_target_properties(dracoenc PROPERTIES SOVERSION 1)
Expand Down
2 changes: 2 additions & 0 deletions Makefile.encoder.emcc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ else ifeq ($(DRACO_CONFIG), full_point_cloud)
else
DRACO_CONFIG_DEFINES := $(DRACO_FULL_CONFIG_DEFINES)
endif

DRACO_CONFIG_DEFINES += -DDRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
#########

DEFINES := $(DRACO_CONFIG_DEFINES)
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@

News
=======
### Version 1.2.0 release
The latest version of Draco brings a number of new compression enhancements and readies Draco for glTF 2.0 assets
* Improved compression:
* 5% improved compression for small assets
* Enhancements for upcoming Draco glTF2.0 extension
* Fixed Android build issues
* New, easier to use DRACOLoader.js
### Version 1.2.1 release
The latest version of Draco brings a number of enhancements to reduce decoder size and various other fixes
* Javascript and WebAssembly decoder size reduced by 35%
* Added specialized Javascript and Webassembly decoders for GLTF (size reduction about 50% compared to the previous version)

Description
===========
Expand Down
16 changes: 7 additions & 9 deletions javascript/draco_decoder.js

Large diffs are not rendered by default.

Binary file modified javascript/draco_decoder.wasm
Binary file not shown.
28 changes: 28 additions & 0 deletions javascript/draco_decoder_gltf.js

Large diffs are not rendered by default.

Binary file added javascript/draco_decoder_gltf.wasm
Binary file not shown.
15 changes: 7 additions & 8 deletions javascript/draco_encoder.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions javascript/draco_wasm_wrapper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a7c0d80

Please sign in to comment.