From 32b1579c8086d57e5bfcde4074c5c1d37c7e6f0c Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Fri, 20 Mar 2015 21:05:25 +0100 Subject: [PATCH 01/22] install the android NDK --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b595600e7..02b297fb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,9 @@ branches: - master env: - matrix: + global: + - PV=r8e PLATF=linux-x86_64 NDK_HOME=${TRAVIS_BUILD_DIR}/android-ndk-${PV} PATH=${PATH}:${NDK_HOME} + matrix: - LINUX=1 TRAVIS_NO_EXPORT=YES - LINUX=1 TRAVIS_NO_EXPORT=NO - LINUX=1 TRAVIS_STATIC_BUILD=ON @@ -15,6 +17,7 @@ env: - WINDOWS=1 TRAVIS_NO_EXPORT=NO - WINDOWS=1 TRAVIS_STATIC_BUILD=ON - WINDOWS=1 TRAVIS_STATIC_BUILD=OFF + - ANDROID=1 language: cpp @@ -24,6 +27,7 @@ compiler: install: - if [ $WINDOWS ]; then travis_retry sudo apt-get install -q -y gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64; fi + - if [ $ANDROID ]; then wget -c http://dl.google.com/android/ndk/android-ndk-${PV}-${PLATF}.tar.bz2 && tar xf android-ndk-${PV}-${PLATF}.tar.bz2 ; fi script: - cmake -G "Unix Makefiles" -DASSIMP_ENABLE_BOOST_WORKAROUND=YES -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -STATIC_BUILD=$TRAVIS_STATIC_BUILD From 1ddcbf49da22713265897620c00e8dd08a120186 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Fri, 20 Mar 2015 21:11:08 +0100 Subject: [PATCH 02/22] use ant to compile jassimp --- .travis.yml | 2 +- port/jassimp/build.xml | 92 +++++++++++++++++++++++------------------- 2 files changed, 51 insertions(+), 43 deletions(-) diff --git a/.travis.yml b/.travis.yml index 02b297fb4..596ceb811 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,4 +42,4 @@ script: - echo "==========================================================" - echo "REGRESSION TEST FAILS (results/run_regression_suite_failures.csv)" - cat ../results/run_regression_suite_failures.csv - + - if [ $ANDROID ]; then ant -v -Dbasedir=${TRAVIS_BUILD_DIR} -f port/jassimp/build.xml ndk-jni ; fi diff --git a/port/jassimp/build.xml b/port/jassimp/build.xml index d81d1958a..372440091 100644 --- a/port/jassimp/build.xml +++ b/port/jassimp/build.xml @@ -1,45 +1,53 @@ - - - - - - - - - + + + + + + + + - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 23797dc8ccc7ec3bf03fd6b25e6d3223ffc95623 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Fri, 20 Mar 2015 21:15:57 +0100 Subject: [PATCH 03/22] for sure jassimp needs the assimp lib too --- workspaces/Android-NDK/jni/Android.mk | 129 ++++++++++++++++++++++ workspaces/Android-NDK/jni/Application.mk | 11 ++ 2 files changed, 140 insertions(+) create mode 100755 workspaces/Android-NDK/jni/Android.mk create mode 100755 workspaces/Android-NDK/jni/Application.mk diff --git a/workspaces/Android-NDK/jni/Android.mk b/workspaces/Android-NDK/jni/Android.mk new file mode 100755 index 000000000..764760e60 --- /dev/null +++ b/workspaces/Android-NDK/jni/Android.mk @@ -0,0 +1,129 @@ +LOCAL_PATH := $(call my-dir)/../../../ + +include $(CLEAR_VARS) +LOCAL_MODULE := assimp_static +ASSIMP_SRC_DIR = code +FILE_LIST := $(wildcard $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/*.cpp) + +IGNORE_LIST := $(wildcard $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/C4D*.cpp) +EXCLUDES := $(IGNORE_LIST:$(LOCAL_PATH)/%=%) +ALL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%) +LOCAL_SRC_FILES := $(filter-out $(EXCLUDES), $(ALL_SRC_FILES)) + +LOCAL_SRC_FILES += contrib/clipper/clipper.cpp \ + contrib/ConvertUTF/ConvertUTF.c \ + contrib/unzip/ioapi.c \ + contrib/unzip/unzip.c \ + contrib/irrXML/irrXML.cpp \ + contrib/poly2tri/poly2tri/sweep/advancing_front.cc \ + contrib/poly2tri/poly2tri/sweep/sweep_context.cc \ + contrib/poly2tri/poly2tri/sweep/sweep.cc \ + contrib/poly2tri/poly2tri/sweep/cdt.cc \ + contrib/poly2tri/poly2tri/common/shapes.cc + + +# enables -frtti and -fexceptions +LOCAL_CPP_FEATURES := exceptions + +# cant be disabled? rudamentary function? +# -DASSIMP_BUILD_NO_FLIPWINDING_PROCESS \ +# +DontBuildProcess = \ + -DASSIMP_BUILD_NO_FLIPUVS_PROCESS \ + -DASSIMP_BUILD_NO_MAKELEFTHANDED_PROCESS \ + -DASSIMP_BUILD_NO_CALCTANGENTS_PROCESS \ + -DASSIMP_BUILD_NO_DEBONE_PROCESS \ + -DASSIMP_BUILD_NO_FINDDEGENERATES_PROCESS \ + -DASSIMP_BUILD_NO_FINDINSTANCES_PROCESS \ + -DASSIMP_BUILD_NO_FINDINVALIDDATA_PROCESS \ + -DASSIMP_BUILD_NO_FIXINFACINGNORMALS_PROCESS \ + -DASSIMP_BUILD_NO_GENFACENORMALS_PROCESS \ + -DASSIMP_BUILD_NO_GENUVCOORDS_PROCESS \ + -DASSIMP_BUILD_NO_GENVERTEXNORMALS_PROCESS \ + -DASSIMP_BUILD_NO_IMPROVECACHELOCALITY_PROCESS \ + -DASSIMP_BUILD_NO_JOINVERTICES_PROCESS \ + -DASSIMP_BUILD_NO_LIMITBONEWEIGHTS_PROCESS \ + -DASSIMP_BUILD_NO_OPTIMIZEGRAPH_PROCESS \ + -DASSIMP_BUILD_NO_OPTIMIZEMESHES_PROCESS \ + -DASSIMP_BUILD_NO_PRETRANSFORMVERTICES_PROCESS \ + -DASSIMP_BUILD_NO_REMOVEVC_PROCESS \ + -DASSIMP_BUILD_NO_REMOVE_REDUNDANTMATERIALS_PROCESS \ + -DASSIMP_BUILD_NO_SORTBYPTYPE_PROCESS \ + -DASSIMP_BUILD_NO_SPLITBYBONECOUNT_PROCESS \ + -DASSIMP_BUILD_NO_SPLITLARGEMESHES_PROCESS \ + -DASSIMP_BUILD_NO_TRANSFORMTEXCOORDS_PROCESS \ + -DASSIMP_BUILD_NO_TRIANGULATE_PROCESS \ + -DASSIMP_BUILD_NO_VALIDATEDS_PROCESS + +DontBuildImporters = \ + -DASSIMP_BUILD_NO_X_IMPORTER \ + -DASSIMP_BUILD_NO_3DS_IMPORTER \ + -DASSIMP_BUILD_NO_MD3_IMPORTER \ + -DASSIMP_BUILD_NO_MDL_IMPORTER \ + -DASSIMP_BUILD_NO_MD2_IMPORTER \ + -DASSIMP_BUILD_NO_PLY_IMPORTER \ + -DASSIMP_BUILD_NO_ASE_IMPORTER \ + -DASSIMP_BUILD_NO_HMP_IMPORTER \ + -DASSIMP_BUILD_NO_SMD_IMPORTER \ + -DASSIMP_BUILD_NO_MDC_IMPORTER \ + -DASSIMP_BUILD_NO_MD5_IMPORTER \ + -DASSIMP_BUILD_NO_STL_IMPORTER \ + -DASSIMP_BUILD_NO_LWO_IMPORTER \ + -DASSIMP_BUILD_NO_DXF_IMPORTER \ + -DASSIMP_BUILD_NO_NFF_IMPORTER \ + -DASSIMP_BUILD_NO_RAW_IMPORTER \ + -DASSIMP_BUILD_NO_OFF_IMPORTER \ + -DASSIMP_BUILD_NO_AC_IMPORTER \ + -DASSIMP_BUILD_NO_BVH_IMPORTER \ + -DASSIMP_BUILD_NO_IRRMESH_IMPORTER \ + -DASSIMP_BUILD_NO_IRR_IMPORTER \ + -DASSIMP_BUILD_NO_Q3D_IMPORTER \ + -DASSIMP_BUILD_NO_B3D_IMPORTER \ + -DASSIMP_BUILD_NO_COLLADA_IMPORTER \ + -DASSIMP_BUILD_NO_TERRAGEN_IMPORTER \ + -DASSIMP_BUILD_NO_CSM_IMPORTER \ + -DASSIMP_BUILD_NO_3D_IMPORTER \ + -DASSIMP_BUILD_NO_LWS_IMPORTER \ + -DASSIMP_BUILD_NO_OGRE_IMPORTER \ + -DASSIMP_BUILD_NO_MS3D_IMPORTER \ + -DASSIMP_BUILD_NO_COB_IMPORTER \ + -DASSIMP_BUILD_NO_Q3BSP_IMPORTER \ + -DASSIMP_BUILD_NO_NDO_IMPORTER \ + -DASSIMP_BUILD_NO_IFC_IMPORTER \ + -DASSIMP_BUILD_NO_XGL_IMPORTER \ + -DASSIMP_BUILD_NO_FBX_IMPORTER \ + -DASSIMP_BUILD_NO_C4D_IMPORTER \ + -DASSIMP_BUILD_NO_OPENGEX_IMPORTER \ + -DASSIMP_BUILD_NO_ASSBIN_IMPORTER +# -DASSIMP_BUILD_NO_BLEND_IMPORTER \ +# -DASSIMP_BUILD_NO_GEO_IMPORTER +# -DASSIMP_BUILD_NO_OBJ_IMPORTER \ +# +#DontBuildImporters := -DASSIMP_BUILD_NO_IFC_IMPORTER -DASSIMP_BUILD_NO_IRRMESH_IMPORTER -DASSIMP_BUILD_NO_IRR_IMPORTER -DASSIMP_BUILD_NO_C4D_IMPORTER -DASSIMP_BUILD_NO_OPENGEX_IMPORTER + +ASSIMP_FLAGS_3_0 = -DASSIMP_BUILD_DLL_EXPORT -DASSIMP_BUILD_NO_OWN_ZLIB -DASSIMP_BUILD_BOOST_WORKAROUND -Dassimp_EXPORTS -fPIC -fvisibility=hidden -Wall # $(DontBuildProcess) +ASSIMP_FLAGS_3_1 = $(ASSIMP_FLAGS_3_0) # -DASSIMP_BUILD_BLENDER_DEBUG # -DASSIMP_BUILD_NO_EXPORT + +LOCAL_CFLAGS += $(ASSIMP_FLAGS_3_1) $(DontBuildImporters) -DASSIMP_BUILD_NO_EXPORT +#LOCAL_CXXFLAGS += $(ASSIMP_FLAGS_3_1) # -funwind-tables + +LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/BoostWorkaround ./ +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/BoostWorkaround + +include $(BUILD_STATIC_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_MODULE := assimp + +LOCAL_CFLAGS += -UASSIMP_BUILD_DLL_EXPORT +LOCAL_WHOLE_STATIC_LIBRARIES = assimp_static + +LOCAL_LDLIBS := -lz + +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/BoostWorkaround +include $(BUILD_SHARED_LIBRARY) + +-include $(LOCAL_PATH)/assimp_cmd.mk + +# let it on original place +include $(LOCAL_PATH)/port/jassimp/jassimp-native/Android.mk diff --git a/workspaces/Android-NDK/jni/Application.mk b/workspaces/Android-NDK/jni/Application.mk new file mode 100755 index 000000000..1e357dcbf --- /dev/null +++ b/workspaces/Android-NDK/jni/Application.mk @@ -0,0 +1,11 @@ +# NDK_TOOLCHAIN_VERSION=clang # fails on IFCBoolean.cpp and GEOColorTable.h ??? +#NDK_TOOLCHAIN_VERSION=4.8 +#NDK_TOOLCHAIN_VERSION=4.7 +#NDK_TOOLCHAIN_VERSION=4.6 + +APP_ABI := all +APP_ABI := x86 + +APP_STL := stlport_static + +#NDK_APP_OUT := /home/Video-HD/C-Backups/arris69_assimp.git/JassimpLibrary From f63607e94588cce0d98782e129675e7a62ad7ae3 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Fri, 20 Mar 2015 21:34:12 +0100 Subject: [PATCH 04/22] build don't starts? --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 596ceb811..554949030 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ before_install: - sudo apt-get install cmake python3 -branches: - only: - - master +#branches: +# only: +# - master env: global: From 2dda345bdb8cd230e14d6ceca38c54304f710f00 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Fri, 20 Mar 2015 21:41:23 +0100 Subject: [PATCH 05/22] build don't starts? (reverted branch setting) --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 554949030..596ceb811 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ before_install: - sudo apt-get install cmake python3 -#branches: -# only: -# - master +branches: + only: + - master env: global: From 448ce916c2742870f08b7308f8d1e741efbeb0b4 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Fri, 20 Mar 2015 22:06:03 +0100 Subject: [PATCH 06/22] build don't starts? (reverted branch setting) --- .travis.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 596ceb811..ba1227d3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,22 @@ before_install: - sudo apt-get install cmake python3 -branches: - only: - - master +#branches: +# only: +# - master env: global: - PV=r8e PLATF=linux-x86_64 NDK_HOME=${TRAVIS_BUILD_DIR}/android-ndk-${PV} PATH=${PATH}:${NDK_HOME} matrix: - - LINUX=1 TRAVIS_NO_EXPORT=YES - - LINUX=1 TRAVIS_NO_EXPORT=NO - - LINUX=1 TRAVIS_STATIC_BUILD=ON - - LINUX=1 TRAVIS_STATIC_BUILD=OFF - - WINDOWS=1 TRAVIS_NO_EXPORT=YES - - WINDOWS=1 TRAVIS_NO_EXPORT=NO - - WINDOWS=1 TRAVIS_STATIC_BUILD=ON - - WINDOWS=1 TRAVIS_STATIC_BUILD=OFF +# - LINUX=1 TRAVIS_NO_EXPORT=YES +# - LINUX=1 TRAVIS_NO_EXPORT=NO +# - LINUX=1 TRAVIS_STATIC_BUILD=ON +# - LINUX=1 TRAVIS_STATIC_BUILD=OFF +# - WINDOWS=1 TRAVIS_NO_EXPORT=YES +# - WINDOWS=1 TRAVIS_NO_EXPORT=NO +# - WINDOWS=1 TRAVIS_STATIC_BUILD=ON +# - WINDOWS=1 TRAVIS_STATIC_BUILD=OFF - ANDROID=1 language: cpp @@ -42,4 +42,4 @@ script: - echo "==========================================================" - echo "REGRESSION TEST FAILS (results/run_regression_suite_failures.csv)" - cat ../results/run_regression_suite_failures.csv - - if [ $ANDROID ]; then ant -v -Dbasedir=${TRAVIS_BUILD_DIR} -f port/jassimp/build.xml ndk-jni ; fi + - if [ $ANDROID ]; then ant -v -Dbasedir=${TRAVIS_BUILD_DIR} -f ${TRAVIS_BUILD_DIR}/port/jassimp/build.xml ndk-jni ; fi From 54dcc64d339da3c743c8e9b6a216055903c59ebf Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Fri, 20 Mar 2015 22:36:57 +0100 Subject: [PATCH 07/22] enable some importers, skip otherbuild for test/discuss --- .travis.yml | 29 ++++++++++++++------------- workspaces/Android-NDK/jni/Android.mk | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index ba1227d3e..01e14246d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,10 @@ before_install: - sudo apt-get install cmake python3 + - echo -e "#ifndef A_R_H_INC\n#define A_R_H_INC\n#define GitVersion ${TRAVIS_JOB_ID}\n#define GitBranch \"${TRAVIS_BRANCH}\"\n#endif // A_R_H_INC" > revision.h -#branches: -# only: -# - master +branches: + only: + - master env: global: @@ -30,16 +31,16 @@ install: - if [ $ANDROID ]; then wget -c http://dl.google.com/android/ndk/android-ndk-${PV}-${PLATF}.tar.bz2 && tar xf android-ndk-${PV}-${PLATF}.tar.bz2 ; fi script: - - cmake -G "Unix Makefiles" -DASSIMP_ENABLE_BOOST_WORKAROUND=YES -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -STATIC_BUILD=$TRAVIS_STATIC_BUILD - - make - - sudo make install - - sudo ldconfig - - cd test/unit - - ../../bin/unit - - cd ../regression - - chmod 755 run.py - - ./run.py +# - cmake -G "Unix Makefiles" -DASSIMP_ENABLE_BOOST_WORKAROUND=YES -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -STATIC_BUILD=$TRAVIS_STATIC_BUILD +# - make +# - sudo make install +# - sudo ldconfig +# - cd test/unit +# - ../../bin/unit +# - cd ../regression +# - chmod 755 run.py +# - ./run.py - echo "==========================================================" - - echo "REGRESSION TEST FAILS (results/run_regression_suite_failures.csv)" - - cat ../results/run_regression_suite_failures.csv +# - echo "REGRESSION TEST FAILS (results/run_regression_suite_failures.csv)" +# - cat ../results/run_regression_suite_failures.csv - if [ $ANDROID ]; then ant -v -Dbasedir=${TRAVIS_BUILD_DIR} -f ${TRAVIS_BUILD_DIR}/port/jassimp/build.xml ndk-jni ; fi diff --git a/workspaces/Android-NDK/jni/Android.mk b/workspaces/Android-NDK/jni/Android.mk index 764760e60..09f8eeb84 100755 --- a/workspaces/Android-NDK/jni/Android.mk +++ b/workspaces/Android-NDK/jni/Android.mk @@ -99,7 +99,7 @@ DontBuildImporters = \ # -DASSIMP_BUILD_NO_GEO_IMPORTER # -DASSIMP_BUILD_NO_OBJ_IMPORTER \ # -#DontBuildImporters := -DASSIMP_BUILD_NO_IFC_IMPORTER -DASSIMP_BUILD_NO_IRRMESH_IMPORTER -DASSIMP_BUILD_NO_IRR_IMPORTER -DASSIMP_BUILD_NO_C4D_IMPORTER -DASSIMP_BUILD_NO_OPENGEX_IMPORTER +DontBuildImporters := -DASSIMP_BUILD_NO_IFC_IMPORTER -DASSIMP_BUILD_NO_IRRMESH_IMPORTER -DASSIMP_BUILD_NO_IRR_IMPORTER -DASSIMP_BUILD_NO_C4D_IMPORTER -DASSIMP_BUILD_NO_OPENGEX_IMPORTER ASSIMP_FLAGS_3_0 = -DASSIMP_BUILD_DLL_EXPORT -DASSIMP_BUILD_NO_OWN_ZLIB -DASSIMP_BUILD_BOOST_WORKAROUND -Dassimp_EXPORTS -fPIC -fvisibility=hidden -Wall # $(DontBuildProcess) ASSIMP_FLAGS_3_1 = $(ASSIMP_FLAGS_3_0) # -DASSIMP_BUILD_BLENDER_DEBUG # -DASSIMP_BUILD_NO_EXPORT From f3ed79ab41ec5ae4caba5e36518dacf6c078d320 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Sat, 21 Mar 2015 10:32:15 +0100 Subject: [PATCH 08/22] make use of travis languages, build java jar too. https://github.com/assimp/assimp/pull/505#issuecomment-84198261 --- .travis.yml | 2 +- port/jassimp/build.xml | 5 +++-- workspaces/Android-NDK/jni/Application.mk | 13 +++++-------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 01e14246d..4254cef73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,4 +43,4 @@ script: - echo "==========================================================" # - echo "REGRESSION TEST FAILS (results/run_regression_suite_failures.csv)" # - cat ../results/run_regression_suite_failures.csv - - if [ $ANDROID ]; then ant -v -Dbasedir=${TRAVIS_BUILD_DIR} -f ${TRAVIS_BUILD_DIR}/port/jassimp/build.xml ndk-jni ; fi + - if [ $ANDROID ]; then ant -v -Dmy.dir=${TRAVIS_BUILD_DIR} -f ${TRAVIS_BUILD_DIR}/port/jassimp/build.xml ndk-jni ; fi diff --git a/port/jassimp/build.xml b/port/jassimp/build.xml index 372440091..1352e3ffa 100644 --- a/port/jassimp/build.xml +++ b/port/jassimp/build.xml @@ -7,6 +7,7 @@ + @@ -29,9 +30,9 @@ - + - + diff --git a/workspaces/Android-NDK/jni/Application.mk b/workspaces/Android-NDK/jni/Application.mk index 1e357dcbf..89b7f5e6a 100755 --- a/workspaces/Android-NDK/jni/Application.mk +++ b/workspaces/Android-NDK/jni/Application.mk @@ -1,11 +1,8 @@ -# NDK_TOOLCHAIN_VERSION=clang # fails on IFCBoolean.cpp and GEOColorTable.h ??? -#NDK_TOOLCHAIN_VERSION=4.8 -#NDK_TOOLCHAIN_VERSION=4.7 -#NDK_TOOLCHAIN_VERSION=4.6 +ifeq ($(TRAVIS_LANGUAGE),clang) + NDK_TOOLCHAIN_VERSION := $(TRAVIS_LANGUAGE) + $(info "Use llvm Compiler") +endif -APP_ABI := all -APP_ABI := x86 +APP_ABI := armeabi-v7a APP_STL := stlport_static - -#NDK_APP_OUT := /home/Video-HD/C-Backups/arris69_assimp.git/JassimpLibrary From 3e6043de70d4e2f941a303b6ddb19f236fde7c56 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Sat, 21 Mar 2015 10:54:46 +0100 Subject: [PATCH 09/22] use correct variable for compiler selection... --- workspaces/Android-NDK/jni/Application.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workspaces/Android-NDK/jni/Application.mk b/workspaces/Android-NDK/jni/Application.mk index 89b7f5e6a..3d264db1b 100755 --- a/workspaces/Android-NDK/jni/Application.mk +++ b/workspaces/Android-NDK/jni/Application.mk @@ -1,5 +1,5 @@ -ifeq ($(TRAVIS_LANGUAGE),clang) - NDK_TOOLCHAIN_VERSION := $(TRAVIS_LANGUAGE) +ifeq ($(CC),clang) + NDK_TOOLCHAIN_VERSION := $(CC) $(info "Use llvm Compiler") endif From 3bd1a791c0e2f86968329329eccaacd054151ac3 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Sat, 21 Mar 2015 11:08:06 +0100 Subject: [PATCH 10/22] gcc_struct, old fish, but reinterprated: https://github.com/assimp/assimp/commit/92f4c84488a11d863d2019093f01123d7688ff4b --- include/assimp/Compiler/pushpack1.h | 92 ++++++++++++++--------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/include/assimp/Compiler/pushpack1.h b/include/assimp/Compiler/pushpack1.h index 8bdb71293..e55202665 100644 --- a/include/assimp/Compiler/pushpack1.h +++ b/include/assimp/Compiler/pushpack1.h @@ -1,46 +1,46 @@ - - -// =============================================================================== -// May be included multiple times - sets structure packing to 1 -// for all supported compilers. #include reverts the changes. -// -// Currently this works on the following compilers: -// MSVC 7,8,9 -// GCC -// BORLAND (complains about 'pack state changed but not reverted', but works) -// Clang -// -// -// USAGE: -// -// struct StructToBePacked { -// } PACK_STRUCT; -// -// =============================================================================== - -#ifdef AI_PUSHPACK_IS_DEFINED -# error poppack1.h must be included after pushpack1.h -#endif - -#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) -# pragma pack(push,1) -# define PACK_STRUCT -#elif defined( __GNUC__ ) -# if defined(__clang__) -# define PACK_STRUCT __attribute__((__packed__)) -# else -# define PACK_STRUCT __attribute__((gcc_struct, __packed__)) -# endif -#else -# error Compiler not supported -#endif - -#if defined(_MSC_VER) - -// C4103: Packing was changed after the inclusion of the header, propably missing #pragma pop -# pragma warning (disable : 4103) -#endif - -#define AI_PUSHPACK_IS_DEFINED - - + + +// =============================================================================== +// May be included multiple times - sets structure packing to 1 +// for all supported compilers. #include reverts the changes. +// +// Currently this works on the following compilers: +// MSVC 7,8,9 +// GCC +// BORLAND (complains about 'pack state changed but not reverted', but works) +// Clang +// +// +// USAGE: +// +// struct StructToBePacked { +// } PACK_STRUCT; +// +// =============================================================================== + +#ifdef AI_PUSHPACK_IS_DEFINED +# error poppack1.h must be included after pushpack1.h +#endif + +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +# pragma pack(push,1) +# define PACK_STRUCT +#elif defined( __GNUC__ ) +# if !defined(HOST_MINGW) +# define PACK_STRUCT __attribute__((__packed__)) +# else +# define PACK_STRUCT __attribute__((gcc_struct, __packed__)) +# endif +#else +# error Compiler not supported +#endif + +#if defined(_MSC_VER) + +// C4103: Packing was changed after the inclusion of the header, propably missing #pragma pop +# pragma warning (disable : 4103) +#endif + +#define AI_PUSHPACK_IS_DEFINED + + From a7e4babd9d9694ca232a77439a226ce2c0830919 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Sat, 21 Mar 2015 11:08:06 +0100 Subject: [PATCH 11/22] gcc_struct, old fish, but reinterpreted: https://github.com/assimp/assimp/commit/92f4c84488a11d863d2019093f01123d7688ff4b --- include/assimp/Compiler/pushpack1.h | 92 ++++++++++++++--------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/include/assimp/Compiler/pushpack1.h b/include/assimp/Compiler/pushpack1.h index 8bdb71293..e55202665 100644 --- a/include/assimp/Compiler/pushpack1.h +++ b/include/assimp/Compiler/pushpack1.h @@ -1,46 +1,46 @@ - - -// =============================================================================== -// May be included multiple times - sets structure packing to 1 -// for all supported compilers. #include reverts the changes. -// -// Currently this works on the following compilers: -// MSVC 7,8,9 -// GCC -// BORLAND (complains about 'pack state changed but not reverted', but works) -// Clang -// -// -// USAGE: -// -// struct StructToBePacked { -// } PACK_STRUCT; -// -// =============================================================================== - -#ifdef AI_PUSHPACK_IS_DEFINED -# error poppack1.h must be included after pushpack1.h -#endif - -#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) -# pragma pack(push,1) -# define PACK_STRUCT -#elif defined( __GNUC__ ) -# if defined(__clang__) -# define PACK_STRUCT __attribute__((__packed__)) -# else -# define PACK_STRUCT __attribute__((gcc_struct, __packed__)) -# endif -#else -# error Compiler not supported -#endif - -#if defined(_MSC_VER) - -// C4103: Packing was changed after the inclusion of the header, propably missing #pragma pop -# pragma warning (disable : 4103) -#endif - -#define AI_PUSHPACK_IS_DEFINED - - + + +// =============================================================================== +// May be included multiple times - sets structure packing to 1 +// for all supported compilers. #include reverts the changes. +// +// Currently this works on the following compilers: +// MSVC 7,8,9 +// GCC +// BORLAND (complains about 'pack state changed but not reverted', but works) +// Clang +// +// +// USAGE: +// +// struct StructToBePacked { +// } PACK_STRUCT; +// +// =============================================================================== + +#ifdef AI_PUSHPACK_IS_DEFINED +# error poppack1.h must be included after pushpack1.h +#endif + +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +# pragma pack(push,1) +# define PACK_STRUCT +#elif defined( __GNUC__ ) +# if !defined(HOST_MINGW) +# define PACK_STRUCT __attribute__((__packed__)) +# else +# define PACK_STRUCT __attribute__((gcc_struct, __packed__)) +# endif +#else +# error Compiler not supported +#endif + +#if defined(_MSC_VER) + +// C4103: Packing was changed after the inclusion of the header, propably missing #pragma pop +# pragma warning (disable : 4103) +#endif + +#define AI_PUSHPACK_IS_DEFINED + + From 527bf8c255e04bb1806c53a887c27bb0845eef83 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Sat, 21 Mar 2015 12:35:29 +0100 Subject: [PATCH 12/22] bit cleanup and wait untip issue #506 is fixed --- workspaces/Android-NDK/jni/Android.mk | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/workspaces/Android-NDK/jni/Android.mk b/workspaces/Android-NDK/jni/Android.mk index 09f8eeb84..08a16bd55 100755 --- a/workspaces/Android-NDK/jni/Android.mk +++ b/workspaces/Android-NDK/jni/Android.mk @@ -24,6 +24,9 @@ LOCAL_SRC_FILES += contrib/clipper/clipper.cpp \ # enables -frtti and -fexceptions LOCAL_CPP_FEATURES := exceptions +# identifier 'nullptr' will become a keyword in C++0x [-Wc++0x-compat] +# but next breaks blender and other importer +# LOCAL_CFLAGS += -std=c++11 # cant be disabled? rudamentary function? # -DASSIMP_BUILD_NO_FLIPWINDING_PROCESS \ @@ -99,15 +102,14 @@ DontBuildImporters = \ # -DASSIMP_BUILD_NO_GEO_IMPORTER # -DASSIMP_BUILD_NO_OBJ_IMPORTER \ # -DontBuildImporters := -DASSIMP_BUILD_NO_IFC_IMPORTER -DASSIMP_BUILD_NO_IRRMESH_IMPORTER -DASSIMP_BUILD_NO_IRR_IMPORTER -DASSIMP_BUILD_NO_C4D_IMPORTER -DASSIMP_BUILD_NO_OPENGEX_IMPORTER +DontBuildImporters := -DASSIMP_BUILD_NO_IFC_IMPORTER -DASSIMP_BUILD_NO_IRRMESH_IMPORTER -DASSIMP_BUILD_NO_IRR_IMPORTER -DASSIMP_BUILD_NO_C4D_IMPORTER -ASSIMP_FLAGS_3_0 = -DASSIMP_BUILD_DLL_EXPORT -DASSIMP_BUILD_NO_OWN_ZLIB -DASSIMP_BUILD_BOOST_WORKAROUND -Dassimp_EXPORTS -fPIC -fvisibility=hidden -Wall # $(DontBuildProcess) -ASSIMP_FLAGS_3_1 = $(ASSIMP_FLAGS_3_0) # -DASSIMP_BUILD_BLENDER_DEBUG # -DASSIMP_BUILD_NO_EXPORT +ASSIMP_FLAGS_3_0 = -DASSIMP_BUILD_DLL_EXPORT -DASSIMP_BUILD_NO_OWN_ZLIB -DASSIMP_BUILD_BOOST_WORKAROUND -Dassimp_EXPORTS -fPIC -fvisibility=hidden -Wall +ASSIMP_FLAGS_3_1 = $(ASSIMP_FLAGS_3_0) # -DASSIMP_BUILD_BLENDER_DEBUG -LOCAL_CFLAGS += $(ASSIMP_FLAGS_3_1) $(DontBuildImporters) -DASSIMP_BUILD_NO_EXPORT -#LOCAL_CXXFLAGS += $(ASSIMP_FLAGS_3_1) # -funwind-tables +LOCAL_CFLAGS += $(ASSIMP_FLAGS_3_1) -DASSIMP_BUILD_NO_EXPORT $(DontBuildImporters) # $(DontBuildProcess) -LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/BoostWorkaround ./ +LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/BoostWorkaround $(LOCAL_PATH)/contrib/openddlparser/include ./ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/BoostWorkaround include $(BUILD_STATIC_LIBRARY) From e2c91f3d234c1b42ec319ade5c79e890912aa883 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Sat, 21 Mar 2015 16:56:42 +0100 Subject: [PATCH 13/22] closes #506 --- workspaces/Android-NDK/jni/Android.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workspaces/Android-NDK/jni/Android.mk b/workspaces/Android-NDK/jni/Android.mk index 08a16bd55..a0255f85c 100755 --- a/workspaces/Android-NDK/jni/Android.mk +++ b/workspaces/Android-NDK/jni/Android.mk @@ -21,6 +21,9 @@ LOCAL_SRC_FILES += contrib/clipper/clipper.cpp \ contrib/poly2tri/poly2tri/sweep/cdt.cc \ contrib/poly2tri/poly2tri/common/shapes.cc +LOCAL_SRC_FILES += contrib/openddlparser/code/OpenDDLParser.cpp \ + contrib/openddlparser/code/DDLNode.cpp \ + contrib/openddlparser/code/Value.cpp # enables -frtti and -fexceptions LOCAL_CPP_FEATURES := exceptions @@ -107,7 +110,7 @@ DontBuildImporters := -DASSIMP_BUILD_NO_IFC_IMPORTER -DASSIMP_BUILD_NO_IRRMESH_I ASSIMP_FLAGS_3_0 = -DASSIMP_BUILD_DLL_EXPORT -DASSIMP_BUILD_NO_OWN_ZLIB -DASSIMP_BUILD_BOOST_WORKAROUND -Dassimp_EXPORTS -fPIC -fvisibility=hidden -Wall ASSIMP_FLAGS_3_1 = $(ASSIMP_FLAGS_3_0) # -DASSIMP_BUILD_BLENDER_DEBUG -LOCAL_CFLAGS += $(ASSIMP_FLAGS_3_1) -DASSIMP_BUILD_NO_EXPORT $(DontBuildImporters) # $(DontBuildProcess) +LOCAL_CFLAGS += $(ASSIMP_FLAGS_3_1) -DASSIMP_BUILD_NO_EXPORT -DOPENDDL_NO_USE_CPP11 $(DontBuildImporters) # $(DontBuildProcess) LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/BoostWorkaround $(LOCAL_PATH)/contrib/openddlparser/include ./ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/BoostWorkaround From db7f9fc54da178dffad2505cf3fe1029fc297fba Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Sat, 21 Mar 2015 16:56:42 +0100 Subject: [PATCH 14/22] closes assimp/assimp#506 --- workspaces/Android-NDK/jni/Android.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workspaces/Android-NDK/jni/Android.mk b/workspaces/Android-NDK/jni/Android.mk index 08a16bd55..a0255f85c 100755 --- a/workspaces/Android-NDK/jni/Android.mk +++ b/workspaces/Android-NDK/jni/Android.mk @@ -21,6 +21,9 @@ LOCAL_SRC_FILES += contrib/clipper/clipper.cpp \ contrib/poly2tri/poly2tri/sweep/cdt.cc \ contrib/poly2tri/poly2tri/common/shapes.cc +LOCAL_SRC_FILES += contrib/openddlparser/code/OpenDDLParser.cpp \ + contrib/openddlparser/code/DDLNode.cpp \ + contrib/openddlparser/code/Value.cpp # enables -frtti and -fexceptions LOCAL_CPP_FEATURES := exceptions @@ -107,7 +110,7 @@ DontBuildImporters := -DASSIMP_BUILD_NO_IFC_IMPORTER -DASSIMP_BUILD_NO_IRRMESH_I ASSIMP_FLAGS_3_0 = -DASSIMP_BUILD_DLL_EXPORT -DASSIMP_BUILD_NO_OWN_ZLIB -DASSIMP_BUILD_BOOST_WORKAROUND -Dassimp_EXPORTS -fPIC -fvisibility=hidden -Wall ASSIMP_FLAGS_3_1 = $(ASSIMP_FLAGS_3_0) # -DASSIMP_BUILD_BLENDER_DEBUG -LOCAL_CFLAGS += $(ASSIMP_FLAGS_3_1) -DASSIMP_BUILD_NO_EXPORT $(DontBuildImporters) # $(DontBuildProcess) +LOCAL_CFLAGS += $(ASSIMP_FLAGS_3_1) -DASSIMP_BUILD_NO_EXPORT -DOPENDDL_NO_USE_CPP11 $(DontBuildImporters) # $(DontBuildProcess) LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/BoostWorkaround $(LOCAL_PATH)/contrib/openddlparser/include ./ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/BoostWorkaround From 2b7ceb301e21a47009728cca9a32777d3ab9f380 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Sat, 21 Mar 2015 17:09:17 +0100 Subject: [PATCH 15/22] work finished, feel free to commit/cherry-pick --- .travis.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4254cef73..3310b881b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,14 +10,14 @@ env: global: - PV=r8e PLATF=linux-x86_64 NDK_HOME=${TRAVIS_BUILD_DIR}/android-ndk-${PV} PATH=${PATH}:${NDK_HOME} matrix: -# - LINUX=1 TRAVIS_NO_EXPORT=YES -# - LINUX=1 TRAVIS_NO_EXPORT=NO -# - LINUX=1 TRAVIS_STATIC_BUILD=ON -# - LINUX=1 TRAVIS_STATIC_BUILD=OFF -# - WINDOWS=1 TRAVIS_NO_EXPORT=YES -# - WINDOWS=1 TRAVIS_NO_EXPORT=NO -# - WINDOWS=1 TRAVIS_STATIC_BUILD=ON -# - WINDOWS=1 TRAVIS_STATIC_BUILD=OFF + - LINUX=1 TRAVIS_NO_EXPORT=YES + - LINUX=1 TRAVIS_NO_EXPORT=NO + - LINUX=1 TRAVIS_STATIC_BUILD=ON + - LINUX=1 TRAVIS_STATIC_BUILD=OFF + - WINDOWS=1 TRAVIS_NO_EXPORT=YES + - WINDOWS=1 TRAVIS_NO_EXPORT=NO + - WINDOWS=1 TRAVIS_STATIC_BUILD=ON + - WINDOWS=1 TRAVIS_STATIC_BUILD=OFF - ANDROID=1 language: cpp @@ -31,16 +31,16 @@ install: - if [ $ANDROID ]; then wget -c http://dl.google.com/android/ndk/android-ndk-${PV}-${PLATF}.tar.bz2 && tar xf android-ndk-${PV}-${PLATF}.tar.bz2 ; fi script: -# - cmake -G "Unix Makefiles" -DASSIMP_ENABLE_BOOST_WORKAROUND=YES -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -STATIC_BUILD=$TRAVIS_STATIC_BUILD -# - make -# - sudo make install -# - sudo ldconfig -# - cd test/unit -# - ../../bin/unit -# - cd ../regression -# - chmod 755 run.py -# - ./run.py - - echo "==========================================================" -# - echo "REGRESSION TEST FAILS (results/run_regression_suite_failures.csv)" -# - cat ../results/run_regression_suite_failures.csv - if [ $ANDROID ]; then ant -v -Dmy.dir=${TRAVIS_BUILD_DIR} -f ${TRAVIS_BUILD_DIR}/port/jassimp/build.xml ndk-jni ; fi + - cmake -G "Unix Makefiles" -DASSIMP_ENABLE_BOOST_WORKAROUND=YES -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -STATIC_BUILD=$TRAVIS_STATIC_BUILD + - make + - sudo make install + - sudo ldconfig + - cd test/unit + - ../../bin/unit + - cd ../regression + - chmod 755 run.py + - ./run.py + - echo "==========================================================" + - echo "REGRESSION TEST FAILS (results/run_regression_suite_failures.csv)" + - cat ../results/run_regression_suite_failures.csv From 947429152f6bbbc12f639770128484c3c976a93b Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Sun, 22 Mar 2015 18:27:06 +0100 Subject: [PATCH 16/22] finishing. also skip filtering C4D importer due fixed in https://github.com/assimp/assimp/commit/14324c60cf7aa092250ed71e23387cffa4a15aa6 --- workspaces/Android-NDK/jni/Android.mk | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/workspaces/Android-NDK/jni/Android.mk b/workspaces/Android-NDK/jni/Android.mk index a0255f85c..0d9f4981d 100755 --- a/workspaces/Android-NDK/jni/Android.mk +++ b/workspaces/Android-NDK/jni/Android.mk @@ -3,27 +3,17 @@ LOCAL_PATH := $(call my-dir)/../../../ include $(CLEAR_VARS) LOCAL_MODULE := assimp_static ASSIMP_SRC_DIR = code -FILE_LIST := $(wildcard $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/*.cpp) -IGNORE_LIST := $(wildcard $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/C4D*.cpp) -EXCLUDES := $(IGNORE_LIST:$(LOCAL_PATH)/%=%) -ALL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%) -LOCAL_SRC_FILES := $(filter-out $(EXCLUDES), $(ALL_SRC_FILES)) +FILE_LIST := $(wildcard $(LOCAL_PATH)/$(ASSIMP_SRC_DIR)/*.cpp) +FILE_LIST += $(wildcard $(LOCAL_PATH)/contrib/openddlparser/code/*.cpp) +FILE_LIST += $(wildcard $(LOCAL_PATH)/contrib/unzip/*.c) +FILE_LIST += $(wildcard $(LOCAL_PATH)/contrib/poly2tri/poly2tri/*/*.cc) + +LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%) LOCAL_SRC_FILES += contrib/clipper/clipper.cpp \ contrib/ConvertUTF/ConvertUTF.c \ - contrib/unzip/ioapi.c \ - contrib/unzip/unzip.c \ - contrib/irrXML/irrXML.cpp \ - contrib/poly2tri/poly2tri/sweep/advancing_front.cc \ - contrib/poly2tri/poly2tri/sweep/sweep_context.cc \ - contrib/poly2tri/poly2tri/sweep/sweep.cc \ - contrib/poly2tri/poly2tri/sweep/cdt.cc \ - contrib/poly2tri/poly2tri/common/shapes.cc - -LOCAL_SRC_FILES += contrib/openddlparser/code/OpenDDLParser.cpp \ - contrib/openddlparser/code/DDLNode.cpp \ - contrib/openddlparser/code/Value.cpp + contrib/irrXML/irrXML.cpp # enables -frtti and -fexceptions LOCAL_CPP_FEATURES := exceptions From 5b2ab2f76a244d44e9d65c3b6a7c9f4d4e69abf6 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 23 Mar 2015 18:46:41 +0100 Subject: [PATCH 17/22] OpenDDLParser: latest greatest, Signed-off-by: Kim Kulling --- contrib/openddlparser/code/OpenDDLParser.cpp | 14 ++++++++++---- .../include/openddlparser/OpenDDLParser.h | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/contrib/openddlparser/code/OpenDDLParser.cpp b/contrib/openddlparser/code/OpenDDLParser.cpp index 5ff314aa5..58ed87941 100644 --- a/contrib/openddlparser/code/OpenDDLParser.cpp +++ b/contrib/openddlparser/code/OpenDDLParser.cpp @@ -352,7 +352,8 @@ char *OpenDDLParser::parseStructureBody( char *in, char *end, bool &error ) { DataArrayList *dtArrayList( ddl_nullptr ); Value *values( ddl_nullptr ); if( 1 == arrayLen ) { - in = parseDataList( in, end, &values, &refs ); + size_t numRefs( 0 ), numValues( 0 ); + in = parseDataList( in, end, &values, numValues, &refs, numRefs ); setNodeValues( top(), values ); setNodeReferences( top(), refs ); } else if( arrayLen > 1 ) { @@ -797,8 +798,9 @@ char *OpenDDLParser::parseProperty( char *in, char *end, Property **prop ) { return in; } -char *OpenDDLParser::parseDataList( char *in, char *end, Value **data, Reference **refs ) { +char *OpenDDLParser::parseDataList( char *in, char *end, Value **data, size_t &numValues, Reference **refs, size_t &numRefs ) { *data = ddl_nullptr; + numValues = numRefs = 0; if( ddl_nullptr == in || in == end ) { return in; } @@ -824,6 +826,7 @@ char *OpenDDLParser::parseDataList( char *in, char *end, Value **data, Reference if( !names.empty() ) { Reference *ref = new Reference( names.size(), &names[ 0 ] ); *refs = ref; + numRefs = names.size(); } } @@ -835,6 +838,7 @@ char *OpenDDLParser::parseDataList( char *in, char *end, Value **data, Reference prev->setNext( current ); prev = current; } + numValues++; } in = getNextSeparator( in, end ); @@ -861,11 +865,13 @@ char *OpenDDLParser::parseDataArrayList( char *in, char *end, DataArrayList **da Reference *refs( ddl_nullptr ); DataArrayList *prev( ddl_nullptr ), *currentDataList( ddl_nullptr ); do { - in = parseDataList( in, end, ¤t, &refs ); + size_t numRefs( 0 ), numValues( 0 ); + in = parseDataList( in, end, ¤t, numValues, &refs, numRefs ); if( ddl_nullptr != current ) { if( ddl_nullptr == prev ) { *dataList = new DataArrayList; - (*dataList)->m_dataList = current; + ( *dataList )->m_dataList = current; + ( *dataList )->m_numItems = numValues; prev = *dataList; } else { currentDataList = new DataArrayList; diff --git a/contrib/openddlparser/include/openddlparser/OpenDDLParser.h b/contrib/openddlparser/include/openddlparser/OpenDDLParser.h index 00f2c2e58..67d3322e0 100644 --- a/contrib/openddlparser/include/openddlparser/OpenDDLParser.h +++ b/contrib/openddlparser/include/openddlparser/OpenDDLParser.h @@ -96,7 +96,7 @@ public: // static parser helpers static char *parseStringLiteral( char *in, char *end, Value **stringData ); static char *parseHexaLiteral( char *in, char *end, Value **data ); static char *parseProperty( char *in, char *end, Property **prop ); - static char *parseDataList( char *in, char *end, Value **data, Reference **refs ); + static char *parseDataList( char *in, char *end, Value **data, size_t &numValues, Reference **refs, size_t &numRefs ); static char *parseDataArrayList( char *in, char *end, DataArrayList **dataList ); static const char *getVersion(); From 23b372825497b6fba8e08af8d5de664aea556d3c Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 24 Mar 2015 00:08:42 +0100 Subject: [PATCH 18/22] add setup of transformation information in opengex importer. Signed-off-by: Kim Kulling --- code/OpenGEXImporter.cpp | 54 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/code/OpenGEXImporter.cpp b/code/OpenGEXImporter.cpp index 81b6b8446..4b4e4ee77 100644 --- a/code/OpenGEXImporter.cpp +++ b/code/OpenGEXImporter.cpp @@ -360,8 +360,10 @@ void OpenGEXImporter::handleNameNode( DDLNode *node, aiScene *pScene ) { throw DeadlyImportError( "OpenGEX: invalid data type for value in node name." ); } - std::string name( val->getString() ); - m_currentNode->mName.Set( name.c_str() ); + if( NULL != m_currentNode ) { + std::string name( val->getString() ); + m_currentNode->mName.Set( name.c_str() ); + } } } @@ -438,8 +440,54 @@ void OpenGEXImporter::handleGeometryObject( DDLNode *node, aiScene *pScene ) { } //------------------------------------------------------------------------------------------------ -void OpenGEXImporter::handleTransformNode( ODDLParser::DDLNode *node, aiScene *pScene ) { +static void setMatrix( aiNode *node, DataArrayList *transformData ) { + float m[ 16 ]; + size_t i( 1 ); + Value *next( transformData->m_dataList->m_next ); + m[ 0 ] = transformData->m_dataList->getFloat(); + while( next != NULL ) { + m[ i ] = next->getFloat(); + next = next->m_next; + i++; + } + + node->mTransformation.a1 = m[ 0 ]; + node->mTransformation.a2 = m[ 1 ]; + node->mTransformation.a3 = m[ 2 ]; + node->mTransformation.a4 = m[ 3 ]; + node->mTransformation.b1 = m[ 4 ]; + node->mTransformation.b2 = m[ 5 ]; + node->mTransformation.b3 = m[ 6 ]; + node->mTransformation.b4 = m[ 7 ]; + + node->mTransformation.c1 = m[ 8 ]; + node->mTransformation.c2 = m[ 9 ]; + node->mTransformation.c3 = m[ 10 ]; + node->mTransformation.c4 = m[ 11 ]; + + node->mTransformation.d1 = m[ 12 ]; + node->mTransformation.d2 = m[ 13 ]; + node->mTransformation.d3 = m[ 14 ]; + node->mTransformation.d4 = m[ 15 ]; +} + +//------------------------------------------------------------------------------------------------ +void OpenGEXImporter::handleTransformNode( ODDLParser::DDLNode *node, aiScene *pScene ) { + if( NULL == m_currentNode ) { + throw DeadlyImportError( "No parent node for name." ); + return; + } + + + DataArrayList *transformData( node->getDataArrayList() ); + if( NULL != transformData ) { + if( transformData->m_numItems != 16 ) { + throw DeadlyImportError( "Invalid number of data for transform matrix." ); + return; + } + setMatrix( m_currentNode, transformData ); + } } //------------------------------------------------------------------------------------------------ From d19a677f8816519b9f248012b8fda173ca56378d Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 25 Mar 2015 19:55:39 +0100 Subject: [PATCH 19/22] openddl-parser: latest greatest. Contains fix for https://github.com/kimkulling/openddl-parser/issues/10 and https://github.com/kimkulling/openddl-parser/issues/13 --- contrib/openddlparser/code/OpenDDLParser.cpp | 60 ++++++++++--------- .../include/openddlparser/OpenDDLParser.h | 15 ++++- 2 files changed, 47 insertions(+), 28 deletions(-) diff --git a/contrib/openddlparser/code/OpenDDLParser.cpp b/contrib/openddlparser/code/OpenDDLParser.cpp index 58ed87941..1c9006f38 100644 --- a/contrib/openddlparser/code/OpenDDLParser.cpp +++ b/contrib/openddlparser/code/OpenDDLParser.cpp @@ -190,6 +190,8 @@ bool OpenDDLParser::parse() { normalizeBuffer( m_buffer ); + std::cout << &m_buffer[0] << std::endl; + m_context = new Context; m_context->m_root = DDLNode::create( "root", "", ddl_nullptr ); pushNode( m_context->m_root ); @@ -230,7 +232,7 @@ char *OpenDDLParser::parseHeader( char *in, char *end ) { dumpId( id ); #endif // DEBUG_HEADER_NAME - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); Property *first( ddl_nullptr ); if( ddl_nullptr != id ) { if( *in == '(' ) { @@ -238,7 +240,7 @@ char *OpenDDLParser::parseHeader( char *in, char *end ) { Property *prop( ddl_nullptr ), *prev( ddl_nullptr ); while( *in != ')' && in != end ) { in = OpenDDLParser::parseProperty( in, end, &prop ); - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); if( *in != ',' && *in != ')' ) { logInvalidTokenError( in, ")", m_logCallback ); @@ -288,21 +290,20 @@ char *OpenDDLParser::parseStructure( char *in, char *end ) { } bool error( false ); - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); if( *in == '{' ) { // loop over all children ( data and nodes ) do { in = parseStructureBody( in, end, error ); } while ( *in != '}' ); in++; - } - else { + } else { in++; logInvalidTokenError( in, std::string( Grammar::OpenBracketToken ), m_logCallback ); error = true; return in; } - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); // pop node from stack after successful parsing if( !error ) { @@ -341,12 +342,13 @@ char *OpenDDLParser::parseStructureBody( char *in, char *end, bool &error ) { in++; } - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); Value::ValueType type( Value::ddl_none ); size_t arrayLen( 0 ); in = OpenDDLParser::parsePrimitiveDataType( in, end, type, arrayLen ); if( Value::ddl_none != type ) { - in = getNextToken( in, end ); + // parse a primitive data type + in = lookForNextToken( in, end ); if( *in == '{' ) { Reference *refs( ddl_nullptr ); DataArrayList *dtArrayList( ddl_nullptr ); @@ -365,13 +367,14 @@ char *OpenDDLParser::parseStructureBody( char *in, char *end, bool &error ) { } } - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); if( *in != '}' ) { logInvalidTokenError( in, std::string( Grammar::CloseBracketToken ), m_logCallback ); } else { //in++; } } else { + // parse a complex data type in = parseNextNode( in, end ); } @@ -429,15 +432,16 @@ void OpenDDLParser::normalizeBuffer( std::vector &buffer) { for( size_t readIdx = 0; readIdx( c, end ) ) { + if( !isComment( c, end ) && !isNewLine( *c ) ) { newBuffer.push_back( buffer[ readIdx ] ); } else { - readIdx++; - // skip the comment and the rest of the line - while( !isEndofLine( buffer[ readIdx ] ) ) { + if( isComment( c, end ) ) { readIdx++; + // skip the comment and the rest of the line + while( !isEndofLine( buffer[ readIdx ] ) ) { + readIdx++; + } } - newBuffer.push_back( '\n' ); } } buffer = newBuffer; @@ -450,7 +454,7 @@ char *OpenDDLParser::parseName( char *in, char *end, Name **name ) { } // ignore blanks - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); if( *in != '$' && *in != '%' ) { return in; } @@ -480,7 +484,7 @@ char *OpenDDLParser::parseIdentifier( char *in, char *end, Identifier **id ) { } // ignore blanks - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); // staring with a number is forbidden if( isNumeric( *in ) ) { @@ -521,7 +525,7 @@ char *OpenDDLParser::parsePrimitiveDataType( char *in, char *end, Value::ValueTy } if( Value::ddl_none == type ) { - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); return in; } else { in += prim_len; @@ -582,7 +586,7 @@ char *OpenDDLParser::parseBooleanLiteral( char *in, char *end, Value **boolean ) return in; } - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); char *start( in ); size_t len( 0 ); while( !isSeparator( *in ) && in != end ) { @@ -617,7 +621,7 @@ char *OpenDDLParser::parseIntegerLiteral( char *in, char *end, Value **integer, return in; } - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); char *start( in ); while( !isSeparator( *in ) && in != end ) { in++; @@ -653,7 +657,7 @@ char *OpenDDLParser::parseFloatingLiteral( char *in, char *end, Value **floating return in; } - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); char *start( in ); while( !isSeparator( *in ) && in != end ) { in++; @@ -686,7 +690,7 @@ char *OpenDDLParser::parseStringLiteral( char *in, char *end, Value **stringData return in; } - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); size_t len( 0 ); char *start( in ); if( *start == '\"' ) { @@ -719,7 +723,7 @@ char *OpenDDLParser::parseHexaLiteral( char *in, char *end, Value **data ) { return in; } - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); if( *in != '0' ) { return in; } @@ -765,11 +769,11 @@ char *OpenDDLParser::parseProperty( char *in, char *end, Property **prop ) { return in; } - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); Identifier *id( ddl_nullptr ); in = parseIdentifier( in, end, &id ); if( ddl_nullptr != id ) { - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); if( *in == '=' ) { in++; in = getNextToken( in, end ); @@ -805,13 +809,13 @@ char *OpenDDLParser::parseDataList( char *in, char *end, Value **data, size_t &n return in; } - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); if( *in == '{' ) { in++; Value *current( ddl_nullptr ), *prev( ddl_nullptr ); while( '}' != *in ) { current = ddl_nullptr; - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); if( isInteger( in, end ) ) { in = parseIntegerLiteral( in, end, ¤t ); } else if( isFloat( in, end ) ) { @@ -858,7 +862,7 @@ char *OpenDDLParser::parseDataArrayList( char *in, char *end, DataArrayList **da return in; } - in = getNextToken( in, end ); + in = lookForNextToken( in, end ); if( *in == Grammar::OpenBracketToken[ 0 ] ) { in++; Value *current( ddl_nullptr ); @@ -882,6 +886,8 @@ char *OpenDDLParser::parseDataArrayList( char *in, char *end, DataArrayList **da } } } while( ',' == *in && in != end ); + in = lookForNextToken( in, end ); + in++; } return in; diff --git a/contrib/openddlparser/include/openddlparser/OpenDDLParser.h b/contrib/openddlparser/include/openddlparser/OpenDDLParser.h index 67d3322e0..068c028b7 100644 --- a/contrib/openddlparser/include/openddlparser/OpenDDLParser.h +++ b/contrib/openddlparser/include/openddlparser/OpenDDLParser.h @@ -43,13 +43,26 @@ struct Property; template inline -T *getNextToken( T *in, T *end ) { +T *lookForNextToken( T *in, T *end ) { while( ( isSpace( *in ) || isNewLine( *in ) || ',' == *in ) && ( in != end ) ) { in++; } return in; } +template +inline +T *getNextToken( T *in, T *end ) { + T *tmp( in ); + while( ( isSpace( *in ) || isNewLine( *in ) || ',' == *in ) && ( in != end ) ) { + in++; + } + if( tmp == in ) { + in++; + } + return in; +} + /// @brief Defines the log severity. enum LogSeverity { ddl_debug_msg = 0, ///< Debug message, for debugging From 7a01f77a086a6d0ed6db9442f40c1ec102dfdf15 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 25 Mar 2015 21:35:32 +0100 Subject: [PATCH 20/22] fix invalid lookup for token type in opengex-parser. --- code/OpenGEXImporter.cpp | 52 ++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/code/OpenGEXImporter.cpp b/code/OpenGEXImporter.cpp index 4b4e4ee77..23a8d34bf 100644 --- a/code/OpenGEXImporter.cpp +++ b/code/OpenGEXImporter.cpp @@ -122,33 +122,45 @@ namespace Grammar { } static TokenType matchTokenType( const char *tokenType ) { - if( 0 == strncmp( MetricType, tokenType, strlen( tokenType ) ) ) { + if( 0 == strncmp( MetricType, tokenType, strlen( MetricType ) ) ) { return MetricToken; - } else if( 0 == strncmp( NameType, tokenType, strlen( tokenType ) ) ) { + } else if( 0 == strncmp( NameType, tokenType, strlen( NameType ) ) ) { return NameToken; - } else if( 0 == strncmp( ObjectRefType, tokenType, strlen( tokenType ) ) ) { + } + else if( 0 == strncmp( ObjectRefType, tokenType, strlen( ObjectRefType ) ) ) { return ObjectRefToken; - } else if( 0 == strncmp( MaterialRefType, tokenType, strlen( tokenType ) ) ) { + } + else if( 0 == strncmp( MaterialRefType, tokenType, strlen( MaterialRefType ) ) ) { return MaterialRefToken; - } else if( 0 == strncmp( MetricKeyType, tokenType, strlen( tokenType ) ) ) { + } + else if( 0 == strncmp( MetricKeyType, tokenType, strlen( MetricKeyType ) ) ) { return MetricKeyToken; - } else if( 0 == strncmp( GeometryNodeType, tokenType, strlen( tokenType ) ) ) { + } + else if( 0 == strncmp( GeometryNodeType, tokenType, strlen( GeometryNodeType ) ) ) { return GeometryNodeToken; - } else if( 0 == strncmp( GeometryObjectType, tokenType, strlen( tokenType ) ) ) { + } + else if( 0 == strncmp( GeometryObjectType, tokenType, strlen( GeometryObjectType ) ) ) { return GeometryObjectToken; - } else if( 0 == strncmp( TransformType, tokenType, strlen( tokenType ) ) ) { + } + else if( 0 == strncmp( TransformType, tokenType, strlen( TransformType ) ) ) { return TransformToken; - } else if( 0 == strncmp( MeshType, tokenType, strlen( tokenType ) ) ) { + } + else if( 0 == strncmp( MeshType, tokenType, strlen( MeshType ) ) ) { return MeshToken; - } else if( 0 == strncmp( VertexArrayType, tokenType, strlen( tokenType ) ) ) { + } + else if( 0 == strncmp( VertexArrayType, tokenType, strlen( VertexArrayType ) ) ) { return VertexArrayToken; - } else if( 0 == strncmp( IndexArrayType, tokenType, strlen( tokenType ) ) ) { + } + else if( 0 == strncmp( IndexArrayType, tokenType, strlen( IndexArrayType ) ) ) { return IndexArrayToken; - } else if( 0 == strncmp( MaterialType, tokenType, strlen( tokenType ) ) ) { + } + else if( 0 == strncmp( MaterialType, tokenType, strlen( MaterialType ) ) ) { return MaterialToken; - } else if( 0 == strncmp( ColorType, tokenType, strlen( tokenType ) ) ) { + } + else if( 0 == strncmp( ColorType, tokenType, strlen( ColorType ) ) ) { return ColorToken; - } else if( 0 == strncmp( TextureType, tokenType, strlen( tokenType ) ) ) { + } + else if( 0 == strncmp( TextureType, tokenType, strlen( TextureType ) ) ) { return TextureToken; } @@ -358,12 +370,11 @@ void OpenGEXImporter::handleNameNode( DDLNode *node, aiScene *pScene ) { if( NULL != val ) { if( Value::ddl_string != val->m_type ) { throw DeadlyImportError( "OpenGEX: invalid data type for value in node name." ); + return; } - if( NULL != m_currentNode ) { - std::string name( val->getString() ); - m_currentNode->mName.Set( name.c_str() ); - } + const std::string name( val->getString() ); + m_currentNode->mName.Set( name.c_str() ); } } @@ -441,6 +452,9 @@ void OpenGEXImporter::handleGeometryObject( DDLNode *node, aiScene *pScene ) { //------------------------------------------------------------------------------------------------ static void setMatrix( aiNode *node, DataArrayList *transformData ) { + ai_assert( NULL != node ); + ai_assert( NULL != transformData ); + float m[ 16 ]; size_t i( 1 ); Value *next( transformData->m_dataList->m_next ); @@ -529,6 +543,8 @@ void OpenGEXImporter::resolveReferences() { } } else if( RefInfo::MaterialRef == currentRefInfo->m_type ) { // ToDo + } else { + throw DeadlyImportError( "Unknown reference info to resolve." ); } } } From ca4385fcf25aa1802c1b6a98366cc49ddd77d4ce Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 26 Mar 2015 10:11:14 +0100 Subject: [PATCH 21/22] fix compiler warning ( signed against unsigned ). Signed-off-by: Kim Kulling --- code/PlyLoader.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/PlyLoader.cpp b/code/PlyLoader.cpp index deb7da094..f1864b0f6 100644 --- a/code/PlyLoader.cpp +++ b/code/PlyLoader.cpp @@ -74,8 +74,9 @@ namespace template const T &GetProperty(const std::vector &props, int idx) { - if (idx >= props.size()) - throw DeadlyImportError("Invalid .ply file: Property index is out of range."); + if( static_cast< size_t >( idx ) >= props.size() ) { + throw DeadlyImportError( "Invalid .ply file: Property index is out of range." ); + } return props[idx]; } From b17a1255a1a33c04dbc95c9d46fab25e38ec8b7c Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 26 Mar 2015 20:17:26 +0100 Subject: [PATCH 22/22] add setup for mesh primitives and prepare vertex array copy ops. Signed-off-by: Kim Kulling --- code/OpenGEXImporter.cpp | 83 +++++++++++++++++++++++++++++++++++++++- code/OpenGEXImporter.h | 1 + 2 files changed, 83 insertions(+), 1 deletion(-) diff --git a/code/OpenGEXImporter.cpp b/code/OpenGEXImporter.cpp index 23a8d34bf..dc571efad 100644 --- a/code/OpenGEXImporter.cpp +++ b/code/OpenGEXImporter.cpp @@ -193,6 +193,7 @@ OpenGEXImporter::OpenGEXImporter() , m_mesh2refMap() , m_ctx( NULL ) , m_currentNode( NULL ) +, m_currentMesh( NULL ) , m_nodeStack() , m_unresolvedRefStack() { // empty @@ -505,13 +506,93 @@ void OpenGEXImporter::handleTransformNode( ODDLParser::DDLNode *node, aiScene *p } //------------------------------------------------------------------------------------------------ -void OpenGEXImporter::handleMeshNode( ODDLParser::DDLNode *node, aiScene *pScene ) { +static void propId2StdString( Property *prop, std::string &name, std::string &key ) { + name = key = ""; + if( NULL == prop ) { + return; + } + if( NULL != prop->m_id ) { + name = prop->m_id->m_buffer; + if( Value::ddl_string == prop->m_primData->m_type ) { + key = prop->m_primData->getString(); + } + } +} + +//------------------------------------------------------------------------------------------------ +void OpenGEXImporter::handleMeshNode( ODDLParser::DDLNode *node, aiScene *pScene ) { + Property *prop = node->getProperties(); + m_currentMesh = new aiMesh; + m_meshCache.push_back( m_currentMesh ); + + if( NULL != prop ) { + std::string propName, propKey; + propId2StdString( prop, propName, propKey ); + if( "triangles" == propName ) { + m_currentMesh->mPrimitiveTypes |= aiPrimitiveType_TRIANGLE; + } + } + + handleNodes( node, pScene ); +} + +//------------------------------------------------------------------------------------------------ +enum MeshAttribute { + None, + Position, + Normal, + TexCoord +}; + +//------------------------------------------------------------------------------------------------ +static MeshAttribute getAttributeByName( const char *attribName ) { + ai_assert( NULL != attribName ); + + if( 0 == strncmp( "position", attribName, strlen( "position" ) ) ) { + return Position; + } else if( 0 == strncmp( "normal", attribName, strlen( "normal" ) ) ) { + return Normal; + } else if( 0 == strncmp( "texcoord", attribName, strlen( "texcoord" ) ) ) { + return TexCoord; + } + + return None; } //------------------------------------------------------------------------------------------------ void OpenGEXImporter::handleVertexArrayNode( ODDLParser::DDLNode *node, aiScene *pScene ) { + if( NULL == node ) { + throw DeadlyImportError( "No parent node for name." ); + return; + } + Property *prop( node->getProperties() ); + if( NULL != prop ) { + std::string propName, propKey; + propId2StdString( prop, propName, propKey ); + MeshAttribute attribType( getAttributeByName( propName.c_str() ) ); + if( None == attribType ) { + return; + } + + DataArrayList *vaList = node->getDataArrayList(); + if( NULL == vaList ) { + return; + } + + if( Position == attribType ) { + aiVector3D *pos = new aiVector3D[ vaList->m_numItems ]; + Value *next( vaList->m_dataList ); + for( size_t i = 0; i < vaList->m_numItems; i++ ) { + + } + } else if( Normal == attribType ) { + aiVector3D *normal = new aiVector3D[ vaList->m_numItems ]; + } else if( TexCoord == attribType ) { + aiVector3D *tex = new aiVector3D[ vaList->m_numItems ]; + } + } } //------------------------------------------------------------------------------------------------ diff --git a/code/OpenGEXImporter.h b/code/OpenGEXImporter.h index fe8ae1ef6..d890bde76 100644 --- a/code/OpenGEXImporter.h +++ b/code/OpenGEXImporter.h @@ -145,6 +145,7 @@ private: ODDLParser::Context *m_ctx; MetricInfo m_metrics[ MetricInfo::Max ]; aiNode *m_currentNode; + aiMesh *m_currentMesh; std::vector m_nodeStack; std::vector m_unresolvedRefStack; };