From d49ad6c93ee1eaf4cbce3fc49320f70516c724c0 Mon Sep 17 00:00:00 2001 From: Alexandr Arutjunov Date: Fri, 9 Sep 2016 16:38:43 +0300 Subject: [PATCH] [*] Stylistic changes. [F] Added all files from Open3DGC codec to CMakeLists.txt --- code/CMakeLists.txt | 27 +++++++++++++++++++++++++-- code/glTFAsset.inl | 5 +++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 83ced24..a9d8458 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1,4 +1,4 @@ -# Open Asset Import Library (assimp) +# Open Asset Import Library (assimp) # ---------------------------------------------------------------------- # # Copyright (c) 2006-2016, assimp team @@ -702,12 +702,35 @@ SET ( openddl_parser_SRCS SOURCE_GROUP( openddl_parser FILES ${openddl_parser_SRCS}) SET ( open3dgc_SRCS + ../contrib/Open3DGC/o3dgcAdjacencyInfo.h ../contrib/Open3DGC/o3dgcArithmeticCodec.cpp + ../contrib/Open3DGC/o3dgcArithmeticCodec.h + ../contrib/Open3DGC/o3dgcBinaryStream.h + ../contrib/Open3DGC/o3dgcCommon.h + ../contrib/Open3DGC/o3dgcDVEncodeParams.h ../contrib/Open3DGC/o3dgcDynamicVectorDecoder.cpp + ../contrib/Open3DGC/o3dgcDynamicVectorDecoder.h ../contrib/Open3DGC/o3dgcDynamicVectorEncoder.cpp + ../contrib/Open3DGC/o3dgcDynamicVectorEncoder.h + ../contrib/Open3DGC/o3dgcDynamicVector.h + ../contrib/Open3DGC/o3dgcFIFO.h + ../contrib/Open3DGC/o3dgcIndexedFaceSet.h + ../contrib/Open3DGC/o3dgcIndexedFaceSet.inl + ../contrib/Open3DGC/o3dgcSC3DMCDecoder.h + ../contrib/Open3DGC/o3dgcSC3DMCDecoder.inl + ../contrib/Open3DGC/o3dgcSC3DMCEncodeParams.h + ../contrib/Open3DGC/o3dgcSC3DMCEncoder.h + ../contrib/Open3DGC/o3dgcSC3DMCEncoder.inl + ../contrib/Open3DGC/o3dgcTimer.h ../contrib/Open3DGC/o3dgcTools.cpp ../contrib/Open3DGC/o3dgcTriangleFans.cpp - ../contrib/Open3DGC/o3dgcTimer.h + ../contrib/Open3DGC/o3dgcTriangleFans.h + ../contrib/Open3DGC/o3dgcTriangleListDecoder.h + ../contrib/Open3DGC/o3dgcTriangleListDecoder.inl + ../contrib/Open3DGC/o3dgcTriangleListEncoder.h + ../contrib/Open3DGC/o3dgcTriangleListEncoder.inl + ../contrib/Open3DGC/o3dgcVector.h + ../contrib/Open3DGC/o3dgcVector.inl ) SOURCE_GROUP( open3dgc FILES ${open3dgc_SRCS}) diff --git a/code/glTFAsset.inl b/code/glTFAsset.inl index 89d5611..486f963 100644 --- a/code/glTFAsset.inl +++ b/code/glTFAsset.inl @@ -489,9 +489,10 @@ inline uint8_t* Accessor::GetPointer() if(bufferView->buffer->EncodedRegion_Current != nullptr) { const size_t begin = bufferView->buffer->EncodedRegion_Current->Offset; - const size_t end = bufferView->buffer->EncodedRegion_Current->Offset + bufferView->buffer->EncodedRegion_Current->DecodedData_Length; + const size_t end = begin + bufferView->buffer->EncodedRegion_Current->DecodedData_Length; - if((offset >= begin) && (offset < end)) return &bufferView->buffer->EncodedRegion_Current->DecodedData[offset - begin]; + if((offset >= begin) && (offset < end)) + return &bufferView->buffer->EncodedRegion_Current->DecodedData[offset - begin]; } return basePtr + offset; -- 2.7.4