diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f9327a93..5bd2814b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- -# Copyright (c) 2006-2018, assimp team +# Copyright (c) 2006-2019, assimp team # All rights reserved. # diff --git a/Readme.md b/Readme.md index 7f42fb75c..efb8ecc2b 100644 --- a/Readme.md +++ b/Readme.md @@ -1,7 +1,7 @@ Open Asset Import Library (assimp) ================================== A library to import and export various 3d-model-formats including scene-post-processing to generate missing render data. -### Current build status ### +### Current project status ### [![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/assimp) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp) @@ -12,6 +12,7 @@ A library to import and export various 3d-model-formats including scene-post-pro [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/assimp/assimp.svg)](http://isitmaintained.com/project/assimp/assimp "Average time to resolve an issue") [![Codacy Badge](https://api.codacy.com/project/badge/Grade/5be56faac64f46fc941ac890fb4febef)](https://www.codacy.com/app/kimkulling/assimp?utm_source=github.com&utm_medium=referral&utm_content=assimp/assimp&utm_campaign=Badge_Grade) +[![Total alerts](https://img.shields.io/lgtm/alerts/g/assimp/assimp.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/assimp/assimp/alerts/)
APIs are provided for C and C++. There are various bindings to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS. diff --git a/code/3DSConverter.cpp b/code/3DSConverter.cpp index 7ec79ba64..e6865a809 100644 --- a/code/3DSConverter.cpp +++ b/code/3DSConverter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/3DSExporter.cpp b/code/3DSExporter.cpp index 53976b16f..2501d4049 100644 --- a/code/3DSExporter.cpp +++ b/code/3DSExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/3DSExporter.h b/code/3DSExporter.h index 5db58a4cb..035b562cf 100644 --- a/code/3DSExporter.h +++ b/code/3DSExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/3DSHelper.h b/code/3DSHelper.h index d67a7c14c..8eb4cd97c 100644 --- a/code/3DSHelper.h +++ b/code/3DSHelper.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/3DSLoader.cpp b/code/3DSLoader.cpp index 34066e44b..24626d936 100644 --- a/code/3DSLoader.cpp +++ b/code/3DSLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/3DSLoader.h b/code/3DSLoader.h index eb311a81b..f57e6a8e3 100644 --- a/code/3DSLoader.h +++ b/code/3DSLoader.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/3MFXmlTags.h b/code/3MFXmlTags.h index e869c33c1..ea6aeede0 100644 --- a/code/3MFXmlTags.h +++ b/code/3MFXmlTags.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ACLoader.cpp b/code/ACLoader.cpp index 7b8afbe9b..2eb839553 100644 --- a/code/ACLoader.cpp +++ b/code/ACLoader.cpp @@ -4,7 +4,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/ACLoader.h b/code/ACLoader.h index 86af9afb6..cab2c3ae5 100644 --- a/code/ACLoader.h +++ b/code/ACLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/AMFImporter.cpp b/code/AMFImporter.cpp index e5b41b3ad..d173bd0f5 100644 --- a/code/AMFImporter.cpp +++ b/code/AMFImporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/AMFImporter.hpp b/code/AMFImporter.hpp index b7e58362c..2b8086a06 100644 --- a/code/AMFImporter.hpp +++ b/code/AMFImporter.hpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/AMFImporter_Geometry.cpp b/code/AMFImporter_Geometry.cpp index d4d648fbd..f1538e3fb 100644 --- a/code/AMFImporter_Geometry.cpp +++ b/code/AMFImporter_Geometry.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/AMFImporter_Macro.hpp b/code/AMFImporter_Macro.hpp index ea8c17850..f60c5fbbb 100644 --- a/code/AMFImporter_Macro.hpp +++ b/code/AMFImporter_Macro.hpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/AMFImporter_Material.cpp b/code/AMFImporter_Material.cpp index c9190bb92..2f36df061 100644 --- a/code/AMFImporter_Material.cpp +++ b/code/AMFImporter_Material.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/AMFImporter_Node.hpp b/code/AMFImporter_Node.hpp index 22b8f58cb..a1bf9f008 100644 --- a/code/AMFImporter_Node.hpp +++ b/code/AMFImporter_Node.hpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/AMFImporter_Postprocess.cpp b/code/AMFImporter_Postprocess.cpp index a6ee8fa2f..2bfe3f78c 100644 --- a/code/AMFImporter_Postprocess.cpp +++ b/code/AMFImporter_Postprocess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/ASELoader.cpp b/code/ASELoader.cpp index 1808f25e2..321e8548a 100644 --- a/code/ASELoader.cpp +++ b/code/ASELoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/ASELoader.h b/code/ASELoader.h index 7f71bf49d..33406e3e5 100644 --- a/code/ASELoader.h +++ b/code/ASELoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ASEParser.cpp b/code/ASEParser.cpp index 298c6fe61..e8d6febc2 100644 --- a/code/ASEParser.cpp +++ b/code/ASEParser.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/ASEParser.h b/code/ASEParser.h index 305a3f3d6..b8c820632 100644 --- a/code/ASEParser.h +++ b/code/ASEParser.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/AssbinExporter.cpp b/code/AssbinExporter.cpp index f49389f78..03b0368ce 100644 --- a/code/AssbinExporter.cpp +++ b/code/AssbinExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -760,7 +760,12 @@ public: if (!out) return; time_t tt = time(NULL); +#if _WIN32 tm* p = gmtime(&tt); +#else + struct tm now; + tm* p = gmtime_r(&tt, &now); +#endif // header char s[64]; diff --git a/code/AssbinExporter.h b/code/AssbinExporter.h index ee70d78b6..3e13639bb 100644 --- a/code/AssbinExporter.h +++ b/code/AssbinExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/AssbinLoader.cpp b/code/AssbinLoader.cpp index 321a0cfec..7adb8db6f 100644 --- a/code/AssbinLoader.cpp +++ b/code/AssbinLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/AssbinLoader.h b/code/AssbinLoader.h index 37799a2c8..9f2dde125 100644 --- a/code/AssbinLoader.h +++ b/code/AssbinLoader.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Assimp.cpp b/code/Assimp.cpp index 87f436602..41e1a4800 100644 --- a/code/Assimp.cpp +++ b/code/Assimp.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/AssimpCExport.cpp b/code/AssimpCExport.cpp index caf51a08c..beb3ec3c5 100644 --- a/code/AssimpCExport.cpp +++ b/code/AssimpCExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team @@ -60,7 +60,6 @@ ASSIMP_API size_t aiGetExportFormatCount(void) return Exporter().GetExportFormatCount(); } - // ------------------------------------------------------------------------------------------------ ASSIMP_API const aiExportFormatDesc* aiGetExportFormatDescription( size_t index) { diff --git a/code/AssxmlExporter.cpp b/code/AssxmlExporter.cpp index c9e125d0d..fc9a6bae5 100644 --- a/code/AssxmlExporter.cpp +++ b/code/AssxmlExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -184,8 +184,13 @@ static std::string encodeXML(const std::string& data) { static void WriteDump(const aiScene* scene, IOStream* io, bool shortened) { time_t tt = ::time( NULL ); - tm* p = ::gmtime( &tt ); - ai_assert( nullptr != p ); +#if _WIN32 + tm* p = gmtime(&tt); +#else + struct tm now; + tm* p = gmtime_r(&tt, &now); +#endif + ai_assert(nullptr != p); // write header std::string header( diff --git a/code/AssxmlExporter.h b/code/AssxmlExporter.h index 3db496db2..8ca887eea 100644 --- a/code/AssxmlExporter.h +++ b/code/AssxmlExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/B3DImporter.cpp b/code/B3DImporter.cpp index ce8bd5159..e48646de9 100644 --- a/code/B3DImporter.cpp +++ b/code/B3DImporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/B3DImporter.h b/code/B3DImporter.h index 3cb66e5c7..d52dac34a 100644 --- a/code/B3DImporter.h +++ b/code/B3DImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/BVHLoader.cpp b/code/BVHLoader.cpp index cba58d056..cd9ab0843 100644 --- a/code/BVHLoader.cpp +++ b/code/BVHLoader.cpp @@ -4,7 +4,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/BVHLoader.h b/code/BVHLoader.h index a18ad81d9..33b4e2453 100644 --- a/code/BVHLoader.h +++ b/code/BVHLoader.h @@ -4,7 +4,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/BaseImporter.cpp b/code/BaseImporter.cpp index f03db189f..4803c6d6f 100644 --- a/code/BaseImporter.cpp +++ b/code/BaseImporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/BaseProcess.cpp b/code/BaseProcess.cpp index 154b586d2..18872c369 100644 --- a/code/BaseProcess.cpp +++ b/code/BaseProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/BaseProcess.h b/code/BaseProcess.h index b09fc732e..4d5c7a76b 100644 --- a/code/BaseProcess.h +++ b/code/BaseProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Bitmap.cpp b/code/Bitmap.cpp index 903a13fb1..b22b71ea9 100644 --- a/code/Bitmap.cpp +++ b/code/Bitmap.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/BlenderDNA.cpp b/code/BlenderDNA.cpp index f84c45601..f274e02f9 100644 --- a/code/BlenderDNA.cpp +++ b/code/BlenderDNA.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/BlenderDNA.h b/code/BlenderDNA.h index ecf606a3b..5d3a4f6ea 100644 --- a/code/BlenderDNA.h +++ b/code/BlenderDNA.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/BlenderDNA.inl b/code/BlenderDNA.inl index 89c94e7bf..65bc1374c 100644 --- a/code/BlenderDNA.inl +++ b/code/BlenderDNA.inl @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/BlenderIntermediate.h b/code/BlenderIntermediate.h index f3d34d1b2..95fdf0f03 100644 --- a/code/BlenderIntermediate.h +++ b/code/BlenderIntermediate.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/BlenderLoader.cpp b/code/BlenderLoader.cpp index b0d273a5f..90065ceee 100644 --- a/code/BlenderLoader.cpp +++ b/code/BlenderLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/BlenderLoader.h b/code/BlenderLoader.h index 9f452a0aa..d85a82842 100644 --- a/code/BlenderLoader.h +++ b/code/BlenderLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/BlenderModifier.cpp b/code/BlenderModifier.cpp index 1f32ee410..cc7acc929 100644 --- a/code/BlenderModifier.cpp +++ b/code/BlenderModifier.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/BlenderModifier.h b/code/BlenderModifier.h index b8797691b..c260ba1f6 100644 --- a/code/BlenderModifier.h +++ b/code/BlenderModifier.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/BlenderScene.h b/code/BlenderScene.h index b74d7b198..8e4223eb1 100644 --- a/code/BlenderScene.h +++ b/code/BlenderScene.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/BlenderTessellator.cpp b/code/BlenderTessellator.cpp index afedbfb53..d98c2e865 100644 --- a/code/BlenderTessellator.cpp +++ b/code/BlenderTessellator.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/BlenderTessellator.h b/code/BlenderTessellator.h index dab3ba8aa..8675b4e57 100644 --- a/code/BlenderTessellator.h +++ b/code/BlenderTessellator.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/CInterfaceIOWrapper.cpp b/code/CInterfaceIOWrapper.cpp index 41dbba772..5a3a49565 100644 --- a/code/CInterfaceIOWrapper.cpp +++ b/code/CInterfaceIOWrapper.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/CInterfaceIOWrapper.h b/code/CInterfaceIOWrapper.h index 6f0eb7957..216232030 100644 --- a/code/CInterfaceIOWrapper.h +++ b/code/CInterfaceIOWrapper.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index b9b9c211b..1726fda72 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1,7 +1,7 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- # -# Copyright (c) 2006-2018, assimp team +# Copyright (c) 2006-2019, assimp team # All rights reserved. diff --git a/code/COBLoader.cpp b/code/COBLoader.cpp index a8e41dbbc..efb22e08b 100644 --- a/code/COBLoader.cpp +++ b/code/COBLoader.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/COBLoader.h b/code/COBLoader.h index 156c8d911..40fed324b 100644 --- a/code/COBLoader.h +++ b/code/COBLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/COBScene.h b/code/COBScene.h index 2473c42a5..90349be70 100644 --- a/code/COBScene.h +++ b/code/COBScene.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/CSMLoader.cpp b/code/CSMLoader.cpp index 777b6cf1b..9dbb38467 100644 --- a/code/CSMLoader.cpp +++ b/code/CSMLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/CSMLoader.h b/code/CSMLoader.h index ea82bb87a..31a814b52 100644 --- a/code/CSMLoader.h +++ b/code/CSMLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/CalcTangentsProcess.cpp b/code/CalcTangentsProcess.cpp index 54e55fc5a..b30f39c27 100644 --- a/code/CalcTangentsProcess.cpp +++ b/code/CalcTangentsProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/CalcTangentsProcess.h b/code/CalcTangentsProcess.h index 4cac2ed9f..18775abcc 100644 --- a/code/CalcTangentsProcess.h +++ b/code/CalcTangentsProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp index 9d66741eb..37a6ba4e0 100644 --- a/code/ColladaExporter.cpp +++ b/code/ColladaExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ColladaExporter.h b/code/ColladaExporter.h index d1a307532..8244b61aa 100644 --- a/code/ColladaExporter.h +++ b/code/ColladaExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ColladaHelper.h b/code/ColladaHelper.h index fe6674b93..ffab6226d 100644 --- a/code/ColladaHelper.h +++ b/code/ColladaHelper.h @@ -4,7 +4,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index af04e9a16..0c87330a9 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/ColladaLoader.h b/code/ColladaLoader.h index d61845b24..72c2dd8e7 100644 --- a/code/ColladaLoader.h +++ b/code/ColladaLoader.h @@ -4,7 +4,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 052cd51c4..0fa59362b 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team @@ -2362,7 +2362,7 @@ size_t ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector& pP if( expectedPointCount > 0 && indices.size() != expectedPointCount * numOffsets) { if (pPrimType == Prim_Lines) { // HACK: We just fix this number since SketchUp 15.3.331 writes the wrong 'count' for 'lines' - ReportWarning( "Expected different index count in

element, %d instead of %d.", indices.size(), expectedPointCount * numOffsets); + ReportWarning( "Expected different index count in

element, %zu instead of %zu.", indices.size(), expectedPointCount * numOffsets); pNumPrimitives = (indices.size() / numOffsets) / 2; } else ThrowException( "Expected different index count in

element."); diff --git a/code/ColladaParser.h b/code/ColladaParser.h index 21f741551..232d85654 100644 --- a/code/ColladaParser.h +++ b/code/ColladaParser.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- - Copyright (c) 2006-2018, assimp team + Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ComputeUVMappingProcess.cpp b/code/ComputeUVMappingProcess.cpp index 3b0577b2d..bb571a551 100644 --- a/code/ComputeUVMappingProcess.cpp +++ b/code/ComputeUVMappingProcess.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ComputeUVMappingProcess.h b/code/ComputeUVMappingProcess.h index 41e25f99f..24f6bb721 100644 --- a/code/ComputeUVMappingProcess.h +++ b/code/ComputeUVMappingProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ConvertToLHProcess.cpp b/code/ConvertToLHProcess.cpp index 1831739ac..b7cd4f0bc 100644 --- a/code/ConvertToLHProcess.cpp +++ b/code/ConvertToLHProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/ConvertToLHProcess.h b/code/ConvertToLHProcess.h index f219d6ca2..63351568d 100644 --- a/code/ConvertToLHProcess.h +++ b/code/ConvertToLHProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/D3MFExporter.cpp b/code/D3MFExporter.cpp index 99e2ff3f5..e8da91ba9 100644 --- a/code/D3MFExporter.cpp +++ b/code/D3MFExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/D3MFExporter.h b/code/D3MFExporter.h index 110862b99..e82120247 100644 --- a/code/D3MFExporter.h +++ b/code/D3MFExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/D3MFImporter.cpp b/code/D3MFImporter.cpp index de5708149..c218f4005 100644 --- a/code/D3MFImporter.cpp +++ b/code/D3MFImporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/D3MFImporter.h b/code/D3MFImporter.h index 701d056e2..3dbdf07bf 100644 --- a/code/D3MFImporter.h +++ b/code/D3MFImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/D3MFOpcPackage.cpp b/code/D3MFOpcPackage.cpp index 8161a31e4..2545a2750 100644 --- a/code/D3MFOpcPackage.cpp +++ b/code/D3MFOpcPackage.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/D3MFOpcPackage.h b/code/D3MFOpcPackage.h index 6d7b3d478..47c67f45f 100644 --- a/code/D3MFOpcPackage.h +++ b/code/D3MFOpcPackage.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/DXFHelper.h b/code/DXFHelper.h index daf2f97e2..0ec8e130b 100644 --- a/code/DXFHelper.h +++ b/code/DXFHelper.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/DXFLoader.cpp b/code/DXFLoader.cpp index 6710597df..ab86f89ae 100644 --- a/code/DXFLoader.cpp +++ b/code/DXFLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/DXFLoader.h b/code/DXFLoader.h index e7f534e98..044cf6bcb 100644 --- a/code/DXFLoader.h +++ b/code/DXFLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/DeboneProcess.cpp b/code/DeboneProcess.cpp index bc6afa36e..83b8336bc 100644 --- a/code/DeboneProcess.cpp +++ b/code/DeboneProcess.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/DeboneProcess.h b/code/DeboneProcess.h index 3da861362..ba77aba70 100644 --- a/code/DeboneProcess.h +++ b/code/DeboneProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/DefaultIOStream.cpp b/code/DefaultIOStream.cpp index 3b0a672a7..1c100b618 100644 --- a/code/DefaultIOStream.cpp +++ b/code/DefaultIOStream.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/DefaultIOSystem.cpp b/code/DefaultIOSystem.cpp index 67fd82f17..d40b67de3 100644 --- a/code/DefaultIOSystem.cpp +++ b/code/DefaultIOSystem.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/DefaultLogger.cpp b/code/DefaultLogger.cpp index 2871a4131..de3528d2b 100644 --- a/code/DefaultLogger.cpp +++ b/code/DefaultLogger.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/DefaultProgressHandler.h b/code/DefaultProgressHandler.h index 851c17be6..bd2cce00b 100644 --- a/code/DefaultProgressHandler.h +++ b/code/DefaultProgressHandler.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/DropFaceNormalsProcess.cpp b/code/DropFaceNormalsProcess.cpp index 57e8b972b..b11615bb8 100644 --- a/code/DropFaceNormalsProcess.cpp +++ b/code/DropFaceNormalsProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/DropFaceNormalsProcess.h b/code/DropFaceNormalsProcess.h index 6dbfe0397..0d116663b 100644 --- a/code/DropFaceNormalsProcess.h +++ b/code/DropFaceNormalsProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/EmbedTexturesProcess.cpp b/code/EmbedTexturesProcess.cpp index a6dd8457e..739382a05 100644 --- a/code/EmbedTexturesProcess.cpp +++ b/code/EmbedTexturesProcess.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/EmbedTexturesProcess.h b/code/EmbedTexturesProcess.h index ce9821652..cdf40bef7 100644 --- a/code/EmbedTexturesProcess.h +++ b/code/EmbedTexturesProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Exporter.cpp b/code/Exporter.cpp index 0414f661c..4ecb07081 100644 --- a/code/Exporter.cpp +++ b/code/Exporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/FBXAnimation.cpp b/code/FBXAnimation.cpp index 871d62578..874914431 100644 --- a/code/FBXAnimation.cpp +++ b/code/FBXAnimation.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXBinaryTokenizer.cpp b/code/FBXBinaryTokenizer.cpp index b81a9f945..7138df431 100644 --- a/code/FBXBinaryTokenizer.cpp +++ b/code/FBXBinaryTokenizer.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -83,7 +83,7 @@ namespace FBX { // e_unknown_21 = 1 << 21, // e_unknown_22 = 1 << 22, // e_unknown_23 = 1 << 23, -// e_flag_field_size_64_bit = 1 << 24, // Not sure what is +// e_flag_field_size_64_bit = 1 << 24, // Not sure what is // e_unknown_25 = 1 << 25, // e_unknown_26 = 1 << 26, // e_unknown_27 = 1 << 27, @@ -276,8 +276,8 @@ void ReadData(const char*& sbegin_out, const char*& send_out, const char* input, case 'f': case 'd': case 'l': - case 'i': { - + case 'i': + case 'c': { const uint32_t length = ReadWord(input, cursor, end); const uint32_t encoding = ReadWord(input, cursor, end); @@ -298,6 +298,10 @@ void ReadData(const char*& sbegin_out, const char*& send_out, const char* input, stride = 8; break; + case 'c': + stride = 1; + break; + default: ai_assert(false); }; diff --git a/code/FBXCommon.h b/code/FBXCommon.h index 60b040552..fcb20a5ca 100644 --- a/code/FBXCommon.h +++ b/code/FBXCommon.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXCompileConfig.h b/code/FBXCompileConfig.h index 2e7336e85..3a3841fa5 100644 --- a/code/FBXCompileConfig.h +++ b/code/FBXCompileConfig.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp index fd4986a3c..d88a3cacd 100644 --- a/code/FBXConverter.cpp +++ b/code/FBXConverter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXConverter.h b/code/FBXConverter.h index 796b3e2f0..398baa445 100644 --- a/code/FBXConverter.h +++ b/code/FBXConverter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXDeformer.cpp b/code/FBXDeformer.cpp index fc8b38e57..692755345 100644 --- a/code/FBXDeformer.cpp +++ b/code/FBXDeformer.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXDocument.cpp b/code/FBXDocument.cpp index deac89ca0..2e0d00a79 100644 --- a/code/FBXDocument.cpp +++ b/code/FBXDocument.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXDocument.h b/code/FBXDocument.h index 02accf92e..cbc6d60cd 100644 --- a/code/FBXDocument.h +++ b/code/FBXDocument.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXDocumentUtil.cpp b/code/FBXDocumentUtil.cpp index 6f1e18e42..f84691479 100644 --- a/code/FBXDocumentUtil.cpp +++ b/code/FBXDocumentUtil.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXExportNode.cpp b/code/FBXExportNode.cpp index a1171eca8..ace6a6ac2 100644 --- a/code/FBXExportNode.cpp +++ b/code/FBXExportNode.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXExportNode.h b/code/FBXExportNode.h index b9cd5156f..e1ebc3696 100644 --- a/code/FBXExportNode.h +++ b/code/FBXExportNode.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXExportProperty.cpp b/code/FBXExportProperty.cpp index 431750274..9981d6b1c 100644 --- a/code/FBXExportProperty.cpp +++ b/code/FBXExportProperty.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXExportProperty.h b/code/FBXExportProperty.h index cb3b0113f..9c9d37c36 100644 --- a/code/FBXExportProperty.h +++ b/code/FBXExportProperty.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXExporter.cpp b/code/FBXExporter.cpp index ce00deee3..acb122714 100644 --- a/code/FBXExporter.cpp +++ b/code/FBXExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXExporter.h b/code/FBXExporter.h index c27d1a8ce..71fb55c57 100644 --- a/code/FBXExporter.h +++ b/code/FBXExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXImportSettings.h b/code/FBXImportSettings.h index e612fddef..d5e1c2060 100644 --- a/code/FBXImportSettings.h +++ b/code/FBXImportSettings.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXImporter.cpp b/code/FBXImporter.cpp index b004bcd8c..72f8eea8e 100644 --- a/code/FBXImporter.cpp +++ b/code/FBXImporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXImporter.h b/code/FBXImporter.h index 870f1c49b..c365b2cdd 100644 --- a/code/FBXImporter.h +++ b/code/FBXImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXMaterial.cpp b/code/FBXMaterial.cpp index 75b2e3b4b..f5f6fda03 100644 --- a/code/FBXMaterial.cpp +++ b/code/FBXMaterial.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXMeshGeometry.cpp b/code/FBXMeshGeometry.cpp index faa5de75c..d75476b82 100644 --- a/code/FBXMeshGeometry.cpp +++ b/code/FBXMeshGeometry.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXMeshGeometry.h b/code/FBXMeshGeometry.h index 641461a69..d6d451217 100644 --- a/code/FBXMeshGeometry.h +++ b/code/FBXMeshGeometry.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXModel.cpp b/code/FBXModel.cpp index c16ca841c..589af36ac 100644 --- a/code/FBXModel.cpp +++ b/code/FBXModel.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXNodeAttribute.cpp b/code/FBXNodeAttribute.cpp index 1064151b3..b72e5637e 100644 --- a/code/FBXNodeAttribute.cpp +++ b/code/FBXNodeAttribute.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXParser.cpp b/code/FBXParser.cpp index 96d113bd1..b255c4734 100644 --- a/code/FBXParser.cpp +++ b/code/FBXParser.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXParser.h b/code/FBXParser.h index 389da3fed..7b0cf7203 100644 --- a/code/FBXParser.h +++ b/code/FBXParser.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXProperties.cpp b/code/FBXProperties.cpp index ca89743ca..8d7036b6a 100644 --- a/code/FBXProperties.cpp +++ b/code/FBXProperties.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXProperties.h b/code/FBXProperties.h index 404e04deb..58755542f 100644 --- a/code/FBXProperties.h +++ b/code/FBXProperties.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXTokenizer.cpp b/code/FBXTokenizer.cpp index c9dd1697a..252cce355 100644 --- a/code/FBXTokenizer.cpp +++ b/code/FBXTokenizer.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXTokenizer.h b/code/FBXTokenizer.h index e93982617..2af29743f 100644 --- a/code/FBXTokenizer.h +++ b/code/FBXTokenizer.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXUtil.cpp b/code/FBXUtil.cpp index 992c30efc..c184c4a00 100644 --- a/code/FBXUtil.cpp +++ b/code/FBXUtil.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FBXUtil.h b/code/FBXUtil.h index caea7f115..1a37d346b 100644 --- a/code/FBXUtil.h +++ b/code/FBXUtil.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FIReader.cpp b/code/FIReader.cpp index bdc447b34..2116316ca 100755 --- a/code/FIReader.cpp +++ b/code/FIReader.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FIReader.hpp b/code/FIReader.hpp index 9ff752d5c..29e3ddb1b 100644 --- a/code/FIReader.hpp +++ b/code/FIReader.hpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FileLogStream.h b/code/FileLogStream.h index 9966091d2..740c50319 100644 --- a/code/FileLogStream.h +++ b/code/FileLogStream.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FindDegenerates.cpp b/code/FindDegenerates.cpp index c0c0de08b..365f5d744 100644 --- a/code/FindDegenerates.cpp +++ b/code/FindDegenerates.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/FindDegenerates.h b/code/FindDegenerates.h index c234c57f5..880f5f16a 100644 --- a/code/FindDegenerates.h +++ b/code/FindDegenerates.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FindInstancesProcess.cpp b/code/FindInstancesProcess.cpp index 25dcc51e8..23f9d1581 100644 --- a/code/FindInstancesProcess.cpp +++ b/code/FindInstancesProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/FindInstancesProcess.h b/code/FindInstancesProcess.h index fb2ac6eb6..ab4a371c7 100644 --- a/code/FindInstancesProcess.h +++ b/code/FindInstancesProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/FindInvalidDataProcess.cpp b/code/FindInvalidDataProcess.cpp index b1a296a54..c99a98865 100644 --- a/code/FindInvalidDataProcess.cpp +++ b/code/FindInvalidDataProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team @@ -51,6 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // internal headers #include "FindInvalidDataProcess.h" #include "ProcessHelper.h" + #include #include #include @@ -60,37 +61,34 @@ using namespace Assimp; // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer FindInvalidDataProcess::FindInvalidDataProcess() - : configEpsilon(0.0) -{ +: configEpsilon(0.0) +, mIgnoreTexCoods( false ){ // nothing to do here } // ------------------------------------------------------------------------------------------------ // Destructor, private as well -FindInvalidDataProcess::~FindInvalidDataProcess() -{ +FindInvalidDataProcess::~FindInvalidDataProcess() { // nothing to do here } // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. -bool FindInvalidDataProcess::IsActive( unsigned int pFlags) const -{ +bool FindInvalidDataProcess::IsActive( unsigned int pFlags) const { return 0 != (pFlags & aiProcess_FindInvalidData); } // ------------------------------------------------------------------------------------------------ // Setup import configuration -void FindInvalidDataProcess::SetupProperties(const Importer* pImp) -{ +void FindInvalidDataProcess::SetupProperties(const Importer* pImp) { // Get the current value of AI_CONFIG_PP_FID_ANIM_ACCURACY configEpsilon = (0 != pImp->GetPropertyFloat(AI_CONFIG_PP_FID_ANIM_ACCURACY,0.f)); + mIgnoreTexCoods = pImp->GetPropertyBool(AI_CONFIG_PP_FID_IGNORE_TEXTURECOORDS, false); } // ------------------------------------------------------------------------------------------------ // Update mesh references in the node graph -void UpdateMeshReferences(aiNode* node, const std::vector& meshMapping) -{ +void UpdateMeshReferences(aiNode* node, const std::vector& meshMapping) { if (node->mNumMeshes) { unsigned int out = 0; for (unsigned int a = 0; a < node->mNumMeshes;++a) { @@ -116,8 +114,7 @@ void UpdateMeshReferences(aiNode* node, const std::vector& meshMap // ------------------------------------------------------------------------------------------------ // Executes the post processing step on the given imported data. -void FindInvalidDataProcess::Execute( aiScene* pScene) -{ +void FindInvalidDataProcess::Execute( aiScene* pScene) { ASSIMP_LOG_DEBUG("FindInvalidDataProcess begin"); bool out = false; @@ -171,17 +168,18 @@ void FindInvalidDataProcess::Execute( aiScene* pScene) // ------------------------------------------------------------------------------------------------ template -inline const char* ValidateArrayContents(const T* /*arr*/, unsigned int /*size*/, - const std::vector& /*dirtyMask*/, bool /*mayBeIdentical = false*/, bool /*mayBeZero = true*/) +inline +const char* ValidateArrayContents(const T* /*arr*/, unsigned int /*size*/, + const std::vector& /*dirtyMask*/, bool /*mayBeIdentical = false*/, bool /*mayBeZero = true*/) { - return NULL; + return nullptr; } // ------------------------------------------------------------------------------------------------ template <> -inline const char* ValidateArrayContents(const aiVector3D* arr, unsigned int size, - const std::vector& dirtyMask, bool mayBeIdentical , bool mayBeZero ) -{ +inline +const char* ValidateArrayContents(const aiVector3D* arr, unsigned int size, + const std::vector& dirtyMask, bool mayBeIdentical , bool mayBeZero ) { bool b = false; unsigned int cnt = 0; for (unsigned int i = 0; i < size;++i) { @@ -203,14 +201,14 @@ inline const char* ValidateArrayContents(const aiVector3D* arr, unsi if (cnt > 1 && !b && !mayBeIdentical) { return "All vectors are identical"; } - return NULL; + return nullptr; } // ------------------------------------------------------------------------------------------------ template -inline bool ProcessArray(T*& in, unsigned int num,const char* name, - const std::vector& dirtyMask, bool mayBeIdentical = false, bool mayBeZero = true) -{ +inline +bool ProcessArray(T*& in, unsigned int num,const char* name, + const std::vector& dirtyMask, bool mayBeIdentical = false, bool mayBeZero = true) { const char* err = ValidateArrayContents(in,num,dirtyMask,mayBeIdentical,mayBeZero); if (err) { ASSIMP_LOG_ERROR_F( "FindInvalidDataProcess fails on mesh ", name, ": ", err); @@ -251,23 +249,20 @@ bool EpsilonCompare(const aiQuatKey& n, const aiQuatKey& s, ai_real e // ------------------------------------------------------------------------------------------------ template -inline bool AllIdentical(T* in, unsigned int num, ai_real epsilon) -{ +inline +bool AllIdentical(T* in, unsigned int num, ai_real epsilon) { if (num <= 1) { return true; } - if (epsilon > 0.f) { + if (fabs(epsilon) > 0.f) { for (unsigned int i = 0; i < num-1;++i) { - if (!EpsilonCompare(in[i],in[i+1],epsilon)) { return false; } } - } - else { + } else { for (unsigned int i = 0; i < num-1;++i) { - if (in[i] != in[i+1]) { return false; } @@ -278,27 +273,24 @@ inline bool AllIdentical(T* in, unsigned int num, ai_real epsilon) // ------------------------------------------------------------------------------------------------ // Search an animation for invalid content -void FindInvalidDataProcess::ProcessAnimation (aiAnimation* anim) -{ +void FindInvalidDataProcess::ProcessAnimation (aiAnimation* anim) { // Process all animation channels - for (unsigned int a = 0; a < anim->mNumChannels;++a) { + for ( unsigned int a = 0; a < anim->mNumChannels; ++a ) { ProcessAnimationChannel( anim->mChannels[a]); } } // ------------------------------------------------------------------------------------------------ -void FindInvalidDataProcess::ProcessAnimationChannel (aiNodeAnim* anim) -{ - int i = 0; - - // ScenePreprocessor's work ... - ai_assert((0 != anim->mPositionKeys && 0 != anim->mRotationKeys && 0 != anim->mScalingKeys)); +void FindInvalidDataProcess::ProcessAnimationChannel (aiNodeAnim* anim) { + ai_assert( 0 != anim->mPositionKeys ); + ai_assert( 0 != anim->mRotationKeys ); + ai_assert( 0 != anim->mScalingKeys ); // Check whether all values in a tracks are identical - in this case // we can remove al keys except one. // POSITIONS - if (anim->mNumPositionKeys > 1 && AllIdentical(anim->mPositionKeys,anim->mNumPositionKeys,configEpsilon)) - { + int i = 0; + if (anim->mNumPositionKeys > 1 && AllIdentical(anim->mPositionKeys,anim->mNumPositionKeys,configEpsilon)) { aiVectorKey v = anim->mPositionKeys[0]; // Reallocate ... we need just ONE element, it makes no sense to reuse the array @@ -309,8 +301,7 @@ void FindInvalidDataProcess::ProcessAnimationChannel (aiNodeAnim* anim) } // ROTATIONS - if (anim->mNumRotationKeys > 1 && AllIdentical(anim->mRotationKeys,anim->mNumRotationKeys,configEpsilon)) - { + if (anim->mNumRotationKeys > 1 && AllIdentical(anim->mRotationKeys,anim->mNumRotationKeys,configEpsilon)) { aiQuatKey v = anim->mRotationKeys[0]; // Reallocate ... we need just ONE element, it makes no sense to reuse the array @@ -321,8 +312,7 @@ void FindInvalidDataProcess::ProcessAnimationChannel (aiNodeAnim* anim) } // SCALINGS - if (anim->mNumScalingKeys > 1 && AllIdentical(anim->mScalingKeys,anim->mNumScalingKeys,configEpsilon)) - { + if (anim->mNumScalingKeys > 1 && AllIdentical(anim->mScalingKeys,anim->mNumScalingKeys,configEpsilon)) { aiVectorKey v = anim->mScalingKeys[0]; // Reallocate ... we need just ONE element, it makes no sense to reuse the array @@ -331,8 +321,9 @@ void FindInvalidDataProcess::ProcessAnimationChannel (aiNodeAnim* anim) anim->mScalingKeys[0] = v; i = 1; } - if (1 == i) + if ( 1 == i ) { ASSIMP_LOG_WARN("Simplified dummy tracks with just one key"); + } } // ------------------------------------------------------------------------------------------------ @@ -360,18 +351,20 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh) } // process texture coordinates - for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS && pMesh->mTextureCoords[i]; ++i) { - if (ProcessArray(pMesh->mTextureCoords[i], pMesh->mNumVertices, "uvcoords", dirtyMask)) { - pMesh->mNumUVComponents[i] = 0; + if (!mIgnoreTexCoods) { + for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS && pMesh->mTextureCoords[i]; ++i) { + if (ProcessArray(pMesh->mTextureCoords[i], pMesh->mNumVertices, "uvcoords", dirtyMask)) { + pMesh->mNumUVComponents[i] = 0; - // delete all subsequent texture coordinate sets. - for (unsigned int a = i + 1; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a) { - delete[] pMesh->mTextureCoords[a]; - pMesh->mTextureCoords[a] = NULL; - pMesh->mNumUVComponents[a] = 0; + // delete all subsequent texture coordinate sets. + for (unsigned int a = i + 1; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a) { + delete[] pMesh->mTextureCoords[a]; + pMesh->mTextureCoords[a] = NULL; + pMesh->mNumUVComponents[a] = 0; + } + + ret = true; } - - ret = true; } } @@ -388,13 +381,11 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh) aiPrimitiveType_POLYGON & pMesh->mPrimitiveTypes) { // We need to update the lookup-table - for (unsigned int m = 0; m < pMesh->mNumFaces;++m) - { - const aiFace& f = pMesh->mFaces[m]; + for (unsigned int m = 0; m < pMesh->mNumFaces;++m) { + const aiFace& f = pMesh->mFaces[ m ]; if (f.mNumIndices < 3) { dirtyMask[f.mIndices[0]] = true; - if (f.mNumIndices == 2) { dirtyMask[f.mIndices[1]] = true; } @@ -403,7 +394,9 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh) } // Normals, tangents and bitangents are undefined for // the whole mesh (and should not even be there) - else return ret; + else { + return ret; + } } // Process mesh normals @@ -426,5 +419,4 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh) return ret ? 1 : 0; } - #endif // !! ASSIMP_BUILD_NO_FINDINVALIDDATA_PROCESS diff --git a/code/FindInvalidDataProcess.h b/code/FindInvalidDataProcess.h index 00dfef145..8504fb7b1 100644 --- a/code/FindInvalidDataProcess.h +++ b/code/FindInvalidDataProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -41,7 +41,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @file Defines a post processing step to search an importer's output - for data that is obviously invalid */ + * for data that is obviously invalid + */ #ifndef AI_FINDINVALIDDATA_H_INC #define AI_FINDINVALIDDATA_H_INC @@ -50,7 +51,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include struct aiMesh; + class FindInvalidDataProcessTest; + namespace Assimp { // --------------------------------------------------------------------------- @@ -59,15 +62,11 @@ namespace Assimp { * * Originally this was a workaround for some models written by Blender * which have zero normal vectors. */ -class ASSIMP_API FindInvalidDataProcess : public BaseProcess -{ +class ASSIMP_API FindInvalidDataProcess : public BaseProcess { public: - FindInvalidDataProcess(); ~FindInvalidDataProcess(); -public: - // ------------------------------------------------------------------- // bool IsActive( unsigned int pFlags) const; @@ -80,26 +79,25 @@ public: // Run the step void Execute( aiScene* pScene); -public: - // ------------------------------------------------------------------- - /** Executes the postprocessing step on the given mesh + /** Executes the post-processing step on the given mesh * @param pMesh The mesh to process. * @return 0 - nothing, 1 - removed sth, 2 - please delete me */ int ProcessMesh( aiMesh* pMesh); // ------------------------------------------------------------------- - /** Executes the postprocessing step on the given animation + /** Executes the post-processing step on the given animation * @param anim The animation to process. */ void ProcessAnimation (aiAnimation* anim); // ------------------------------------------------------------------- - /** Executes the postprocessing step on the given anim channel + /** Executes the post-processing step on the given anim channel * @param anim The animation channel to process.*/ void ProcessAnimationChannel (aiNodeAnim* anim); private: ai_real configEpsilon; + bool mIgnoreTexCoods; }; } // end of namespace Assimp diff --git a/code/FixNormalsStep.cpp b/code/FixNormalsStep.cpp index 668b50c24..bbbe6899b 100644 --- a/code/FixNormalsStep.cpp +++ b/code/FixNormalsStep.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/FixNormalsStep.h b/code/FixNormalsStep.h index 389e6e1a6..6be27faef 100644 --- a/code/FixNormalsStep.h +++ b/code/FixNormalsStep.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/GenFaceNormalsProcess.cpp b/code/GenFaceNormalsProcess.cpp index 43960ac3b..028334dec 100644 --- a/code/GenFaceNormalsProcess.cpp +++ b/code/GenFaceNormalsProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/GenFaceNormalsProcess.h b/code/GenFaceNormalsProcess.h index e2f41e07f..c80ec9fdd 100644 --- a/code/GenFaceNormalsProcess.h +++ b/code/GenFaceNormalsProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/GenVertexNormalsProcess.cpp b/code/GenVertexNormalsProcess.cpp index 1778ef513..3f6c2f86b 100644 --- a/code/GenVertexNormalsProcess.cpp +++ b/code/GenVertexNormalsProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/GenVertexNormalsProcess.h b/code/GenVertexNormalsProcess.h index 2efafa302..9142ad26f 100644 --- a/code/GenVertexNormalsProcess.h +++ b/code/GenVertexNormalsProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/HMPFileData.h b/code/HMPFileData.h index 962f2f9c7..ab4100174 100644 --- a/code/HMPFileData.h +++ b/code/HMPFileData.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/HMPLoader.cpp b/code/HMPLoader.cpp index 7f53f9b54..7c1d0b65f 100644 --- a/code/HMPLoader.cpp +++ b/code/HMPLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/HMPLoader.h b/code/HMPLoader.h index 4e513aee6..d0a34bfb7 100644 --- a/code/HMPLoader.h +++ b/code/HMPLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/HalfLifeFileData.h b/code/HalfLifeFileData.h index 7c55657d4..ef328edf8 100644 --- a/code/HalfLifeFileData.h +++ b/code/HalfLifeFileData.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/IRRLoader.cpp b/code/IRRLoader.cpp index 9432eff61..6bc4b8ce4 100644 --- a/code/IRRLoader.cpp +++ b/code/IRRLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/IRRLoader.h b/code/IRRLoader.h index 3bd39092a..e245a0a6f 100644 --- a/code/IRRLoader.h +++ b/code/IRRLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/IRRMeshLoader.cpp b/code/IRRMeshLoader.cpp index 85de42195..f3aed5943 100644 --- a/code/IRRMeshLoader.cpp +++ b/code/IRRMeshLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/IRRMeshLoader.h b/code/IRRMeshLoader.h index ef6a8a11b..d8b42d78d 100644 --- a/code/IRRMeshLoader.h +++ b/code/IRRMeshLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/IRRShared.cpp b/code/IRRShared.cpp index 1e69f1d09..ecac031ab 100644 --- a/code/IRRShared.cpp +++ b/code/IRRShared.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/Importer.cpp b/code/Importer.cpp index da395edb2..65b16471c 100644 --- a/code/Importer.cpp +++ b/code/Importer.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/Importer.h b/code/Importer.h index c6628c428..a439d99c2 100644 --- a/code/Importer.h +++ b/code/Importer.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Importer/IFC/IFCCurve.cpp b/code/Importer/IFC/IFCCurve.cpp index af58e7b10..b0a1fdaa9 100644 --- a/code/Importer/IFC/IFCCurve.cpp +++ b/code/Importer/IFC/IFCCurve.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Importer/IFC/IFCLoader.cpp b/code/Importer/IFC/IFCLoader.cpp index 2c95872d3..368f98ec0 100644 --- a/code/Importer/IFC/IFCLoader.cpp +++ b/code/Importer/IFC/IFCLoader.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Importer/IFC/IFCLoader.h b/code/Importer/IFC/IFCLoader.h index 99e3e8ed9..678c60343 100644 --- a/code/Importer/IFC/IFCLoader.h +++ b/code/Importer/IFC/IFCLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Importer/IFC/IFCMaterial.cpp b/code/Importer/IFC/IFCMaterial.cpp index 423d1471e..5fda0a1de 100644 --- a/code/Importer/IFC/IFCMaterial.cpp +++ b/code/Importer/IFC/IFCMaterial.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Importer/IFC/IFCProfile.cpp b/code/Importer/IFC/IFCProfile.cpp index 2236d0d9b..daafc9afe 100644 --- a/code/Importer/IFC/IFCProfile.cpp +++ b/code/Importer/IFC/IFCProfile.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Importer/IFC/IFCUtil.cpp b/code/Importer/IFC/IFCUtil.cpp index 06cc4405a..b9a8538b0 100644 --- a/code/Importer/IFC/IFCUtil.cpp +++ b/code/Importer/IFC/IFCUtil.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Importer/IFC/IFCUtil.h b/code/Importer/IFC/IFCUtil.h index 194206d4b..17051210e 100644 --- a/code/Importer/IFC/IFCUtil.h +++ b/code/Importer/IFC/IFCUtil.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Importer/STEPParser/STEPFileEncoding.cpp b/code/Importer/STEPParser/STEPFileEncoding.cpp index 70d5f4e4b..1d7ac3418 100644 --- a/code/Importer/STEPParser/STEPFileEncoding.cpp +++ b/code/Importer/STEPParser/STEPFileEncoding.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Importer/STEPParser/STEPFileEncoding.h b/code/Importer/STEPParser/STEPFileEncoding.h index 232cb81ba..09f16ba33 100644 --- a/code/Importer/STEPParser/STEPFileEncoding.h +++ b/code/Importer/STEPParser/STEPFileEncoding.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Importer/STEPParser/STEPFileReader.cpp b/code/Importer/STEPParser/STEPFileReader.cpp index c7cad05ae..1707899a1 100644 --- a/code/Importer/STEPParser/STEPFileReader.cpp +++ b/code/Importer/STEPParser/STEPFileReader.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -63,7 +63,6 @@ std::string AddLineNumber(const std::string& s,uint64_t line /*= LINE_NOT_SPECIF return line == STEP::SyntaxError::LINE_NOT_SPECIFIED ? prefix+s : static_cast( (Formatter::format(),prefix,"(line ",line,") ",s) ); } - // ------------------------------------------------------------------------------------------------ std::string AddEntityID(const std::string& s,uint64_t entity /*= ENTITY_NOT_SPECIFIED*/, const std::string& prefix = "") { @@ -243,7 +242,6 @@ void STEP::ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme, std::string::size_type n2 = s.find_last_of(')'); if (n2 == std::string::npos || n2 < n1 || n2 == s.length() - 1 || s[n2 + 1] != ';') { - has_next = true; bool ok = false; for( ++splitter; splitter; ++splitter) { @@ -251,14 +249,14 @@ void STEP::ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme, if (snext.empty()) { continue; } + // the next line doesn't start an entity, so maybe it is // just a continuation for this line, keep going if (!IsEntityDef(snext)) { s.append(snext); n2 = s.find_last_of(')'); ok = !(n2 == std::string::npos || n2 < n1 || n2 == s.length() - 1 || s[n2 + 1] != ';'); - } - else { + } else { break; } } @@ -424,10 +422,8 @@ std::shared_ptr EXPRESS::DataType::Parse(const char*& i return std::make_shared(neg?-num:num); } - // ------------------------------------------------------------------------------------------------ -std::shared_ptr EXPRESS::LIST::Parse(const char*& inout,uint64_t line, const EXPRESS::ConversionSchema* schema /*= NULL*/) -{ +std::shared_ptr EXPRESS::LIST::Parse(const char*& inout,uint64_t line, const EXPRESS::ConversionSchema* schema /*= NULL*/) { const std::shared_ptr list = std::make_shared(); EXPRESS::LIST::MemberList& members = list->members; @@ -468,61 +464,73 @@ std::shared_ptr EXPRESS::LIST::Parse(const char*& inout,uin return list; } +// ------------------------------------------------------------------------------------------------ +static void handleSkippedDepthFromToken(const char *a, int64_t &skip_depth ) { + if (*a == '(') { + ++skip_depth; + } else if (*a == ')') { + --skip_depth; + } +} + +// ------------------------------------------------------------------------------------------------ +static int64_t getIdFromToken(const char *a) { + const char *tmp; + const int64_t num = static_cast(strtoul10_64(a + 1, &tmp)); + + return num; +} // ------------------------------------------------------------------------------------------------ STEP::LazyObject::LazyObject(DB& db, uint64_t id,uint64_t /*line*/, const char* const type,const char* args) - : id(id) - , type(type) - , db(db) - , args(args) - , obj() -{ +: id(id) +, type(type) +, db(db) +, args(args) +, obj() { // find any external references and store them in the database. // this helps us emulate STEPs INVERSE fields. - if (db.KeepInverseIndicesForType(type)) { - const char* a = args; + if (!db.KeepInverseIndicesForType(type)) { + return; + } - // do a quick scan through the argument tuple and watch out for entity references - int64_t skip_depth = 0; - while(*a) { - if (*a == '(') { - ++skip_depth; - } - else if (*a == ')') { - --skip_depth; - } + // do a quick scan through the argument tuple and watch out for entity references + const char *a( args ); + int64_t skip_depth( 0 ); + while ( *a ) { + handleSkippedDepthFromToken(a, skip_depth); + /*if (*a == '(') { + ++skip_depth; + } else if (*a == ')') { + --skip_depth; + }*/ - if (skip_depth >= 1 && *a=='#') { - if (*(a + 1) != '#') - { - const char* tmp; - const int64_t num = static_cast(strtoul10_64(a + 1, &tmp)); - db.MarkRef(num, id); - } - else - { - ++a; - } - } - ++a; + if (skip_depth >= 1 && *a=='#') { + if (*(a + 1) != '#') { + /*const char *tmp; + const int64_t num = static_cast(strtoul10_64(a + 1, &tmp)); + db.MarkRef(num, id);*/ + db.MarkRef(getIdFromToken(a), id); + } else { + ++a; + } } - + ++a; } } // ------------------------------------------------------------------------------------------------ -STEP::LazyObject::~LazyObject() -{ +STEP::LazyObject::~LazyObject() { // make sure the right dtor/operator delete get called if (obj) { delete obj; + } else { + delete[] args; } - else delete[] args; } // ------------------------------------------------------------------------------------------------ -void STEP::LazyObject::LazyInit() const -{ +void STEP::LazyObject::LazyInit() const { const EXPRESS::ConversionSchema& schema = db.GetSchema(); STEP::ConvertObjectProc proc = schema.GetConverterProc(type); diff --git a/code/Importer/STEPParser/STEPFileReader.h b/code/Importer/STEPParser/STEPFileReader.h index 667d28bfd..8fc462749 100644 --- a/code/Importer/STEPParser/STEPFileReader.h +++ b/code/Importer/STEPParser/STEPFileReader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -68,4 +68,4 @@ void ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme, const char* const } // ! STEP } // ! Assimp -#endif +#endif // INCLUDED_AI_STEPFILEREADER_H diff --git a/code/Importer/StepFile/StepFileImporter.cpp b/code/Importer/StepFile/StepFileImporter.cpp index edfe30754..26c456ac9 100644 --- a/code/Importer/StepFile/StepFileImporter.cpp +++ b/code/Importer/StepFile/StepFileImporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/Importer/StepFile/StepFileImporter.h b/code/Importer/StepFile/StepFileImporter.h index 68d5a09ad..70f65fdcf 100644 --- a/code/Importer/StepFile/StepFileImporter.h +++ b/code/Importer/StepFile/StepFileImporter.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/ImporterRegistry.cpp b/code/ImporterRegistry.cpp index e6cf8299e..747815fa6 100644 --- a/code/ImporterRegistry.cpp +++ b/code/ImporterRegistry.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/ImproveCacheLocality.cpp b/code/ImproveCacheLocality.cpp index adcbc92fe..be6452dda 100644 --- a/code/ImproveCacheLocality.cpp +++ b/code/ImproveCacheLocality.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/ImproveCacheLocality.h b/code/ImproveCacheLocality.h index 18eb5e460..1b29ee0d6 100644 --- a/code/ImproveCacheLocality.h +++ b/code/ImproveCacheLocality.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/JoinVerticesProcess.cpp b/code/JoinVerticesProcess.cpp index b91f44048..914ec05b4 100644 --- a/code/JoinVerticesProcess.cpp +++ b/code/JoinVerticesProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/JoinVerticesProcess.h b/code/JoinVerticesProcess.h index a7366efbe..66fa362de 100644 --- a/code/JoinVerticesProcess.h +++ b/code/JoinVerticesProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/LWOAnimation.cpp b/code/LWOAnimation.cpp index ff02a8eab..3a0d2c392 100644 --- a/code/LWOAnimation.cpp +++ b/code/LWOAnimation.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/LWOAnimation.h b/code/LWOAnimation.h index f7b0f177b..dd29695cc 100644 --- a/code/LWOAnimation.h +++ b/code/LWOAnimation.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/LWOBLoader.cpp b/code/LWOBLoader.cpp index fabf99cad..b24957072 100644 --- a/code/LWOBLoader.cpp +++ b/code/LWOBLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/LWOFileData.h b/code/LWOFileData.h index b3a963199..a702d9363 100644 --- a/code/LWOFileData.h +++ b/code/LWOFileData.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/LWOLoader.cpp b/code/LWOLoader.cpp index fbefe4a1e..d1c2641e8 100644 --- a/code/LWOLoader.cpp +++ b/code/LWOLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/LWOLoader.h b/code/LWOLoader.h index 4d42eb2d2..05b958fd2 100644 --- a/code/LWOLoader.h +++ b/code/LWOLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/LWOMaterial.cpp b/code/LWOMaterial.cpp index 15c210460..55d0e23f1 100644 --- a/code/LWOMaterial.cpp +++ b/code/LWOMaterial.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/LWSLoader.cpp b/code/LWSLoader.cpp index 6f8cbe78d..d0811625c 100644 --- a/code/LWSLoader.cpp +++ b/code/LWSLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/LWSLoader.h b/code/LWSLoader.h index 9f1636f21..3c24b59ea 100644 --- a/code/LWSLoader.h +++ b/code/LWSLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/LimitBoneWeightsProcess.cpp b/code/LimitBoneWeightsProcess.cpp index cc87e407c..d560f1928 100644 --- a/code/LimitBoneWeightsProcess.cpp +++ b/code/LimitBoneWeightsProcess.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/LimitBoneWeightsProcess.h b/code/LimitBoneWeightsProcess.h index 2161b89a8..3602fd8ed 100644 --- a/code/LimitBoneWeightsProcess.h +++ b/code/LimitBoneWeightsProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MD2FileData.h b/code/MD2FileData.h index 4b893bbb1..9fcb8b0e2 100644 --- a/code/MD2FileData.h +++ b/code/MD2FileData.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MD2Loader.cpp b/code/MD2Loader.cpp index cfd5458e7..a26f70533 100644 --- a/code/MD2Loader.cpp +++ b/code/MD2Loader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/MD2Loader.h b/code/MD2Loader.h index f26b31736..a3863f366 100644 --- a/code/MD2Loader.h +++ b/code/MD2Loader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MD2NormalTable.h b/code/MD2NormalTable.h index dd2c837b4..f82b57683 100644 --- a/code/MD2NormalTable.h +++ b/code/MD2NormalTable.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MD3FileData.h b/code/MD3FileData.h index 910813fc4..0978e548d 100644 --- a/code/MD3FileData.h +++ b/code/MD3FileData.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MD3Loader.cpp b/code/MD3Loader.cpp index d12f2d5fd..0faffd5f9 100644 --- a/code/MD3Loader.cpp +++ b/code/MD3Loader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/MD3Loader.h b/code/MD3Loader.h index 8ac3cdc68..01b840228 100644 --- a/code/MD3Loader.h +++ b/code/MD3Loader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MD5Loader.cpp b/code/MD5Loader.cpp index a4285ba03..346b59504 100644 --- a/code/MD5Loader.cpp +++ b/code/MD5Loader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/MD5Loader.h b/code/MD5Loader.h index 1ba5fea68..e15cc3fb9 100644 --- a/code/MD5Loader.h +++ b/code/MD5Loader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MD5Parser.cpp b/code/MD5Parser.cpp index 6f942228c..2770226a9 100644 --- a/code/MD5Parser.cpp +++ b/code/MD5Parser.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/MD5Parser.h b/code/MD5Parser.h index 853268424..f7ff5303f 100644 --- a/code/MD5Parser.h +++ b/code/MD5Parser.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MDCFileData.h b/code/MDCFileData.h index c599a930a..052473158 100644 --- a/code/MDCFileData.h +++ b/code/MDCFileData.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MDCLoader.cpp b/code/MDCLoader.cpp index 03b3336de..42947f123 100644 --- a/code/MDCLoader.cpp +++ b/code/MDCLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/MDCLoader.h b/code/MDCLoader.h index 5bbe2b666..a21b8a55a 100644 --- a/code/MDCLoader.h +++ b/code/MDCLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MDLDefaultColorMap.h b/code/MDLDefaultColorMap.h index b96a60a06..58f642884 100644 --- a/code/MDLDefaultColorMap.h +++ b/code/MDLDefaultColorMap.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MDLFileData.h b/code/MDLFileData.h index f9be6761b..f33a57731 100644 --- a/code/MDLFileData.h +++ b/code/MDLFileData.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MDLLoader.cpp b/code/MDLLoader.cpp index eb067a1c9..256d79a2c 100644 --- a/code/MDLLoader.cpp +++ b/code/MDLLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/MDLLoader.h b/code/MDLLoader.h index f1504beea..7009d5ba4 100644 --- a/code/MDLLoader.h +++ b/code/MDLLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MDLMaterialLoader.cpp b/code/MDLMaterialLoader.cpp index 2c21b188b..0a196761f 100644 --- a/code/MDLMaterialLoader.cpp +++ b/code/MDLMaterialLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/MMDCpp14.h b/code/MMDCpp14.h index 5ec2fd975..638b0bfd2 100644 --- a/code/MMDCpp14.h +++ b/code/MMDCpp14.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MMDPmdParser.h b/code/MMDPmdParser.h index d61a355fb..d2f2224aa 100644 --- a/code/MMDPmdParser.h +++ b/code/MMDPmdParser.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MMDPmxParser.cpp b/code/MMDPmxParser.cpp index 2c5bd9a8d..7425ceac2 100644 --- a/code/MMDPmxParser.cpp +++ b/code/MMDPmxParser.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MMDPmxParser.h b/code/MMDPmxParser.h index 43cad5899..cf523a129 100644 --- a/code/MMDPmxParser.h +++ b/code/MMDPmxParser.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MMDVmdParser.h b/code/MMDVmdParser.h index 600959e94..947c3a242 100644 --- a/code/MMDVmdParser.h +++ b/code/MMDVmdParser.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MS3DLoader.cpp b/code/MS3DLoader.cpp index c659d2ec7..c0d0eddbe 100644 --- a/code/MS3DLoader.cpp +++ b/code/MS3DLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/MS3DLoader.h b/code/MS3DLoader.h index 2efa3be5f..3e39dc79f 100644 --- a/code/MS3DLoader.h +++ b/code/MS3DLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MakeVerboseFormat.cpp b/code/MakeVerboseFormat.cpp index b6f5cabd9..50ff5ed93 100644 --- a/code/MakeVerboseFormat.cpp +++ b/code/MakeVerboseFormat.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/MakeVerboseFormat.h b/code/MakeVerboseFormat.h index 292d9bea6..d12db63ae 100644 --- a/code/MakeVerboseFormat.h +++ b/code/MakeVerboseFormat.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MaterialSystem.cpp b/code/MaterialSystem.cpp index e9ca475fb..03d5a18a3 100644 --- a/code/MaterialSystem.cpp +++ b/code/MaterialSystem.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/MaterialSystem.h b/code/MaterialSystem.h index d6f2cea46..67d53578c 100644 --- a/code/MaterialSystem.h +++ b/code/MaterialSystem.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/NDOLoader.cpp b/code/NDOLoader.cpp index 17c9e135b..d33f40c75 100644 --- a/code/NDOLoader.cpp +++ b/code/NDOLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/NFFLoader.cpp b/code/NFFLoader.cpp index 1c7283db6..10a7d1aff 100644 --- a/code/NFFLoader.cpp +++ b/code/NFFLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/NFFLoader.h b/code/NFFLoader.h index 1e3f0bd26..bc4840e14 100644 --- a/code/NFFLoader.h +++ b/code/NFFLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OFFLoader.cpp b/code/OFFLoader.cpp index a72e6d9d4..afd44a539 100644 --- a/code/OFFLoader.cpp +++ b/code/OFFLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/OFFLoader.h b/code/OFFLoader.h index ed1ed98c1..3fca77e1b 100644 --- a/code/OFFLoader.h +++ b/code/OFFLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ObjExporter.cpp b/code/ObjExporter.cpp index 1542efebf..08cba43f7 100644 --- a/code/ObjExporter.cpp +++ b/code/ObjExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ObjExporter.h b/code/ObjExporter.h index bd745b593..0d2b48d6b 100644 --- a/code/ObjExporter.h +++ b/code/ObjExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ObjFileData.h b/code/ObjFileData.h index 38786e6f4..5ff9db68c 100644 --- a/code/ObjFileData.h +++ b/code/ObjFileData.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ObjFileImporter.cpp b/code/ObjFileImporter.cpp index 93b2de6f4..782b62a73 100644 --- a/code/ObjFileImporter.cpp +++ b/code/ObjFileImporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/ObjFileImporter.h b/code/ObjFileImporter.h index f564fe22b..0df2ef731 100644 --- a/code/ObjFileImporter.h +++ b/code/ObjFileImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ObjFileMtlImporter.cpp b/code/ObjFileMtlImporter.cpp index 16bde1b43..dd9cc3ce2 100644 --- a/code/ObjFileMtlImporter.cpp +++ b/code/ObjFileMtlImporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/ObjFileMtlImporter.h b/code/ObjFileMtlImporter.h index d6a7b1f1a..731952359 100644 --- a/code/ObjFileMtlImporter.h +++ b/code/ObjFileMtlImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ObjFileParser.cpp b/code/ObjFileParser.cpp index d3bb6f50f..d303cb8b9 100644 --- a/code/ObjFileParser.cpp +++ b/code/ObjFileParser.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/ObjFileParser.h b/code/ObjFileParser.h index 7cf06ae05..e00382f4c 100644 --- a/code/ObjFileParser.h +++ b/code/ObjFileParser.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ObjTools.h b/code/ObjTools.h index 842efd749..3f4c41033 100644 --- a/code/ObjTools.h +++ b/code/ObjTools.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OgreBinarySerializer.cpp b/code/OgreBinarySerializer.cpp index 8948844d0..b2326e244 100644 --- a/code/OgreBinarySerializer.cpp +++ b/code/OgreBinarySerializer.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OgreBinarySerializer.h b/code/OgreBinarySerializer.h index a31047c70..8bab00ce9 100644 --- a/code/OgreBinarySerializer.h +++ b/code/OgreBinarySerializer.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OgreImporter.cpp b/code/OgreImporter.cpp index e77654d7b..c2c328a47 100644 --- a/code/OgreImporter.cpp +++ b/code/OgreImporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OgreImporter.h b/code/OgreImporter.h index 8f088a3cc..321d58763 100644 --- a/code/OgreImporter.h +++ b/code/OgreImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OgreMaterial.cpp b/code/OgreMaterial.cpp index ceca04da1..47cb17eb0 100644 --- a/code/OgreMaterial.cpp +++ b/code/OgreMaterial.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OgreParsingUtils.h b/code/OgreParsingUtils.h index c6b6e0caf..8786521e4 100644 --- a/code/OgreParsingUtils.h +++ b/code/OgreParsingUtils.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OgreStructs.cpp b/code/OgreStructs.cpp index b2ad8e089..7962202c1 100644 --- a/code/OgreStructs.cpp +++ b/code/OgreStructs.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OgreStructs.h b/code/OgreStructs.h index dfe0346dc..6ea211e10 100644 --- a/code/OgreStructs.h +++ b/code/OgreStructs.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OgreXmlSerializer.cpp b/code/OgreXmlSerializer.cpp index 5805a528d..19fd3ad61 100644 --- a/code/OgreXmlSerializer.cpp +++ b/code/OgreXmlSerializer.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OgreXmlSerializer.h b/code/OgreXmlSerializer.h index c0f09096c..7e5e83fec 100644 --- a/code/OgreXmlSerializer.h +++ b/code/OgreXmlSerializer.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OpenGEXExporter.cpp b/code/OpenGEXExporter.cpp index ea2f64e8f..635174185 100644 --- a/code/OpenGEXExporter.cpp +++ b/code/OpenGEXExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OpenGEXExporter.h b/code/OpenGEXExporter.h index 76d2418a4..b9b54c208 100644 --- a/code/OpenGEXExporter.h +++ b/code/OpenGEXExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OpenGEXImporter.cpp b/code/OpenGEXImporter.cpp index 2de0aabc0..a7a143035 100644 --- a/code/OpenGEXImporter.cpp +++ b/code/OpenGEXImporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OpenGEXImporter.h b/code/OpenGEXImporter.h index 8e86a4aa8..22b5cabef 100644 --- a/code/OpenGEXImporter.h +++ b/code/OpenGEXImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OpenGEXStructs.h b/code/OpenGEXStructs.h index 6cd7488e9..2c83e8660 100644 --- a/code/OpenGEXStructs.h +++ b/code/OpenGEXStructs.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OptimizeGraph.cpp b/code/OptimizeGraph.cpp index 59a764d5c..add9ab79e 100644 --- a/code/OptimizeGraph.cpp +++ b/code/OptimizeGraph.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/OptimizeGraph.h b/code/OptimizeGraph.h index 6781ec534..e5bbed767 100644 --- a/code/OptimizeGraph.h +++ b/code/OptimizeGraph.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/OptimizeMeshes.cpp b/code/OptimizeMeshes.cpp index 25575b049..3f6765f6c 100644 --- a/code/OptimizeMeshes.cpp +++ b/code/OptimizeMeshes.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/OptimizeMeshes.h b/code/OptimizeMeshes.h index 3ebe60cd8..9f46f349b 100644 --- a/code/OptimizeMeshes.h +++ b/code/OptimizeMeshes.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/PlyExporter.cpp b/code/PlyExporter.cpp index 31c64a4d1..4f9fa6c6f 100644 --- a/code/PlyExporter.cpp +++ b/code/PlyExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/PlyExporter.h b/code/PlyExporter.h index 060aa7ceb..b82498cbd 100644 --- a/code/PlyExporter.h +++ b/code/PlyExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/PlyLoader.cpp b/code/PlyLoader.cpp index 7e55e6c3e..3924305cb 100644 --- a/code/PlyLoader.cpp +++ b/code/PlyLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/PlyLoader.h b/code/PlyLoader.h index 9199e17d7..201c463b2 100644 --- a/code/PlyLoader.h +++ b/code/PlyLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/PlyParser.cpp b/code/PlyParser.cpp index b51b6ac71..2a6f00ad6 100644 --- a/code/PlyParser.cpp +++ b/code/PlyParser.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/PlyParser.h b/code/PlyParser.h index b544c3b04..a11b411d1 100644 --- a/code/PlyParser.h +++ b/code/PlyParser.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/PolyTools.h b/code/PolyTools.h index f43bd9de1..fbbda0e7d 100644 --- a/code/PolyTools.h +++ b/code/PolyTools.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/PostStepRegistry.cpp b/code/PostStepRegistry.cpp index 646aeaeb0..469a8ef39 100644 --- a/code/PostStepRegistry.cpp +++ b/code/PostStepRegistry.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/PretransformVertices.cpp b/code/PretransformVertices.cpp index 9745abd60..52001a057 100644 --- a/code/PretransformVertices.cpp +++ b/code/PretransformVertices.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/PretransformVertices.h b/code/PretransformVertices.h index a8196289d..b7329af13 100644 --- a/code/PretransformVertices.h +++ b/code/PretransformVertices.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ProcessHelper.cpp b/code/ProcessHelper.cpp index 7f3e4ba72..59869fdff 100644 --- a/code/ProcessHelper.cpp +++ b/code/ProcessHelper.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ProcessHelper.h b/code/ProcessHelper.h index dcf71e853..c59f3217b 100644 --- a/code/ProcessHelper.h +++ b/code/ProcessHelper.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Q3BSPFileData.h b/code/Q3BSPFileData.h index d814837c2..4e05bebf1 100644 --- a/code/Q3BSPFileData.h +++ b/code/Q3BSPFileData.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Q3BSPFileImporter.cpp b/code/Q3BSPFileImporter.cpp index 8b9e3c037..6a3b95bb8 100644 --- a/code/Q3BSPFileImporter.cpp +++ b/code/Q3BSPFileImporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Q3BSPFileImporter.h b/code/Q3BSPFileImporter.h index 5f3e31157..5af9fb7bc 100644 --- a/code/Q3BSPFileImporter.h +++ b/code/Q3BSPFileImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Q3BSPFileParser.cpp b/code/Q3BSPFileParser.cpp index f7038adeb..5bac5ae76 100644 --- a/code/Q3BSPFileParser.cpp +++ b/code/Q3BSPFileParser.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Q3BSPFileParser.h b/code/Q3BSPFileParser.h index 747d1d494..143e42b15 100644 --- a/code/Q3BSPFileParser.h +++ b/code/Q3BSPFileParser.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Q3BSPZipArchive.cpp b/code/Q3BSPZipArchive.cpp index 3e1087b9a..0b6664842 100644 --- a/code/Q3BSPZipArchive.cpp +++ b/code/Q3BSPZipArchive.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Q3BSPZipArchive.h b/code/Q3BSPZipArchive.h index 606f7b183..2fdc781f8 100644 --- a/code/Q3BSPZipArchive.h +++ b/code/Q3BSPZipArchive.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Q3DLoader.cpp b/code/Q3DLoader.cpp index 1aa7cb72f..b8c8de716 100644 --- a/code/Q3DLoader.cpp +++ b/code/Q3DLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/Q3DLoader.h b/code/Q3DLoader.h index bdb104df3..954d3105c 100644 --- a/code/Q3DLoader.h +++ b/code/Q3DLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/RawLoader.cpp b/code/RawLoader.cpp index 1bc508759..d0da247e4 100644 --- a/code/RawLoader.cpp +++ b/code/RawLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/RawLoader.h b/code/RawLoader.h index f6e894fdd..8bfe8ef98 100644 --- a/code/RawLoader.h +++ b/code/RawLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/RemoveComments.cpp b/code/RemoveComments.cpp index 3ba3c60be..91700a769 100644 --- a/code/RemoveComments.cpp +++ b/code/RemoveComments.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/RemoveRedundantMaterials.cpp b/code/RemoveRedundantMaterials.cpp index 7194d3c8e..632bdca3f 100644 --- a/code/RemoveRedundantMaterials.cpp +++ b/code/RemoveRedundantMaterials.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/RemoveRedundantMaterials.h b/code/RemoveRedundantMaterials.h index 314bbf345..dbd4d44cc 100644 --- a/code/RemoveRedundantMaterials.h +++ b/code/RemoveRedundantMaterials.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/RemoveVCProcess.cpp b/code/RemoveVCProcess.cpp index 81249eab2..99fd47a3a 100644 --- a/code/RemoveVCProcess.cpp +++ b/code/RemoveVCProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/RemoveVCProcess.h b/code/RemoveVCProcess.h index 597de8584..617d7b9b2 100644 --- a/code/RemoveVCProcess.h +++ b/code/RemoveVCProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/SGSpatialSort.cpp b/code/SGSpatialSort.cpp index d74c57ed5..120070b0a 100644 --- a/code/SGSpatialSort.cpp +++ b/code/SGSpatialSort.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/SIBImporter.cpp b/code/SIBImporter.cpp index 7a69dd175..cfa65520e 100644 --- a/code/SIBImporter.cpp +++ b/code/SIBImporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/SIBImporter.h b/code/SIBImporter.h index 9437af588..bb88c2255 100644 --- a/code/SIBImporter.h +++ b/code/SIBImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/SMDLoader.cpp b/code/SMDLoader.cpp index c6ec61624..00d92e0b4 100644 --- a/code/SMDLoader.cpp +++ b/code/SMDLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/SMDLoader.h b/code/SMDLoader.h index a791e7dde..85dac97d1 100644 --- a/code/SMDLoader.h +++ b/code/SMDLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/STEPFile.h b/code/STEPFile.h index f5b56c31f..ac3280c21 100644 --- a/code/STEPFile.h +++ b/code/STEPFile.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/STLExporter.cpp b/code/STLExporter.cpp index e4a1dbb66..00fced6ff 100644 --- a/code/STLExporter.cpp +++ b/code/STLExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/STLExporter.h b/code/STLExporter.h index 6e8f90915..cb5238e60 100644 --- a/code/STLExporter.h +++ b/code/STLExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/STLLoader.cpp b/code/STLLoader.cpp index f8c4bb7db..c615561a8 100644 --- a/code/STLLoader.cpp +++ b/code/STLLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/STLLoader.h b/code/STLLoader.h index 3b87f70a3..ca1011cb8 100644 --- a/code/STLLoader.h +++ b/code/STLLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ScaleProcess.cpp b/code/ScaleProcess.cpp index facc39d7d..6d458c4b1 100644 --- a/code/ScaleProcess.cpp +++ b/code/ScaleProcess.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ScaleProcess.h b/code/ScaleProcess.h index 0621220a8..55146ae06 100644 --- a/code/ScaleProcess.h +++ b/code/ScaleProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/SceneCombiner.cpp b/code/SceneCombiner.cpp index 2271194ca..e445bd743 100644 --- a/code/SceneCombiner.cpp +++ b/code/SceneCombiner.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ScenePreprocessor.cpp b/code/ScenePreprocessor.cpp index 1228ab2c2..432a3d766 100644 --- a/code/ScenePreprocessor.cpp +++ b/code/ScenePreprocessor.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ScenePreprocessor.h b/code/ScenePreprocessor.h index 3900a237b..3f4c8d7c3 100644 --- a/code/ScenePreprocessor.h +++ b/code/ScenePreprocessor.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ScenePrivate.h b/code/ScenePrivate.h index 775b9cb52..f336aafc9 100644 --- a/code/ScenePrivate.h +++ b/code/ScenePrivate.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/SkeletonMeshBuilder.cpp b/code/SkeletonMeshBuilder.cpp index ecfe8586f..06cfe034e 100644 --- a/code/SkeletonMeshBuilder.cpp +++ b/code/SkeletonMeshBuilder.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/SortByPTypeProcess.cpp b/code/SortByPTypeProcess.cpp index b67da5b95..87bbe5257 100644 --- a/code/SortByPTypeProcess.cpp +++ b/code/SortByPTypeProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/SortByPTypeProcess.h b/code/SortByPTypeProcess.h index 27bfa2155..c9d9924d8 100644 --- a/code/SortByPTypeProcess.h +++ b/code/SortByPTypeProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/SpatialSort.cpp b/code/SpatialSort.cpp index b0ab6e412..a4f3a4e4b 100644 --- a/code/SpatialSort.cpp +++ b/code/SpatialSort.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/SplitByBoneCountProcess.cpp b/code/SplitByBoneCountProcess.cpp index 6faf11086..2ef66a9af 100644 --- a/code/SplitByBoneCountProcess.cpp +++ b/code/SplitByBoneCountProcess.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/SplitByBoneCountProcess.h b/code/SplitByBoneCountProcess.h index b46dd6b0f..6c904a9df 100644 --- a/code/SplitByBoneCountProcess.h +++ b/code/SplitByBoneCountProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/SplitLargeMeshes.cpp b/code/SplitLargeMeshes.cpp index 5cd3afe48..1797b28d5 100644 --- a/code/SplitLargeMeshes.cpp +++ b/code/SplitLargeMeshes.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/SplitLargeMeshes.h b/code/SplitLargeMeshes.h index 7a977ff07..77f089ce7 100644 --- a/code/SplitLargeMeshes.h +++ b/code/SplitLargeMeshes.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/StandardShapes.cpp b/code/StandardShapes.cpp index 7d2319401..f262b6bac 100644 --- a/code/StandardShapes.cpp +++ b/code/StandardShapes.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/StdOStreamLogStream.h b/code/StdOStreamLogStream.h index 43b8d7de2..893e261a2 100644 --- a/code/StdOStreamLogStream.h +++ b/code/StdOStreamLogStream.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/StepExporter.cpp b/code/StepExporter.cpp index 4368201b7..02e521247 100644 --- a/code/StepExporter.cpp +++ b/code/StepExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/StepExporter.h b/code/StepExporter.h index f1323bee8..f96a0d2b5 100644 --- a/code/StepExporter.h +++ b/code/StepExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Subdivision.cpp b/code/Subdivision.cpp index 2f2f09596..19db223a5 100644 --- a/code/Subdivision.cpp +++ b/code/Subdivision.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/TargetAnimation.cpp b/code/TargetAnimation.cpp index 2834b1f10..b8062499f 100644 --- a/code/TargetAnimation.cpp +++ b/code/TargetAnimation.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/TargetAnimation.h b/code/TargetAnimation.h index bb37e6008..91634ab5a 100644 --- a/code/TargetAnimation.h +++ b/code/TargetAnimation.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/TerragenLoader.cpp b/code/TerragenLoader.cpp index 0eb22cef6..9b0873c68 100644 --- a/code/TerragenLoader.cpp +++ b/code/TerragenLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/TerragenLoader.h b/code/TerragenLoader.h index a02889de1..a478c0dcd 100644 --- a/code/TerragenLoader.h +++ b/code/TerragenLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/TextureTransform.cpp b/code/TextureTransform.cpp index c7adbe7a9..8ae2ba721 100644 --- a/code/TextureTransform.cpp +++ b/code/TextureTransform.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/TextureTransform.h b/code/TextureTransform.h index 99d5acf1e..c556ff5d8 100644 --- a/code/TextureTransform.h +++ b/code/TextureTransform.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/TriangulateProcess.cpp b/code/TriangulateProcess.cpp index b2ea46ef7..0f68f47dd 100644 --- a/code/TriangulateProcess.cpp +++ b/code/TriangulateProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/TriangulateProcess.h b/code/TriangulateProcess.h index e6300085d..47bd2115a 100644 --- a/code/TriangulateProcess.h +++ b/code/TriangulateProcess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/UnrealLoader.cpp b/code/UnrealLoader.cpp index 64bfbb9e0..778aef59d 100644 --- a/code/UnrealLoader.cpp +++ b/code/UnrealLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/UnrealLoader.h b/code/UnrealLoader.h index 4095aa142..f846eb43a 100644 --- a/code/UnrealLoader.h +++ b/code/UnrealLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/ValidateDataStructure.cpp b/code/ValidateDataStructure.cpp index 931c52822..405670bdd 100644 --- a/code/ValidateDataStructure.cpp +++ b/code/ValidateDataStructure.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team @@ -180,23 +180,21 @@ inline void ValidateDSProcess::DoValidationEx(T** parray, unsigned int size, // ------------------------------------------------------------------------------------------------ template -inline void ValidateDSProcess::DoValidationWithNameCheck(T** array, - unsigned int size, const char* firstName, - const char* secondName) -{ +inline +void ValidateDSProcess::DoValidationWithNameCheck(T** array, unsigned int size, const char* firstName, const char* secondName) { // validate all entries DoValidationEx(array,size,firstName,secondName); - for (unsigned int i = 0; i < size;++i) - { + for (unsigned int i = 0; i < size;++i) { int res = HasNameMatch(array[i]->mName,mScene->mRootNode); - if (!res) { + if (0 == res) { + const std::string name = static_cast(array[i]->mName.data); ReportError("aiScene::%s[%i] has no corresponding node in the scene graph (%s)", - firstName,i,array[i]->mName.data); - } - else if (1 != res) { + firstName,i, name.c_str()); + } else if (1 != res) { + const std::string name = static_cast(array[i]->mName.data); ReportError("aiScene::%s[%i]: there are more than one nodes with %s as name", - firstName,i,array[i]->mName.data); + firstName,i, name.c_str()); } } } @@ -699,7 +697,7 @@ void ValidateDSProcess::Validate( const aiMaterial* pMaterial) if (prop->mDataLength < 5 || prop->mDataLength < 4 + (*reinterpret_cast(prop->mData)) + 1) { ReportError("aiMaterial::mProperties[%i].mDataLength is " "too small to contain a string (%i, needed: %i)", - i,prop->mDataLength,sizeof(aiString)); + i,prop->mDataLength,static_cast(sizeof(aiString))); } if(prop->mData[prop->mDataLength-1]) { ReportError("Missing null-terminator in string material property"); @@ -710,14 +708,14 @@ void ValidateDSProcess::Validate( const aiMaterial* pMaterial) if (prop->mDataLength < sizeof(float)) { ReportError("aiMaterial::mProperties[%i].mDataLength is " "too small to contain a float (%i, needed: %i)", - i,prop->mDataLength,sizeof(float)); + i,prop->mDataLength, static_cast(sizeof(float))); } } else if (aiPTI_Integer == prop->mType) { if (prop->mDataLength < sizeof(int)) { ReportError("aiMaterial::mProperties[%i].mDataLength is " "too small to contain an integer (%i, needed: %i)", - i,prop->mDataLength,sizeof(int)); + i,prop->mDataLength, static_cast(sizeof(int))); } } // TODO: check whether there is a key with an unknown name ... @@ -955,7 +953,7 @@ void ValidateDSProcess::Validate( const aiString* pString) { if (pString->length > MAXLEN) { - this->ReportError("aiString::length is too large (%i, maximum is %i)", + this->ReportError("aiString::length is too large (%i, maximum is %lu)", pString->length,MAXLEN); } const char* sz = pString->data; diff --git a/code/ValidateDataStructure.h b/code/ValidateDataStructure.h index 4e1636bfa..bd21e8854 100644 --- a/code/ValidateDataStructure.h +++ b/code/ValidateDataStructure.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Version.cpp b/code/Version.cpp index b823abd68..cc94340ac 100644 --- a/code/Version.cpp +++ b/code/Version.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/VertexTriangleAdjacency.cpp b/code/VertexTriangleAdjacency.cpp index b41fd029d..7cfd1a350 100644 --- a/code/VertexTriangleAdjacency.cpp +++ b/code/VertexTriangleAdjacency.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/VertexTriangleAdjacency.h b/code/VertexTriangleAdjacency.h index 23624a5be..f3be47612 100644 --- a/code/VertexTriangleAdjacency.h +++ b/code/VertexTriangleAdjacency.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/Win32DebugLogStream.h b/code/Win32DebugLogStream.h index 7bbe8002a..a6063a261 100644 --- a/code/Win32DebugLogStream.h +++ b/code/Win32DebugLogStream.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/X3DImporter.cpp b/code/X3DImporter.cpp index e6c915e90..1f4d3f916 100644 --- a/code/X3DImporter.cpp +++ b/code/X3DImporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter.hpp b/code/X3DImporter.hpp index 1c9dc5486..a4afc1463 100644 --- a/code/X3DImporter.hpp +++ b/code/X3DImporter.hpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter_Geometry2D.cpp b/code/X3DImporter_Geometry2D.cpp index 5229017b3..b29c80b04 100644 --- a/code/X3DImporter_Geometry2D.cpp +++ b/code/X3DImporter_Geometry2D.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter_Geometry3D.cpp b/code/X3DImporter_Geometry3D.cpp index b6d130098..2eecc079d 100644 --- a/code/X3DImporter_Geometry3D.cpp +++ b/code/X3DImporter_Geometry3D.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter_Group.cpp b/code/X3DImporter_Group.cpp index 0c2e820de..de3610caf 100644 --- a/code/X3DImporter_Group.cpp +++ b/code/X3DImporter_Group.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter_Light.cpp b/code/X3DImporter_Light.cpp index 4ffea4411..842fffc04 100644 --- a/code/X3DImporter_Light.cpp +++ b/code/X3DImporter_Light.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter_Macro.hpp b/code/X3DImporter_Macro.hpp index d1172798c..a6aca33fb 100644 --- a/code/X3DImporter_Macro.hpp +++ b/code/X3DImporter_Macro.hpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter_Metadata.cpp b/code/X3DImporter_Metadata.cpp index a566f0aa9..f888ac2b9 100644 --- a/code/X3DImporter_Metadata.cpp +++ b/code/X3DImporter_Metadata.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter_Networking.cpp b/code/X3DImporter_Networking.cpp index 9c15c4ac4..89010ae08 100644 --- a/code/X3DImporter_Networking.cpp +++ b/code/X3DImporter_Networking.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter_Node.hpp b/code/X3DImporter_Node.hpp index cb1317582..85208223d 100644 --- a/code/X3DImporter_Node.hpp +++ b/code/X3DImporter_Node.hpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter_Postprocess.cpp b/code/X3DImporter_Postprocess.cpp index c439a4004..e7686b41e 100644 --- a/code/X3DImporter_Postprocess.cpp +++ b/code/X3DImporter_Postprocess.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter_Rendering.cpp b/code/X3DImporter_Rendering.cpp index 1b44f8c19..d0c58030d 100644 --- a/code/X3DImporter_Rendering.cpp +++ b/code/X3DImporter_Rendering.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter_Shape.cpp b/code/X3DImporter_Shape.cpp index 43089c698..126d5905a 100644 --- a/code/X3DImporter_Shape.cpp +++ b/code/X3DImporter_Shape.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DImporter_Texturing.cpp b/code/X3DImporter_Texturing.cpp index 807d19ff8..b4e42025a 100644 --- a/code/X3DImporter_Texturing.cpp +++ b/code/X3DImporter_Texturing.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/X3DVocabulary.cpp b/code/X3DVocabulary.cpp index dc361b7aa..c6ee113b3 100644 --- a/code/X3DVocabulary.cpp +++ b/code/X3DVocabulary.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/XFileExporter.cpp b/code/XFileExporter.cpp index 1510ae6d4..baa478226 100644 --- a/code/XFileExporter.cpp +++ b/code/XFileExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/XFileExporter.h b/code/XFileExporter.h index fc480f40b..322440af8 100644 --- a/code/XFileExporter.h +++ b/code/XFileExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/XFileHelper.h b/code/XFileHelper.h index c51e2eba9..0365280f0 100644 --- a/code/XFileHelper.h +++ b/code/XFileHelper.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/XFileImporter.cpp b/code/XFileImporter.cpp index ae847eef8..e9335cfaa 100644 --- a/code/XFileImporter.cpp +++ b/code/XFileImporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/XFileImporter.h b/code/XFileImporter.h index b3c06eab1..d1b8d3f47 100644 --- a/code/XFileImporter.h +++ b/code/XFileImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/XFileParser.cpp b/code/XFileParser.cpp index e7bf8518c..ed715a19d 100644 --- a/code/XFileParser.cpp +++ b/code/XFileParser.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/XFileParser.h b/code/XFileParser.h index 24eb6104d..993bae6a1 100644 --- a/code/XFileParser.h +++ b/code/XFileParser.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/XGLLoader.cpp b/code/XGLLoader.cpp index 2dfd51284..32cfd72ca 100644 --- a/code/XGLLoader.cpp +++ b/code/XGLLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/XGLLoader.h b/code/XGLLoader.h index 8ae05836a..bba2a643c 100644 --- a/code/XGLLoader.h +++ b/code/XGLLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/glTF2Asset.h b/code/glTF2Asset.h index 6672dd7a9..0015197c2 100644 --- a/code/glTF2Asset.h +++ b/code/glTF2Asset.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -430,9 +430,9 @@ namespace glTF2 struct Accessor : public Object { Ref bufferView; //!< The ID of the bufferView. (required) - unsigned int byteOffset; //!< The offset relative to the start of the bufferView in bytes. (required) + size_t byteOffset; //!< The offset relative to the start of the bufferView in bytes. (required) ComponentType componentType; //!< The datatype of components in the attribute. (required) - unsigned int count; //!< The number of attributes referenced by this accessor. (required) + size_t count; //!< The number of attributes referenced by this accessor. (required) AttribType::Value type; //!< Specifies if the attribute is a scalar, vector, or matrix. (required) std::vector max; //!< Maximum value of each component in this attribute. std::vector min; //!< Minimum value of each component in this attribute. @@ -529,6 +529,7 @@ namespace glTF2 //std::string uri; //!< The uri of the buffer. Can be a filepath, a data uri, etc. (required) size_t byteLength; //!< The length of the buffer in bytes. (default: 0) //std::string type; //!< XMLHttpRequest responseType (default: "arraybuffer") + size_t capacity = 0; //!< The capacity of the buffer in bytes. (default: 0) Type type; diff --git a/code/glTF2Asset.inl b/code/glTF2Asset.inl index ed37937f4..b51975c77 100755 --- a/code/glTF2Asset.inl +++ b/code/glTF2Asset.inl @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -85,6 +85,14 @@ namespace { return val.IsString() ? (out = std::string(val.GetString(), val.GetStringLength()), true) : false; }}; + template<> struct ReadHelper { static bool Read(Value& val, uint64_t& out) { + return val.IsUint64() ? out = val.GetUint64(), true : false; + }}; + + template<> struct ReadHelper { static bool Read(Value& val, int64_t& out) { + return val.IsInt64() ? out = val.GetInt64(), true : false; + }}; + template struct ReadHelper< Nullable > { static bool Read(Value& val, Nullable& out) { return out.isPresent = ReadHelper::Read(val, out.value); }}; @@ -520,7 +528,17 @@ inline size_t Buffer::AppendData(uint8_t* data, size_t length) inline void Buffer::Grow(size_t amount) { if (amount <= 0) return; - uint8_t* b = new uint8_t[byteLength + amount]; + if (capacity >= byteLength + amount) + { + byteLength += amount; + return; + } + + // Shift operation is standard way to divide integer by 2, it doesn't cast it to float back and forth, also works for odd numbers, + // originally it would look like: static_cast(capacity * 1.5f) + capacity = std::max(capacity + (capacity >> 1), byteLength + amount); + + uint8_t* b = new uint8_t[capacity]; if (mData) memcpy(b, mData.get(), byteLength); mData.reset(b, std::default_delete()); byteLength += amount; @@ -537,8 +555,8 @@ inline void BufferView::Read(Value& obj, Asset& r) buffer = r.buffers.Retrieve(bufferVal->GetUint()); } - byteOffset = MemberOrDefault(obj, "byteOffset", 0u); - byteLength = MemberOrDefault(obj, "byteLength", 0u); + byteOffset = MemberOrDefault(obj, "byteOffset", size_t(0)); + byteLength = MemberOrDefault(obj, "byteLength", size_t(0)); byteStride = MemberOrDefault(obj, "byteStride", 0u); } @@ -553,9 +571,9 @@ inline void Accessor::Read(Value& obj, Asset& r) bufferView = r.bufferViews.Retrieve(bufferViewVal->GetUint()); } - byteOffset = MemberOrDefault(obj, "byteOffset", 0u); + byteOffset = MemberOrDefault(obj, "byteOffset", size_t(0)); componentType = MemberOrDefault(obj, "componentType", ComponentType_BYTE); - count = MemberOrDefault(obj, "count", 0u); + count = MemberOrDefault(obj, "count", size_t(0)); const char* typestr; type = ReadMember(obj, "type", typestr) ? AttribType::FromString(typestr) : AttribType::SCALAR; diff --git a/code/glTF2AssetWriter.h b/code/glTF2AssetWriter.h index 493ca1c0a..928b6e71b 100644 --- a/code/glTF2AssetWriter.h +++ b/code/glTF2AssetWriter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/glTF2AssetWriter.inl b/code/glTF2AssetWriter.inl index 75726fd08..bec88ceb8 100644 --- a/code/glTF2AssetWriter.inl +++ b/code/glTF2AssetWriter.inl @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -97,10 +97,10 @@ namespace glTF2 { inline void Write(Value& obj, Accessor& a, AssetWriter& w) { obj.AddMember("bufferView", a.bufferView->index, w.mAl); - obj.AddMember("byteOffset", a.byteOffset, w.mAl); + obj.AddMember("byteOffset", (unsigned int)a.byteOffset, w.mAl); obj.AddMember("componentType", int(a.componentType), w.mAl); - obj.AddMember("count", a.count, w.mAl); + obj.AddMember("count", (unsigned int)a.count, w.mAl); obj.AddMember("type", StringRef(AttribType::ToString(a.type)), w.mAl); Value vTmpMax, vTmpMin; diff --git a/code/glTF2Exporter.cpp b/code/glTF2Exporter.cpp index d513dc45d..655b4fc7d 100644 --- a/code/glTF2Exporter.cpp +++ b/code/glTF2Exporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -156,7 +156,7 @@ static void IdentityMatrix4(mat4& o) { } inline Ref ExportData(Asset& a, std::string& meshName, Ref& buffer, - unsigned int count, void* data, AttribType::Value typeIn, AttribType::Value typeOut, ComponentType compType, bool isIndices = false) + size_t count, void* data, AttribType::Value typeIn, AttribType::Value typeOut, ComponentType compType, bool isIndices = false) { if (!count || !data) { return Ref(); @@ -176,7 +176,7 @@ inline Ref ExportData(Asset& a, std::string& meshName, Ref& bu // bufferView Ref bv = a.bufferViews.Create(a.FindUniqueID(meshName, "view")); bv->buffer = buffer; - bv->byteOffset = unsigned(offset); + bv->byteOffset = offset; bv->byteLength = length; //! The target that the WebGL buffer should be bound to. bv->byteStride = 0; bv->target = isIndices ? BufferViewTarget_ELEMENT_ARRAY_BUFFER : BufferViewTarget_ARRAY_BUFFER; @@ -732,6 +732,9 @@ void glTF2Exporter::ExportMeshes() /************** Texture coordinates **************/ for (int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) { + if (!aim->HasTextureCoords(i)) + continue; + // Flip UV y coords if (aim -> mNumUVComponents[i] > 1) { for (unsigned int j = 0; j < aim->mNumVertices; ++j) { @@ -765,7 +768,7 @@ void glTF2Exporter::ExportMeshes() } } - p.indices = ExportData(*mAsset, meshId, b, unsigned(indices.size()), &indices[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_UNSIGNED_INT, true); + p.indices = ExportData(*mAsset, meshId, b, indices.size(), &indices[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_UNSIGNED_INT, true); } switch (aim->mPrimitiveTypes) { @@ -967,7 +970,7 @@ void glTF2Exporter::ExportMetadata() inline Ref GetSamplerInputRef(Asset& asset, std::string& animId, Ref& buffer, std::vector& times) { - return ExportData(asset, animId, buffer, times.size(), ×[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_FLOAT); + return ExportData(asset, animId, buffer, (unsigned int)times.size(), ×[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_FLOAT); } inline void ExtractTranslationSampler(Asset& asset, std::string& animId, Ref& buffer, const aiNodeAnim* nodeChannel, float ticksPerSecond, Animation::Sampler& sampler) diff --git a/code/glTF2Exporter.h b/code/glTF2Exporter.h index 06bc5ad40..2dc083709 100644 --- a/code/glTF2Exporter.h +++ b/code/glTF2Exporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/glTF2Importer.cpp b/code/glTF2Importer.cpp index c73e1eabb..4228db23f 100755 --- a/code/glTF2Importer.cpp +++ b/code/glTF2Importer.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -412,7 +412,7 @@ void glTF2Importer::ImportMeshes(glTF2::Asset& r) Mesh::Primitive::Attributes& attr = prim.attributes; if (attr.position.size() > 0 && attr.position[0]) { - aim->mNumVertices = attr.position[0]->count; + aim->mNumVertices = static_cast(attr.position[0]->count); attr.position[0]->ExtractData(aim->mVertices); } @@ -511,10 +511,10 @@ void glTF2Importer::ImportMeshes(glTF2::Asset& r) aiFace* faces = 0; - unsigned int nFaces = 0; + size_t nFaces = 0; if (prim.indices) { - unsigned int count = prim.indices->count; + size_t count = prim.indices->count; Accessor::Indexer data = prim.indices->GetIndexer(); ai_assert(data.IsValid()); @@ -665,8 +665,8 @@ void glTF2Importer::ImportMeshes(glTF2::Asset& r) if (faces) { aim->mFaces = faces; - aim->mNumFaces = nFaces; - ai_assert(CheckValidFacesIndices(faces, nFaces, aim->mNumVertices)); + aim->mNumFaces = static_cast(nFaces); + ai_assert(CheckValidFacesIndices(faces, static_cast(nFaces), aim->mNumVertices)); } if (prim.material) { @@ -751,7 +751,7 @@ static void BuildVertexWeightMapping(Mesh::Primitive& primitive, std::vectorcount; + size_t num_vertices = attr.weight[0]->count; struct Weights { float values[4]; }; Weights* weights = nullptr; @@ -773,13 +773,13 @@ static void BuildVertexWeightMapping(Mesh::Primitive& primitive, std::vector 0 && bone < map.size()) { map[bone].reserve(8); - map[bone].emplace_back(i, weight); + map[bone].emplace_back(static_cast(i), weight); } } } @@ -822,7 +822,7 @@ aiNode* ImportNode(aiScene* pScene, glTF2::Asset& r, std::vector& if (node.skin) { for (int primitiveNo = 0; primitiveNo < count; ++primitiveNo) { aiMesh* mesh = pScene->mMeshes[meshOffsets[mesh_idx]+primitiveNo]; - mesh->mNumBones = node.skin->jointNames.size(); + mesh->mNumBones = static_cast(node.skin->jointNames.size()); mesh->mBones = new aiBone*[mesh->mNumBones]; // GLTF and Assimp choose to store bone weights differently. @@ -837,7 +837,7 @@ aiNode* ImportNode(aiScene* pScene, glTF2::Asset& r, std::vector& std::vector> weighting(mesh->mNumBones); BuildVertexWeightMapping(node.meshes[0]->primitives[primitiveNo], weighting); - for (size_t i = 0; i < mesh->mNumBones; ++i) { + for (uint32_t i = 0; i < mesh->mNumBones; ++i) { aiBone* bone = new aiBone(); Ref joint = node.skin->jointNames[i]; @@ -854,7 +854,7 @@ aiNode* ImportNode(aiScene* pScene, glTF2::Asset& r, std::vector& std::vector& weights = weighting[i]; - bone->mNumWeights = weights.size(); + bone->mNumWeights = static_cast(weights.size()); if (bone->mNumWeights > 0) { bone->mWeights = new aiVertexWeight[bone->mNumWeights]; memcpy(bone->mWeights, weights.data(), bone->mNumWeights * sizeof(aiVertexWeight)); @@ -930,7 +930,7 @@ aiNodeAnim* CreateNodeAnim(glTF2::Asset& r, Node& node, AnimationSamplers& sampl samplers.translation->input->ExtractData(times); aiVector3D* values = nullptr; samplers.translation->output->ExtractData(values); - anim->mNumPositionKeys = samplers.translation->input->count; + anim->mNumPositionKeys = static_cast(samplers.translation->input->count); anim->mPositionKeys = new aiVectorKey[anim->mNumPositionKeys]; for (unsigned int i = 0; i < anim->mNumPositionKeys; ++i) { anim->mPositionKeys[i].mTime = times[i] * kMillisecondsFromSeconds; @@ -952,7 +952,7 @@ aiNodeAnim* CreateNodeAnim(glTF2::Asset& r, Node& node, AnimationSamplers& sampl samplers.rotation->input->ExtractData(times); aiQuaternion* values = nullptr; samplers.rotation->output->ExtractData(values); - anim->mNumRotationKeys = samplers.rotation->input->count; + anim->mNumRotationKeys = static_cast(samplers.rotation->input->count); anim->mRotationKeys = new aiQuatKey[anim->mNumRotationKeys]; for (unsigned int i = 0; i < anim->mNumRotationKeys; ++i) { anim->mRotationKeys[i].mTime = times[i] * kMillisecondsFromSeconds; @@ -978,7 +978,7 @@ aiNodeAnim* CreateNodeAnim(glTF2::Asset& r, Node& node, AnimationSamplers& sampl samplers.scale->input->ExtractData(times); aiVector3D* values = nullptr; samplers.scale->output->ExtractData(values); - anim->mNumScalingKeys = samplers.scale->input->count; + anim->mNumScalingKeys = static_cast(samplers.scale->input->count); anim->mScalingKeys = new aiVectorKey[anim->mNumScalingKeys]; for (unsigned int i = 0; i < anim->mNumScalingKeys; ++i) { anim->mScalingKeys[i].mTime = times[i] * kMillisecondsFromSeconds; @@ -1042,7 +1042,7 @@ void glTF2Importer::ImportAnimations(glTF2::Asset& r) std::unordered_map samplers = GatherSamplers(anim); - ai_anim->mNumChannels = samplers.size(); + ai_anim->mNumChannels = static_cast(samplers.size()); if (ai_anim->mNumChannels > 0) { ai_anim->mChannels = new aiNodeAnim*[ai_anim->mNumChannels]; int j = 0; diff --git a/code/glTF2Importer.h b/code/glTF2Importer.h index 7414e2f95..091b61ee6 100644 --- a/code/glTF2Importer.h +++ b/code/glTF2Importer.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/glTFAsset.h b/code/glTFAsset.h index b04692901..92b7dd9d1 100644 --- a/code/glTFAsset.h +++ b/code/glTFAsset.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -537,7 +537,7 @@ namespace glTF shared_ptr mData; //!< Pointer to the data bool mIsSpecial; //!< Set to true for special cases (e.g. the body buffer) - + size_t capacity = 0; //!< The capacity of the buffer in bytes. (default: 0) /// \var EncodedRegion_List /// List of encoded regions. std::list EncodedRegion_List; diff --git a/code/glTFAsset.inl b/code/glTFAsset.inl index 267cbd4a3..7b7acd705 100644 --- a/code/glTFAsset.inl +++ b/code/glTFAsset.inl @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -95,6 +95,14 @@ namespace { return out.isPresent = ReadHelper::Read(val, out.value); }}; + template<> struct ReadHelper { static bool Read(Value& val, uint64_t& out) { + return val.IsUint64() ? out = val.GetUint64(), true : false; + }}; + + template<> struct ReadHelper { static bool Read(Value& val, int64_t& out) { + return val.IsInt64() ? out = val.GetInt64(), true : false; + }}; + template inline static bool ReadValue(Value& val, T& out) { @@ -311,7 +319,7 @@ inline void Buffer::Read(Value& obj, Asset& r) " bytes, but found " + to_string(dataURI.dataLength)); } - this->mData.reset(new uint8_t[dataURI.dataLength]); + this->mData.reset(new uint8_t[dataURI.dataLength], std::default_delete()); memcpy( this->mData.get(), dataURI.data, dataURI.dataLength ); } } @@ -417,7 +425,7 @@ uint8_t* new_data; // Copy data which place after replacing part. memcpy(&new_data[pBufferData_Offset + pReplace_Count], &mData.get()[pBufferData_Offset + pBufferData_Count], pBufferData_Offset); // Apply new data - mData.reset(new_data); + mData.reset(new_data, std::default_delete()); byteLength = new_data_size; return true; @@ -434,9 +442,19 @@ inline size_t Buffer::AppendData(uint8_t* data, size_t length) inline void Buffer::Grow(size_t amount) { if (amount <= 0) return; - uint8_t* b = new uint8_t[byteLength + amount]; + if (capacity >= byteLength + amount) + { + byteLength += amount; + return; + } + + // Shift operation is standard way to divide integer by 2, it doesn't cast it to float back and forth, also works for odd numbers, + // originally it would look like: static_cast(capacity * 1.5f) + capacity = std::max(capacity + (capacity >> 1), byteLength + amount); + + uint8_t* b = new uint8_t[capacity]; if (mData) memcpy(b, mData.get(), byteLength); - mData.reset(b); + mData.reset(b, std::default_delete()); byteLength += amount; } @@ -1445,7 +1463,7 @@ inline std::string Asset::FindUniqueID(const std::string& str, const char* suffi if (it == mUsedIds.end()) return id; - char buffer[256]; + char buffer[1024]; int offset = ai_snprintf(buffer, sizeof(buffer), "%s_", id.c_str()); for (int i = 0; it != mUsedIds.end(); ++i) { ai_snprintf(buffer + offset, sizeof(buffer) - offset, "%d", i); diff --git a/code/glTFAssetWriter.h b/code/glTFAssetWriter.h index bbe89fc77..03aee7d4c 100644 --- a/code/glTFAssetWriter.h +++ b/code/glTFAssetWriter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/glTFAssetWriter.inl b/code/glTFAssetWriter.inl index fd29a96b4..259ad03f6 100644 --- a/code/glTFAssetWriter.inl +++ b/code/glTFAssetWriter.inl @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/glTFExporter.cpp b/code/glTFExporter.cpp index 5d00c9178..9daf202cb 100644 --- a/code/glTFExporter.cpp +++ b/code/glTFExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/glTFExporter.h b/code/glTFExporter.h index 061dac5e8..d6c2e7f04 100644 --- a/code/glTFExporter.h +++ b/code/glTFExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/glTFImporter.cpp b/code/glTFImporter.cpp index c68969dc6..57566b463 100755 --- a/code/glTFImporter.cpp +++ b/code/glTFImporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/glTFImporter.h b/code/glTFImporter.h index 064d6dc1a..ce8a000dc 100644 --- a/code/glTFImporter.h +++ b/code/glTFImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/code/scene.cpp b/code/scene.cpp index 676051163..2acb348d8 100644 --- a/code/scene.cpp +++ b/code/scene.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/simd.cpp b/code/simd.cpp index 9e2a83a60..04615f408 100644 --- a/code/simd.cpp +++ b/code/simd.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/code/simd.h b/code/simd.h index 19117569d..3eecdd458 100644 --- a/code/simd.h +++ b/code/simd.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/tools/assimp_qt_viewer/stb_image.h b/contrib/stb_image/stb_image.h similarity index 100% rename from tools/assimp_qt_viewer/stb_image.h rename to contrib/stb_image/stb_image.h diff --git a/include/assimp/BaseImporter.h b/include/assimp/BaseImporter.h index b218d06ff..48dfc8ed8 100644 --- a/include/assimp/BaseImporter.h +++ b/include/assimp/BaseImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/Bitmap.h b/include/assimp/Bitmap.h index 209116863..e6b5fb132 100644 --- a/include/assimp/Bitmap.h +++ b/include/assimp/Bitmap.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/BlobIOSystem.h b/include/assimp/BlobIOSystem.h index a0ed7209f..d005e5c11 100644 --- a/include/assimp/BlobIOSystem.h +++ b/include/assimp/BlobIOSystem.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/ByteSwapper.h b/include/assimp/ByteSwapper.h index 322a242de..20a2463fb 100644 --- a/include/assimp/ByteSwapper.h +++ b/include/assimp/ByteSwapper.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/CreateAnimMesh.h b/include/assimp/CreateAnimMesh.h index ad625cb9f..a60173588 100644 --- a/include/assimp/CreateAnimMesh.h +++ b/include/assimp/CreateAnimMesh.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/DefaultIOStream.h b/include/assimp/DefaultIOStream.h index e0e010ecb..994d728ff 100644 --- a/include/assimp/DefaultIOStream.h +++ b/include/assimp/DefaultIOStream.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/DefaultIOSystem.h b/include/assimp/DefaultIOSystem.h index a5d45c692..2dd5c801b 100644 --- a/include/assimp/DefaultIOSystem.h +++ b/include/assimp/DefaultIOSystem.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/DefaultLogger.hpp b/include/assimp/DefaultLogger.hpp index 1f0c899be..1946e250a 100644 --- a/include/assimp/DefaultLogger.hpp +++ b/include/assimp/DefaultLogger.hpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/Exporter.hpp b/include/assimp/Exporter.hpp index d254aae66..ea0303e80 100644 --- a/include/assimp/Exporter.hpp +++ b/include/assimp/Exporter.hpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/GenericProperty.h b/include/assimp/GenericProperty.h index 7b75cb1c8..183ecd519 100644 --- a/include/assimp/GenericProperty.h +++ b/include/assimp/GenericProperty.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/Hash.h b/include/assimp/Hash.h index eb5df757d..30657be19 100644 --- a/include/assimp/Hash.h +++ b/include/assimp/Hash.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/IOStream.hpp b/include/assimp/IOStream.hpp index 52b80cc15..0623d0f70 100644 --- a/include/assimp/IOStream.hpp +++ b/include/assimp/IOStream.hpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/IOStreamBuffer.h b/include/assimp/IOStreamBuffer.h index be5e4d0c5..58abd97a0 100644 --- a/include/assimp/IOStreamBuffer.h +++ b/include/assimp/IOStreamBuffer.h @@ -4,7 +4,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/IOSystem.hpp b/include/assimp/IOSystem.hpp index a36e22508..78139c283 100644 --- a/include/assimp/IOSystem.hpp +++ b/include/assimp/IOSystem.hpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/Importer.hpp b/include/assimp/Importer.hpp index 1d1dac19f..4941df412 100644 --- a/include/assimp/Importer.hpp +++ b/include/assimp/Importer.hpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/LineSplitter.h b/include/assimp/LineSplitter.h index eb6b6e46c..4afe45b92 100644 --- a/include/assimp/LineSplitter.h +++ b/include/assimp/LineSplitter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/LogAux.h b/include/assimp/LogAux.h index cf6d50014..558485272 100644 --- a/include/assimp/LogAux.h +++ b/include/assimp/LogAux.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/LogStream.hpp b/include/assimp/LogStream.hpp index e0eb8d505..d0281e2d0 100644 --- a/include/assimp/LogStream.hpp +++ b/include/assimp/LogStream.hpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/Logger.hpp b/include/assimp/Logger.hpp index 6a9928735..89cade6c3 100644 --- a/include/assimp/Logger.hpp +++ b/include/assimp/Logger.hpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/Macros.h b/include/assimp/Macros.h index 3aaed4e97..651530337 100644 --- a/include/assimp/Macros.h +++ b/include/assimp/Macros.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/MemoryIOWrapper.h b/include/assimp/MemoryIOWrapper.h index a9a78c319..c52278718 100644 --- a/include/assimp/MemoryIOWrapper.h +++ b/include/assimp/MemoryIOWrapper.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/NullLogger.hpp b/include/assimp/NullLogger.hpp index 776f301ab..c45d01bd4 100644 --- a/include/assimp/NullLogger.hpp +++ b/include/assimp/NullLogger.hpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/ParsingUtils.h b/include/assimp/ParsingUtils.h index 4553072db..ca30ce13b 100644 --- a/include/assimp/ParsingUtils.h +++ b/include/assimp/ParsingUtils.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/Profiler.h b/include/assimp/Profiler.h index da5af2726..6ff9d41c0 100644 --- a/include/assimp/Profiler.h +++ b/include/assimp/Profiler.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/ProgressHandler.hpp b/include/assimp/ProgressHandler.hpp index f295eac39..4e47f1d0a 100644 --- a/include/assimp/ProgressHandler.hpp +++ b/include/assimp/ProgressHandler.hpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/RemoveComments.h b/include/assimp/RemoveComments.h index 08299f22b..404b49671 100644 --- a/include/assimp/RemoveComments.h +++ b/include/assimp/RemoveComments.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/SGSpatialSort.h b/include/assimp/SGSpatialSort.h index 3c95d0b51..5b4f3f41f 100644 --- a/include/assimp/SGSpatialSort.h +++ b/include/assimp/SGSpatialSort.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/SceneCombiner.h b/include/assimp/SceneCombiner.h index ec2788245..679a2acea 100644 --- a/include/assimp/SceneCombiner.h +++ b/include/assimp/SceneCombiner.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/SkeletonMeshBuilder.h b/include/assimp/SkeletonMeshBuilder.h index 993d9c84d..f9b8d9f55 100644 --- a/include/assimp/SkeletonMeshBuilder.h +++ b/include/assimp/SkeletonMeshBuilder.h @@ -4,7 +4,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/SmoothingGroups.h b/include/assimp/SmoothingGroups.h index 88345c66a..92d65cea0 100644 --- a/include/assimp/SmoothingGroups.h +++ b/include/assimp/SmoothingGroups.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/SpatialSort.h b/include/assimp/SpatialSort.h index 8fb450841..61b345bcb 100644 --- a/include/assimp/SpatialSort.h +++ b/include/assimp/SpatialSort.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/StandardShapes.h b/include/assimp/StandardShapes.h index fdf1b034d..3791569b8 100644 --- a/include/assimp/StandardShapes.h +++ b/include/assimp/StandardShapes.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/StreamReader.h b/include/assimp/StreamReader.h index 4e5d2ddfa..9116c1426 100644 --- a/include/assimp/StreamReader.h +++ b/include/assimp/StreamReader.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/StreamWriter.h b/include/assimp/StreamWriter.h index deb35fb4d..c7cf6c0d7 100644 --- a/include/assimp/StreamWriter.h +++ b/include/assimp/StreamWriter.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/StringComparison.h b/include/assimp/StringComparison.h index aea7f001a..8acef277b 100644 --- a/include/assimp/StringComparison.h +++ b/include/assimp/StringComparison.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/StringUtils.h b/include/assimp/StringUtils.h index 906898b53..d68b7fa47 100644 --- a/include/assimp/StringUtils.h +++ b/include/assimp/StringUtils.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/Subdivision.h b/include/assimp/Subdivision.h index 84aff68f1..43feb73b3 100644 --- a/include/assimp/Subdivision.h +++ b/include/assimp/Subdivision.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/TinyFormatter.h b/include/assimp/TinyFormatter.h index 2ddc227e9..1226b482e 100644 --- a/include/assimp/TinyFormatter.h +++ b/include/assimp/TinyFormatter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/Vertex.h b/include/assimp/Vertex.h index f1c02ee07..2a7f0256a 100644 --- a/include/assimp/Vertex.h +++ b/include/assimp/Vertex.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/XMLTools.h b/include/assimp/XMLTools.h index 4b76c4483..b0d327687 100644 --- a/include/assimp/XMLTools.h +++ b/include/assimp/XMLTools.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/ai_assert.h b/include/assimp/ai_assert.h index 7752763db..daae23454 100644 --- a/include/assimp/ai_assert.h +++ b/include/assimp/ai_assert.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/anim.h b/include/assimp/anim.h index 8a0984192..02e92739e 100644 --- a/include/assimp/anim.h +++ b/include/assimp/anim.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/camera.h b/include/assimp/camera.h index 6fea5a7d7..99daf6993 100644 --- a/include/assimp/camera.h +++ b/include/assimp/camera.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/cfileio.h b/include/assimp/cfileio.h index a7a56f81c..8f7ca4546 100644 --- a/include/assimp/cfileio.h +++ b/include/assimp/cfileio.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/cimport.h b/include/assimp/cimport.h index eb1e6e0d4..dbd10f137 100644 --- a/include/assimp/cimport.h +++ b/include/assimp/cimport.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/color4.h b/include/assimp/color4.h index fddd1b638..3c97c8eda 100644 --- a/include/assimp/color4.h +++ b/include/assimp/color4.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/color4.inl b/include/assimp/color4.inl index 6e27292b9..3192d55f3 100644 --- a/include/assimp/color4.inl +++ b/include/assimp/color4.inl @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/config.h.in b/include/assimp/config.h.in index fd828bc6e..a37ff0b8c 100644 --- a/include/assimp/config.h.in +++ b/include/assimp/config.h.in @@ -498,6 +498,13 @@ enum aiComponent #define AI_CONFIG_PP_FID_ANIM_ACCURACY \ "PP_FID_ANIM_ACCURACY" +// --------------------------------------------------------------------------- +/** @brief Input parameter to the #aiProcess_FindInvalidData step: + * Set to true to ignore texture coordinates. This may be useful if you have + * to assign different kind of textures like one for the summer or one for the winter. + */ +#define AI_CONFIG_PP_FID_IGNORE_TEXTURECOORDS \ + "PP_FID_IGNORE_TEXTURECOORDS" // TransformUVCoords evaluates UV scalings #define AI_UVTRAFO_SCALING 0x1 diff --git a/include/assimp/defs.h b/include/assimp/defs.h index e651a1f7b..4a177e3c3 100644 --- a/include/assimp/defs.h +++ b/include/assimp/defs.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/importerdesc.h b/include/assimp/importerdesc.h index 36b773e45..36e387f01 100644 --- a/include/assimp/importerdesc.h +++ b/include/assimp/importerdesc.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/irrXMLWrapper.h b/include/assimp/irrXMLWrapper.h index 296f26a32..ec8ee7c76 100644 --- a/include/assimp/irrXMLWrapper.h +++ b/include/assimp/irrXMLWrapper.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/light.h b/include/assimp/light.h index dc0b8a4b6..1667cfb8c 100644 --- a/include/assimp/light.h +++ b/include/assimp/light.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/material.h b/include/assimp/material.h index 45b4844a3..81b5fb05f 100644 --- a/include/assimp/material.h +++ b/include/assimp/material.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/material.inl b/include/assimp/material.inl index 3d4b07c06..b05d6af6c 100644 --- a/include/assimp/material.inl +++ b/include/assimp/material.inl @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/matrix3x3.h b/include/assimp/matrix3x3.h index 4bb55ad21..22b69561f 100644 --- a/include/assimp/matrix3x3.h +++ b/include/assimp/matrix3x3.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/matrix3x3.inl b/include/assimp/matrix3x3.inl index ab2cc410b..d9d45a3e9 100644 --- a/include/assimp/matrix3x3.inl +++ b/include/assimp/matrix3x3.inl @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/matrix4x4.h b/include/assimp/matrix4x4.h index bfa9d3865..046bb535f 100644 --- a/include/assimp/matrix4x4.h +++ b/include/assimp/matrix4x4.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/matrix4x4.inl b/include/assimp/matrix4x4.inl index 680d7666d..ebc67a06e 100644 --- a/include/assimp/matrix4x4.inl +++ b/include/assimp/matrix4x4.inl @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h index f9c2c1e67..8d539c59e 100644 --- a/include/assimp/mesh.h +++ b/include/assimp/mesh.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/metadata.h b/include/assimp/metadata.h index 498e2f6d1..3a1dd1442 100644 --- a/include/assimp/metadata.h +++ b/include/assimp/metadata.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/pbrmaterial.h b/include/assimp/pbrmaterial.h index 723957300..ce5f82217 100644 --- a/include/assimp/pbrmaterial.h +++ b/include/assimp/pbrmaterial.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/postprocess.h b/include/assimp/postprocess.h index a0ae0a1bc..c23a5490a 100644 --- a/include/assimp/postprocess.h +++ b/include/assimp/postprocess.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/qnan.h b/include/assimp/qnan.h index 251688989..0918bde5e 100644 --- a/include/assimp/qnan.h +++ b/include/assimp/qnan.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/quaternion.h b/include/assimp/quaternion.h index e2479f2ed..96574d24b 100644 --- a/include/assimp/quaternion.h +++ b/include/assimp/quaternion.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/include/assimp/quaternion.inl b/include/assimp/quaternion.inl index 0a2c92937..c26648215 100644 --- a/include/assimp/quaternion.inl +++ b/include/assimp/quaternion.inl @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/scene.h b/include/assimp/scene.h index 867e87de0..de0239702 100644 --- a/include/assimp/scene.h +++ b/include/assimp/scene.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/texture.h b/include/assimp/texture.h index 575f5754f..dc6cbef65 100644 --- a/include/assimp/texture.h +++ b/include/assimp/texture.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/types.h b/include/assimp/types.h index 660479f8a..748e4851f 100644 --- a/include/assimp/types.h +++ b/include/assimp/types.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/vector2.h b/include/assimp/vector2.h index 85ca6d0a4..d5ef00154 100644 --- a/include/assimp/vector2.h +++ b/include/assimp/vector2.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/vector2.inl b/include/assimp/vector2.inl index 46c6c9d27..3b7a7beab 100644 --- a/include/assimp/vector2.inl +++ b/include/assimp/vector2.inl @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/vector3.h b/include/assimp/vector3.h index 33ae7d22f..7ff25cf0a 100644 --- a/include/assimp/vector3.h +++ b/include/assimp/vector3.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/vector3.inl b/include/assimp/vector3.inl index ebe2f82e9..2fce6edde 100644 --- a/include/assimp/vector3.inl +++ b/include/assimp/vector3.inl @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/include/assimp/version.h b/include/assimp/version.h index 470166edf..c62a40e11 100644 --- a/include/assimp/version.h +++ b/include/assimp/version.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/port/AndroidJNI/README.md b/port/AndroidJNI/README.md index 570ca4fb3..7998fa3ef 100644 --- a/port/AndroidJNI/README.md +++ b/port/AndroidJNI/README.md @@ -1,7 +1,7 @@ Build Asset Importer Lib for Android ==================================== -This module provides a fascade for the io-stream-access to files behind the -android-asset-management within an Android native application. +This module provides a fascade for the io-stream-access to files behind the android-asset-management within +an Android-native application. - It is built as a static library - It requires Android NDK with android API > 9 support. @@ -20,6 +20,8 @@ A small example how to wrap assimp for Android: #include Assimp::Importer* importer = new Assimp::Importer(); -Assimp::AndroidJNIIOSystem* ioSystem = new Assimp::AndroidJNIIOSystem(app->activity); -importer->SetIOHandler(ioSystem); +Assimp::AndroidJNIIOSystem *ioSystem = new Assimp::AndroidJNIIOSystem(app->activity); +if ( nullptr != iosSystem ) { + importer->SetIOHandler(ioSystem); +} ``` diff --git a/port/PyAssimp/setup.py b/port/PyAssimp/setup.py index e19e497f0..a3497d657 100644 --- a/port/PyAssimp/setup.py +++ b/port/PyAssimp/setup.py @@ -8,7 +8,7 @@ def readme(): return f.read() setup(name='pyassimp', - version='4.1.3', + version='4.1.4', license='ISC', description='Python bindings for the Open Asset Import Library (ASSIMP)', long_description=readme(), diff --git a/samples/DevIL/AUTHORS b/samples/DevIL/AUTHORS deleted file mode 100644 index 0f80b3c4a..000000000 --- a/samples/DevIL/AUTHORS +++ /dev/null @@ -1,4 +0,0 @@ -The main programmer is Denton Woods, but this could not have been possible -without contributions and some pieces of code from other projects. - -For contributors and credits, read the CREDITS file. diff --git a/samples/DevIL/COPYING b/samples/DevIL/COPYING deleted file mode 100644 index 30c8ca213..000000000 --- a/samples/DevIL/COPYING +++ /dev/null @@ -1,506 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - - - diff --git a/samples/DevIL/CREDITS b/samples/DevIL/CREDITS deleted file mode 100644 index b30dc4685..000000000 --- a/samples/DevIL/CREDITS +++ /dev/null @@ -1,264 +0,0 @@ -Credits as of 02/06/2009 ------------------------- - -If I inadvertently omitted anyone's name from this list, please e-mail me at -doomwiz@users.sourceforge.net to remedy the problem. - - -James Joplin, alias jayjay (rjoplin@webzone.net) -for all his invaluable help and encouragement with DevIL. - -Edouard Gomez for his invaluable help. - -All the #flipCode gang for their support. - -All my friends at uni for their support. - -SoftImage .pic support based off of code obtained from -http://www.swin.edu.au/astronomy/pbourke/dataformats/ - -TestPic, used in TestIL -http://www.paintlib.de/paintlib/testpic.zip - -Png Test Images -http://www.schaik.com/pngsuite/pngsuite.html - -John Villar (john.villar@eliaschev.com) for making the suggestion of not -letting the user use ILimage structs but instead binding images like OpenGL. -He also made a suggestion on how to load luminance .jpg images, along with -other suggestions. - -http://www.opengl.org/Coding/KilgardTechniques/oglpitfall/oglpitfall.html -section 6 for the values the NTSC uses, so I could convert from coloured -images to luminance values. - -Kodak Photo CD code from the .pcd link on http://www.wotsit.org. - -Foper (foper@hotmail.com) from #flipCode for supplying the excellent -flipcode.jpg in testil\in. The original can be found at -http://webpatterns.com/flip/flipshow.htm - -Lightman (cdthompson@home.net) from #flipCode for restructuring the project -into /bin, /obj, etc. - -Alexander Blach (alexander@abee.de) from #flipCode for creating the Delphi -headers and test app. He figured out that we needed to use .def files to -prevent name decoration of the dlls. He has contributed multiple ideas and -found flaws. Alexander also created a lovely documentation database to help -with documenting DevIL. - -Randy Heit for finding problems in my Doom texture code. - -Oliver Kurowski (oliver.kurowski@gmx.de) for locating a bug in ilut's -DllMain() and another very harmful bug with ilDeleteImages(). - -Ender Wiggin's article on "Elementary Digital Filtering", -found at http://www.gamedev.net/reference/programming/features/edf/ -for many filters in DevIL. - -SGI's "Graphica Obscura" site at http://www.sgi.com/grafica/matrix/index.html -for several filters in DevIL. - -The http://bae.fse.missouri.edu/luw/course/image/project1/project1.html -page for help in determining filter code for Graphica Obscura's interpolation -article at http://www.sgi.com/grafica/interp/index.html. - -Matt Denham for suggesting optimizations in ilNegativeImage(), -iluEdgeDetectS() and iluEdgeDetectP(). - -Timo Heister (Timo-Heister@gmx.de) from #flipCode for creating the original -Visual Basic headers and test apps for VB. - -The OpenGL SuperBible for code for ilutGetHPal(). - -DJ Luminescent (luminescent@uswest.net) for finding a couple of bugs in the -.bmp-loading code and diligently beta testing. - -Lionel Brits, alias Zaewo from #flipCode for slapping me around and telling -me how Microsoft does their .bmp padding. He then wrote most of the -iluEqualize() code from the base code on -http://www.manning.com/Kabir/Files.html . - -Joel Wilsson, alias Siigron (siigron@hotmail.com) for pointing-out several -design flaws that I (Denton) had introduced and posing very useful -suggestions. - -Sean Montgomery, alias Vapor (sean@astralfx.com) for patiently listening to -my endless drivel about DevIL. - -Perlin Noise site http://freespace.virgin.net/hugo.elias/models/m_perlin.htm -for information on interpolation used in iluScale(). - -Shimon Shvartsbroit, alias MasterBoy (cobra11@netvision.net.il) from #flipCode -for explaining bilinear interpolation to me. - -Lbm source from http://www.wotsit.org - -Eran Kampf, alias ttentacle (ekampf@internet-zahav.net) for giving me -resource-loading code for ilutLoadResource and helping with the Windows -clipboard functions. - -Strumpf from #flipCode for writing a really good DirectDraw class for me to -use in the DDraw test, which is based off of his test, too. - -NullSoft (http://www.nullsoft.com), for their SuperPiMP installer. It is -extremely easy to learn to use and very powerful. - -Serun from #flipCode for noticing that Quake2 .pcx files sometimes don't have -the checksum byte for palette'd .pcx files. - -Conor Stokes, aka DirtyPunk from #flipCode for helping explain several things -to me. - -Half-Life model viewer sources (at http://www.swissquake.ch/chumbalum-soft/) -for specs for the Half-Life model format. - -Rich Schwab, alias endura (endura29@hotmail.com) for contributing -girlfriend.cpp. - -The Djgpp libc sources (http://www.delorie.com/djgpp), from where I copied -several functions. - -Roman Podobedov (romka@ut.ee) of Romka Graphics (http://romka.demonews.com) -for his colour quantization sources, which he was kind enough to let me use. - -Pcx document on http://www.wotsit.org for .pcx saving code. - -http://www-classic.be.com/aboutbe/benewsletter/volume_III/Issue2.html#Insight -for iluWave(). - -.lif specs from http://www.infinite-mass.com/bob/files/lifed.zip and - http://www.infinite-mass.com/bob/files/lif.zip - -Rune Kock (rune@vupti.com) for writing the new Visual Basic headers and for -finding a return bug in iluScaleAdvanced. - -Julien Verchere and Xavier Decoret for suggesting that I use const char*'s -instead of char*'s as function parameters. - -Jason Reeve (jason@retribution-entertainment.com) for finding a bug in iluCrop, -several origin-related problems, and helping me bring my targa-loading code up -to spec. - -Darren Adams for telling me the #pragmas to use in MSVC++ to disable the -console window in a "console app". - -David Gould for getting onto me about my crappy Linux support. - -David Galeano for his DX8 Surface to TGA code, modified to save to any texture. -The original can be found at http://rt000s2p.eresmas.net/downloads.htm - -RLE code from TrueVision's TGA sample code available as Tgautils.zip at -ftp://ftp.truevision.com/pub/TGA.File.Format.Spec/PC.Version/ - -Jeroen Janssen for creating a Mandrake RPM patch for DevIL. - -Greg Priem for his help with supporting libungif and some various other things. - -Nelson Rush for SDL surface support and finding several bugs with DevIL. - -George McBay for his wonderful help finding bugs in my mipmapping code. - -Marco Kögler for finding bugs in my .jpg and .png code. - -Falco Kleinschmidt for fixing problems with the Linux makefiles. - -Olivier Bucher for finding a bug in saving 8-bit .bmp files. - -Derek Wills for noticing a problem with ilutGLScreenie when the screen width is -not a multiple of 4. - -Dale Schumacher's "Filtered Image Rescaling" code in Graphic Gems III for some -scaling algorithms in ILU. - -Kevin Park for making some suggestions on the ilImage C++ wrapper. - -Alessandro Pedretti for finding a bug in my TIFF code and making suggestions -about portability issues. - -boostrlns from #flipCode for finding the ilutGLLoadImage bug in the 1.1.5 -release. - -Ismo Kärkkäinen (iak@cs.joensuu.fi) for making some really nice new makefiles -for Linux. - -Kishan (http://www.hackorama.com) for the nice directions on how to compile -the external libraries under Linux. - -Wojciech Sobczuk for creating FreeBSD versions of the makefiles. - -nVidia for code to load .DDS files available at -http://www.nvidia.com/view.asp?IO=dxtc_decompression_code - -PixiGreg for noticing that many viewers don't like .bmp files with negative -heights (flipped), even though the specs say that it is valid. - -Matthias Stiller and Andre Normann for their invaluable help with getting -DevIL to work on Big Endian machines. - -Jean-Francois Richard for the Python bindings of DevIL. - -Nick Marley for post-build information in MSVC++. - -Kenneth Hurley for his help in expanding and fixing my DDS code. - -Mark Callow for EXIF-loading and saving code, along with il[Load/Save]FromJpegStruct - -Sam for several fixes to my .bmp and .jpg loaders. - -chris79 for his help debugging my .psp and .gif code in several versions. - -Nick Marley for his MSVC++ post-build fixes. - -Marc Gregoire for sending images that DevIL would not load. - -Alberto Barbati for noticing that the IL_NEU_QUANT_SAMPLE mode wasn't being used properly. - -Ryan Butterfoss for his contributions to the DDS saving code. - -Computer Graphics (C Version) book by Hearn and Baker for the arbitrary polygon filling code. - -Nicolas Weber - -Meloni Dario - -Erick Tryzelaar - -Matej Tyc for completely redoing the Linux makefile system and rewriting the documentation. - -Matevz Tadel for fixing makefile for Scientific Linux. - -Richard Sim for contributing several fixes, especially for .psd loading - -robin_charlton for contributing a patch for Windows BMP support in ILUT. - -Vincent Richomme for DirectX Mobile support - -Antibyte for DDS save bugfix - -Stefan Cornelius, Secunia Research, for finding some buffer overflow vulnerabilities. - -Nico Golde for finding that my fix for the above vulnerability was not totally complete. - -GAIA (Group for Artificial Intelligence Applications) for contributions including .iff-loading -and redoing the ilutConvertToHBitmap code. Their changes are at -http://gaia.fdi.ucm.es/grupo/projects/javy/devzone.html#DevILNotes. - -Jesse Maurais for support of X11 component - - -Translations: -------------- - -Carlos Aragonés, for Spanish translation - -Bart De Lathouwer, for Danish translation - -Osamu Ohara, for English translation - -Abdullah Alshammari, for Arabic translation - -Osamu Ohara, for Japanese translation - -Andreas Stöckel, for German translation - diff --git a/samples/DevIL/ChangeLog b/samples/DevIL/ChangeLog deleted file mode 100644 index eabed1920..000000000 --- a/samples/DevIL/ChangeLog +++ /dev/null @@ -1,604 +0,0 @@ -2009-03-08 MatÄ›j TÃ½Ä - * docs/Makefile.am: Fixed distcheck by overriding dvi target. - * lib/Makefile.am: Renoved ilu_mipmap.h file - * configure.ac: Added option to disable checks for 'nvidia texture tools' and - 'libsquish' - -2009-03-08 Denton Woods - * il_ilbm.c:410: Changed to IL_BGR from IL_RGB. - * il_iff.c (ilLoadIffF/ilLoadIffL): Changed to call Lbm loading functions - if Iff loading fails, since they both can have the .iff extension. - * il_ilbm.c:416: Added origin reference. - * configure.ac: Added more file formats to the format checks. - * Makefile.am: Removed ilu_mipmap.h. Added ilu_error-french.h. - -2009-03-07 Denton Woods - * Updated version numbers to 1.7.8 project-wide. - * DevIL_manual.texi: Added several file formats to the appendix. - * il_io.c: Updated Doxygen comments for loading/saving functions. - * libraries.txt: Updated with new libraries. - * il_io.c (ilTypeFromExt): Changed return value of FITS files to IL_FITS. - Added DICOM, FTX, Rot and Texture checks. - * il_states.c/.h: Updated with newer file formats. - * il_blp.c:649: Fixed ilNewImageFull call to use color index. - 659: Fixed memcpy from base image to new mipmap. - * il_dcx.c, il_exr.cpp and many more: Checks return value of ilFixImage now. - * il_iff.c:271: Got rid of ilConvertImage call. - -2009-03-06 Denton Woods - * Updated VC8 projects to use il_mp3.c. - * il.h: Added description to IL_WDP. - -2009-03-05 Denton Woods - * il_mp3.c: Added this file. - * il_io.c: Added loading calls for .mp3 files. - * il_internal.h: Added .mp3 loading declarations. - * Makefile.am: Added il_mp3.c to source line. - * il.h: Added IL_MP3 define. - -2009-03-04 Denton Woods - * il_utx.cpp: Started cleanup of file using C++ constructs. - * Updated VC8 projects to use il_utx.cpp. - -2009-03-03 Denton Woods - * ilu_error-french.h: Added French translation of errors. - * ilu.h: Added ILU_FRENCH define. - * Changed il_utx.c to il_utx.cpp. - -2009-03-02 Denton Woods - * il_utx.c: Added DXT1 loading in UTX files. - * il_utx.h: Added this file. - * lib/Makefile.am: Added il_utx.h to include line. - * il_utx.c: Fixed loading of larger images. - * windows_example.rc: Fixed accelerator for menu. - -2009-03-01 Denton Woods - * il_utx.c: Added this file. - * lib/Makefile.am: Added il_utx.c to source line. - * il_internal.h: Added .utx loading declarations. - * il_io.c: Added loading calls for .utx files. - -2009-02-28 Denton Woods - * il_states.c / il_states.h: Added ilVtfCompression to IL_STATES. - * il_vtf.c: Added more formats to saving. - * il.h: Added IL_VTF_COMP define. - * il_io.c: Added saving calls for .vtf files. - * il_dds.c: Added DecompressARGB16 to load a2r10g10b10 and a2b10g10r10 formats. - * il_convbuff (iSwitchTypes): Added several missing break statements. - * il_convbuff:1988: Changed to check types instead of bpc. - -2009-02-27 Denton Woods - * il_dpx.c / il_dpx.h: Got basic dpx loading working. - * WindowsTest.cpp: Fixed memory leak when loading files. - * il_vtf.c (iGetVtfHead): Added support for headers of 64 bytes. - * il_iwi.c (iLoadIwiInternal): Added IL_INVALID_FILE_HEADER error. - * il_vtf.c: Added VTF writing functions. - -2009-02-26 Denton Woods - * configure.ac, lib/Makefile.am, il.h, il_internal.h, il_ilbm.c, il_io.c: Added - patch from Ben Campbell for ILBM files at - https://sourceforge.net/tracker2/index.php?func=detail&aid=2635333&group_id=4470&atid=304470. - * il_dpx.c / il_dpx.h: Added these files. - * lib/Makefile.am: Added il_dpx.c and il_dpx.h to source/include lines. - * il_internal.h: Added .dpx loading declarations. - * il_io.c: Added loading calls for .dpx files. - -2009-02-25 Denton Woods - * il_iwi.c:329: Changed IL_MAX parameter from 16 to 8 (copy+paste error). - * WindowsTest.cpp: Added mipmap functionality to 0-9 keys (0 goes to main image). - -2009-02-24 Denton Woods - * vc9 Unicode projects: Changed settings to use x64 and x86 directories for .obj files. - * test/in: Removed this directory. - * Added "Test Images" to SVN. - * il_dds.c (DecompressFloat): Added proper support for G16B16, G32B32, R16 and R32 images. - -2009-02-23 Denton Woods - * il_pnm.c: Fixed bug at https://sourceforge.net/forum/message.php?msg_id=6491617 - - Changed order of lines 448 and 450. - -2009-02-22 Denton Woods - * il_internal.h: Added IL_NO_EXTLIBS define. - * il_dds-save.c: Removed unused variables. - * ilu_mipmap.c: Finished redoing all mipmap functions. - * ilu_mipmap.h: Removed this file. - -2009-02-21 Denton Woods - * ilu_mipmap.c: Redid mipmap functions to use iluScale functions instead of nearest. - -2009-02-20 MatÄ›j TÃ½Ä - * docs/Makefile.am,docs/Devil_manual.texi: Added new ILU images to the - manual, set the manual license to GFDL. - * testil, ilur: Licensed under GPL v3 - -2009-02-19 Denton Woods - * windows_example\resources: Added DevIL Logo.ico, removed OpenIL Logo.ico. - * windows_example\resource.h: Changed to use DevIL Logo.ico. - * il_io.c (ilSaveL): Fixed bug where return type was cast to 1 byte. - -2009-02-18 Denton Woods - * configure.ac: Added descriptions of more image formats. - * il_ftx.c (iLoadFtxInternal): Changed to load all FTX images as RGBA. - -2009-02-17 Denton Woods - * ilu_mipmap.c: Changed all references of Next to Mipmaps to fix bug noticed at - https://sourceforge.net/forum/message.php?msg_id=6443698. - * Added support for IL_NO_GAMES in il_internal.h. - -2009-02-17 MatÄ›j TÃ½Ä - * configure.ac, m4/devil-definitions.m4 (TEST_FORMAT): Added an option - to describe image formats. - -2009-02-16 MatÄ›j TÃ½Ä - * src-ILU/ilur: Made ilur independent on regex.h - * autogen.sh: Simplified autotools invocation to autoreconf only - * configure.ac: Added support for IL_NO_GAMES if users don't want - support for game formats - * docs/DevIL_manual.texi: Fixed errors causing trouble when making - info files + some minor syntax enhancements. - -2009-02-16 Denton Woods - * il_manip.c (ilGetAlpha): Added IL_ALPHA case. - * il_manip.c (ilSetAlpha): Cleaned up formatting. Added IL_ALPHA case. - Fixed casting issue in integer case. - * il_texture.c: Added this file and the simple .texture loading. - * lib/Makefile.am and src-IL/src/Makefile.am: Added il_texture.c to source line. - * il.h: Added IL_TEXTURE define. - * il_internal.h: Added .texture loading declarations. - * DevIL.nb: Removed the test image from the notebook to drop it from over 9MB to 4.5KB. - -2009-02-15 Denton Woods - * il_blp.c (iLoadBlpInternal): Finished testing and fixed BLP2 RAW with 1-bit alpha. - * il_dicom.c: Added this file. - * config.h.win: Added defines for new image formats. - * il_io.c / il_jp2.c: Added .jpx, .j2k and .j2c extensions for JPEG 2000. - * il_io.c / il_jpeg.c: Added .jif and .jfif extensions for JPEG. - * il_dicom.c: Added DICOM loading for uncompressed formats and little endian data. - * lib/Makefile.am and src-IL/src/Makefile.am: Added il_dicom.c to source line. - * il_dicom.c: Added DICOM support for big endian data. - * test/in/tiff: Removed this directory. - * il_rot.c: Added this file. Added .rot loading. - * lib/Makefile.am and src-IL/src/Makefile.am: Added il_rot.c to source line. - * il.h: Added IL_ROT define. - * il_internal.h: Added Rot loading declarations. - -2009-02-15 MatÄ›j TÃ½Ä - * src-ILU/ilur: Added the ilur - commandline ILU frontend - * bin, examples/Makefile.am: Moved examples's Makefile.am to bin - directory. Added ilur to it. - * docs/DevIL_manual.texi: Made slight syntax corrections, fixed the - sample program and added functions index - -2009-02-14 Denton Woods - * il_blp.c (iLoadBlp1): Support for mipmaps added. - * il_gif.h: Moved iCopyPalette declaration out of here into il_internal.h. - * il_gif.c: Moved iCopyPalette definition out of here into il_pal.c. - * projects/Mathematica: Added this folder. - * il_fits.c (iCheckFits): Implemented this. - * il_fits.c (iLoadFitsInternal): Renormalized float and double data. - * il_blp.c (iLoadBlp1): Added seeks to image data (not necessarily following palette). - * il_blp.c (iLoadBlpInternal): Added loading for BLP2 RAW with 1-bit alpha. - -2009-02-13 Denton Woods - * WindowsTest.cpp: Added slideshow capabilities with Page Up and Page Down. - * il_jpeg.c:357: Added ilFixImage call. - * il_jpeg.c (ilLoadFromJpegStruct): Changed return value to the return of ilFixImage. - * il_blp.c:466-467: Fixed to read these images properly. - * WindowsTest Project: Changed x64 debug to use runtime library debug DLLs. - -2009-02-12 Denton Woods - * il_ftx.c: Added this file. - * lib/Makefile.am and src-IL/src/Makefile.am: Added il_ftx.c to source line. - * il_io.c: Added Ftx loading function calls. - * il_blp.c: Added BLP1-loading functions. - -2009-02-11 Denton Woods - * il_jpeg.c (ilSaveJpegL): Changed the itellw call to after iSetOutputLump - (was returning bad values, since the lump was not set yet). - * il_io.c (ilSaveL): Changed return value to Ret and got rid of IL_FALSE check. - * il_bmp.c, il_dds-save.c, il_hdr.c, il_jp2.c, il_pcx.c, il_png.c, il_pnm.c, il_psd.c, il_raw.c, - il_sgi.c, il_wbmp.c: Fixed same problem that il_jpeg.c had with saving lumps. - * il_sgi.c: Put header on file. - * il_iwi.c:337: Removed this line, which called iread a second time for CompData. - -2009-02-10 Denton Woods - * il_io.c: Added ilLoadBlp calls in il_io.c. - * VC9 projects: Turned off x64 incremental linking to prevent debugging problems described here: - http://stackoverflow.com/questions/218747/msvcr90ddll-not-found-in-debug-mode-with-visual-c-2008 - * il_blp.c: Added code to read BLP2 files. - -2009-02-09 Denton Woods - * ilu_scale2d.c (iluScale2DBilinear_): Started rewrite, since results were really ugly. - * il_iwi.c / il_vtf.c: Changed max references to IL_MAX. - * il_wdp.c: Redid all of the code so that it actually works now. - * il_internal.h:42-46: Added lines to define IL_NO_WDP if not in Windows. - * il_io.c: Added Iwi and Fits loading calls. - * il.h: Added IL_BLP and IL_DICOM. Switched IL_DICOM and IL_IWI defines. - * il_internal.h: Added Blp and Dicom function defines. - * il_blp.c: Added this file and started code. - * lib/Makefile.am and src-IL/src/Makefile.am: Added il_blp.c to source line. - -2009-02-09 MatÄ›j TÃ½Ä - * tests/testil.c: Added checks what IL loading/saving routines ended - * build system: Removed --enable-monolithic option. - -2009-02-07/08 Denton Woods - * il_iwi.c: Added this file and code to load .iwi files. - * il_vtf.c (iLoadVtfInternal): Added checks for CompData == NULL. - * il_dds.c/il_dds.h: Changed CompFormat to a local variable. Renamed Decompress to DdsDecompress. - * ChangeLog (this file): Changed order to newest at the top. - * il.h: Added IL_FITS and IL_IWI defines. - * config.h.win: Added IL_FITS, IL_IWI, IL_SUN and IL_TPL. - * lib/Makefile.am and src-IL/src/Makefile.am: Added il_fits.c and il_iwi.c to source line. - - ---- 1.7.7 release --- - -2009-02-06 MatÄ›j TÃ½Ä - * configure.ac, lib/Makefile.am: Added explicit linking with libm - library + fixed the ilut_x11.c file conditions of compilation - * examples/Makefile.am + IL examples, test/Makefile.am + testil: Added - conditional compilation option when compiling only with IL (without - ILU, iluErrorString() absence workaround) - -2009-02-06 Denton Woods - * README.win and README.unix: Updated with Cygwin/MinGW instructions. - -2009-02-05 Denton Woods - * il_tga.c: Fixed bug loading malformed RLE Targa images. - * il_rle.c:20: Changed size_t cast to ILint to resolve compiler warning. - * il.def: Added definitions. - * Updated version numbers to 1.7.7 everywhere. - -2009-02-04 Denton Woods - * ilut_opengl.c:160: Changed checks to see if less than 0. - * il_fits.c: Got this reading FITS files properly. - -2009-02-04 MatÄ›j TÃ½Ä - * configure.ac: Corrected handling of --enable-debug options, added - working install support for pkg-config - * data/Makefile.am, *.pc.in: Corrected pkg-config files - -2009-02-03 Denton Woods - * il_io.c: Updated Doxygen comments. - * il_fits.c: Added this file (not in any projects yet). - * il_fits.c: Wrote beginning of FITS loading code. - -2009-02-02 Denton Woods - * il_manip.c (ilCopyPixels):311: Added check for destination format of color index. - * il_convbuff.c (ilConvertBuffer): Changed to accept the source image palette. Added code to - convert from buffers that are related to a palette before the large switch. - * il_alloc.c (ifree): Changed so that if Ptr == NULL, it does not try to free the pointer. - * il_nvidia.cpp/il_squish.cpp: Added empty functions if nVidia or libsquish support is not - compiled in. - * test/format_test/testil.c:5: Added _USE_MATH_DEFINES. - -2009-02-01 MatÄ›j TÃ½Ä - * test/format_test: Tweaked the script to use wine if cross-compiling - to run the tests, extended testil capabilities - * m4/devil-definitions.m4: Fixed bugs that caused that you couldn't - disable support for some formats no matter what :-) - * m4/devil-api-checks.m4: Added Xrender build support (by Jesse Maurais) - -2009-02-01 Denton Woods - * devil_internal_exports.h: Commented members of ILimage struct using Doxygen-style comments. - Removed deprecated, commented-out members (NumNext, NumLayers, NumMips). - * Updated several functions with appropriate Doxygen comments. - * il.h: Updated IL_XXX file format defines with Doxygen comments. - * ilu_rotate.c: Changed min/max calls to IL_MIN/IL_MAX. - * ilut_states.c (ilutSetInteger): Fixed ILUT_MAXTEX_DEPTH call and added checks around first - three calls for Param >= 1. - -2009-01-31 Denton Woods - * Added newlines to the end of several files to keep gcc quiet. - * Added new MSVC++ projects for examples. - * il_bmp.c:556: Changed to Header->biWidth from iCurImage->Width. iCurImage->Width was not - updated to the new width at this point. - * il_rotate.c (iluRotate_): Rewrote to fix 1 pixel shifting issue. - * Updated DevIL Manual with new ilSaveL information. - * il_stack.c (ilCloseImage): Added missing delete of Faces member. - * il_dds-save.c (ilCompressDXT): Added this function. - * il.h: Removed ilNVidiaCompressDXT and ilSquishCompressDXT - moved to il_internal.h. - * il_dds-save.c:151: Changed to Faces from Images. - * il_dds-save.c (CompressTo565): Added IL_ALPHA case. - * Updated DevIL Manual with new DXTC information. - -2009-01-30 Denton Woods - * Added DevIL.NET to projects folder. - * il_dds.c: Changed Image->Next code for cubemaps to read Image->Faces. Also changed Image->Next - code for mipmaps to read Image->Mipmaps, even further down the chain. - * il_dds.c (ilTexImageDxtc): Added call to ilCloseImage for Image->Faces. - * il_endian.h:113: Fixed bug #2545848 - inline GCC ASM changed. - * ilut_directx9.c (ilutD3D9CubeTexture): Changed ->Next to ->Faces. - * ilut_directx9.c (iD3D9CreateMipmaps): Changed ->Next to ->Mipmaps. - * il_states.c:605: Changed from ->Next to ->Mipmaps. - * il_states.c (iGetActiveNum): Rewrote to not use ->Next pointer for everything. - * il_vtf.c (VtfInitMipmaps): Changed to reflect the new mipmap arrangement as well. - * il_wal.c:141,142: Changed ->Next to ->Mipmaps. - * il_wal.c: Cleaned up the formatting a bit. - * il_stack.c (ilActiveMipmap): Changed ->Next to ->Mipmaps. - * il_stack.c (ilActiveImage/Mipmap/Face/Layer): Added another check for NULL, changed error. - Changed order of statements in for loop. This leads to much much less in the way of - ilSetError calls, since we do not have iCurImage == NULL. - * il_vtf.h:43: Changed to ILuint from ILint. - * il_vtf.c: Changed VtfInitMipmaps calls to VtfInitFacesMipmaps calls and changed iLoadVtfInternal - to support environment maps. - * il.h:384: Added IL_SPHEREMAP. - * il_hdr.c:467: Changed to char* to get OS X to stop issuing a warning. - * il_size.c:53: Changed return value to ILuint. - * devil_cpp_wrapper.hpp: Removed MSVC++ #pragma at the top for deprecated lib. - -2009-01-28 Denton Woods - * il_tpl.c: Added line 219. - -2009-01-27 Denton Woods - * il_bits.c (bseek): Changed check for return values of iseek. - * il_tpl.c: Added support for many more TPL data formats. - * il_tpl.c: Added support for color indexed data formats. - * il_tpl.c: Added support for multiple images in a file. - * il_sdl.c (ilutConvertToSDLSurface): Overhauled this code. - * ilut_opengl.c: Removed iGLSetMaxW/H/D and MaxTexW/H/D. - * ilut_states.h/ilut_states.c: Added MaxTexW/H/D to ILUT_STATES. - * ilut_states.c (ilutGetIntegerv): Added ILUT_MAXTEX_WIDTH/HEIGHT/DEPTH. - -2009-01-26 Denton Woods - * projects/win mobile: Added Windows Mobile projects. - * Removed .cvsignore files from SVN. - * il_bits.c:65: Commented out icloser call. - * include/IL/DevIL.i: Removed IL/ prefix on header filenames. - * include/IL/build-python and build-lua: Updated paths. - * projects folder: Renamed msvc to msvc9. - * il_tpl.c: Added for TPL support. - * il_io.c: Added function calls for TPL support. - * il_internal.h: Added declarations for TPL support. - -2009-01-25 Denton Woods - * ilut_internal.h:63-67: Redid definitions of IL_TEXT to coincide with il_internal.h. - * il_states.c: Updated _ilLoadExt/_ilSaveExt with all extensions. - * il_states.h: Updated with all extensions. - * All image formats with saving: Changed return values of ilSaveXxxF and ilSaveXxxL to be - an integer stating the number of bytes written. This is what ilSaveF/L have been - trying to return all along. - * il_pal.c:1075: Added error condition. - * lib/Makefile.am: Added il_size.c. - * simple.c: Added iluInit call. - * il_dds-save.c (GetAlphaBlock): Applied code from GetBlock, since it was still reading out of bounds. - * il_psd.c (ParseResources):808: Added check for ResourceSize being too small. - 834-837: Added check to insure that we are not copying from past the end of Resource. - * il_hdr.c:527-528: Changed order so that beg_run+run_count is tested first. - * il_psd.c:829: Subtracted an additional 4 for the Size obtained in the lines before. - * il_jp2.c:792-792: Added cleanup code if failure. 676-680: Added call to jas_init. - Added code throughout to prevent from having to initialize Jasper more than once. - * il_internal.h/il_internal.c: Added strdup for Windows CE. - * il_internal.h:105-107: Added so that we do not try to compile inline ASM with Windows Mobile. - -2009-01-24 Denton Woods - * il_internal.h,il_tiff.c: Changed ilSaveTiffL to void* instead of const void*. - * il_tiff.c: Added _tiffFileReadProcW. Changed _tiffFileSeekProc(W) to return the - result of itellw instead of tOff. This allows us to finally overload the TIFF - writing code. - * il_internal.h: Removed #pragma comments, which were commented out anyway. - * il_io.c (ilSaveL): Added call to ilDetermineSize. - * il_size.c: Added this file. - * il_manip.c:14: Removed #include . - * il_jpeg.c:53: Added check for IL_USE_IJL. - * il_exr.cpp:319,329: Changed to write functions instead of read. - * il_files.c: Added iSetOutputFake. - * il_files.c (iSetOutputLump): Added check for NULL to accommodate ilDetermineSize function. - * il_hdr.c:457: Changed from char* to ILbyte*. - * il_icns.h:24,30: Changed from ILbyte to char. - * il_size.c: Added #ifdefs for when user has declared IL_NO_XXX. Changed error to ENUM instead of PARAM. - * Updated MSVC8 projects with il_size.c. - * src-IL/src/Makefile.am: Added il_size.c. - * il_jp2.c: Added ilIsValidJp2* functions. - * il.h: Added ilDetermineType and ilDetermineTypeL to declarations. - * il_io.c: Changed ilDetermineTypeL to be exported. - * il_pcx.c: Formatting issues fixed. - * il_mdl.c: Added ilIsValidJp2* functions. - * il_io.c: Added JP2, MDL and XPM support to ilDetermineType and ilIsValid functions. - * il_icon.c/il_png.c: Renamed color_type to ico_color_type and png_color_type to avoid name conflicts. - * il_iff.c: Changed all malloc->ialloc and free->ifree. Added checks for ialloc failure. - * il_io.c (ilDetermineTypeL): Changed VTF check to return IL_VTF instead of the miscopied IL_SUN. - * il_size.c (ilDetermineSize): Now calls iTargaSize for Targa files. - * il_tga.c: Added iTargaSize. - -2009-01-22 Denton Woods - * ilut_internal.h:66: Changed to compile under Cygwin. - * ilut_opengl.c:108: Replaced _MSC_VER with _WIN32 and _WIN64. - * il_dds-save.c:343: Fixed bug #1067590 - Removed this line, which caused crashes. - * il_pic.c (iLoadPicInternal): Fixed ilTexImage call, moved it after channel information read. - * il_pic.c (readScanline):294-295: Added check for alpha channel. - * il_pic.c: Added ilSetError calls throughout. - * il_sgi.c (iLoadSgiInternal): Fixed bug #1060946 - Removed IL_LUMINANCE_ALPHA filetype. - * WindowsTest.cpp:52,53: Changed border size to accommodate Windows Vista/7. - * il_endian.h:20: Changed to give __BIG_ENDIAN__ a value of 1. The Google cached page of - http://74.125.47.132/search?q=cache:YfSl36C2pAQJ:patch-tracking.debian.net/patch/series/view/devil/1.7.2-1/00_endian_and_ILvoid_fixes.diff+devil+big+endian&hl=en&ct=clnk&cd=11&gl=us&lr=lang_en - has this patch (Nov. 24, 2008 cache). - * devil_internal_exports.h:34: Uncommented and commented line 30. - -2009-01-20 MatÄ›j TÃ½Ä - * test/format_test: Added a program and script as 'make check' target. - Those will test whether IL is capable of saving and loading images and whether the saved and - loaded image is similar to the original. - * configure.ac, lib/Makefile.am: Added support to IFF compilation. - * docs/DevIL_manual.texi: Added missing documentation about getting - image data + fixed some typos. - * include/IL/devil_cpp_wrapper.hpp: Fixed a typo that caused - compilation error - -2009-01-20 Denton Woods - * ilut_opengl.c (ilutGLScreen): Added glPixelStorei call. - * Added il_iff.c from GAIA. - * Added "x64 DLL Install.exe" to SVN. - * il_internal.h: Renamed ilIsValidJpg* functions to ilIsValidJpeg*. Added Iff functions. - * il_io.c: Added checks for Iff-loading. - * ilut_win32.c (ilutConvertSliceToHBitmap): Added better error handling. - * src-IL/src/Makefile.am: Added il_iff.c. - * ilu_rotate.c (iluRotate_): Changed ilResizeImage call. - * Added ilut_config.h. - * ilut.h: Added reference to ilut_config.h for Windows. - * il_files.c/il_icon.c/il_png.c/il_mng.c: Fixed typecasting warnings. - * il_jp2.c/il_wbmp.c (ilSaveJp2L/ilSaveWbmpL): Removed const qualifier. - -2009-01-19 Denton Woods - * il_hdr.c: Changed line 73 to have space for terminating NULL. - * src-IL/src/Makefile.am: Added il_vtf.c and *.cpp files. - * Fixed the MSVC++ 9 solutions pointing to the MSVC++ 8 project files. - * devil_cpp_wrapper.hpp: Updated to use ILconst_string instead of char*. - * il.h: Changed definition of IL_ALPHA to match OpenGL's GL_ALPHA. - * src-IL/include/Makefile.am: Added il_exr.h. - * il_dds.c/il.h: Readded DXT extension code. - * il_internal.h: Added declaration of ilFixCur. - -2009-01-16 Denton Woods - * Updated x64 projects - -2009-01-15 MatÄ›j TÃ½Ä - * il_io.h, include/IL/il.h, il_states.h: Changed some normal strings to constant - strings (in ilSave, ilIsValid and ilGetString) - * configure.ac, lib/Makefile.am: Added wbmp compilation support - * il_jp2.c, il_wbmp.c: Fixed a typo that prevented compilation - * include/IL/devil_cpp_wrapper.hpp: Added a hopefully harmless solution for - the initialization of DevIL. - -2009-01-15 Denton Woods - * il_manip.c / il.h: Added ilClampNTSC function. - * il_squish.cpp: Added file. - * il_dds-save.c: Added line 688. - * il_states.c: Added lines for libsquish support. - * il_dds-save.c (Compress): Added libsquish compression. - * il_io.c (ilDetermineTypeF/L and ilIsValid/F/L): Added VTF, SUN and EXR. - * il_io.c (ilIsValidF/L): Added TIF - * il_jp2.c:131-137: Added these lines to take care of erroneous error generated by JasPer's buffering. - * il_jp2.c: Added functions to save JPEG 2000 images. - * il_utility.c (ilGetBppFormat): Added IL_ALPHA. - * il_jp2.c (iLoadJp2Internal): Added 1 and 2 channel format loading. - * il_dds-save.c:700-701: Changed to IL_RGBA. - * il_dds-save.c (ChooseEndpoints): Changed to use norm squared instead of a sum of the components. - * il_dds-save.c (GetBlock): Changed to copy adjacent data if it goes beyond the bounds of the image. - * il_icon.c: Removed extra whitespace. - * il_icns.c / il_internal.h: Added ilIsValidIcns*. - * il_icns.h: Changed comments on ICNSDATA. - * il_exr.c: Added ilIsValidExr*. - * il_io.c (ilLoadF): Uncommented ilLoadJp2F. - * il_dds-save.c (CompressTo565): Changed 24-bit to 16-bit code based on Charles Bloom's rant. - * il_dds.c (DxtcReadColor/DxtcReadColors): Changed conversion to copy high bits to lowest bits as well. - * il_io.c: Reenabled PhotoCD support. - * il_pcd.c (iLoadPcdInternal): Added check for end-of-file. - * il_exr.c: Added EXR saving functions. - -2009-01-13 Denton Woods - * Converted source repository to SVN from CVS. - -2009-01-12 Denton Woods - * ilut_directx9.c: Cleared up formatting some. - -2009-01-11 Denton Woods - * MSVC9 Unicode projects: Updated to work better in 64-bit Windows. - * il_vtf.c: Removed commented lines 238-242. - * Created application to copy DLL files to the System32 directory. - -2009-01-10 MatÄ›j TÃ½Ä - * m4/devil-definitions.m4, m4/devil-reports.m4: Added a report saying - what libraries were linked with DevIL (should be helpful to packagers - who need to know DevIL dependencies) - * il_endian.h (iGwapUShort/iSwapUInt): Finished fixing bug #2023453 - (inline GCC asm, there was a typo left) - * src_IL/src/il_tiff.c (ilSaveTiff): Fixed a typo that was causing - conflicting declarations error - * configure.ac:264: Added IL_NO_WBMP since the Wbmp loading functions - that are referenced, but not implemented, caused linking errors - -2009-01-09 Denton Woods - * ilut_opengl.h: Moved ILGLCOMPRESSEDTEXIMAGE2DARBPROC typedef out of #ifdefs. - * ilut_opengl.c: Added ilutGLSetTex2D and ilutGLSetTex3D. Changed ilutGLSetTex to - just call ilutGLSetTex2D. Did the same thing for ilutGLSubTex. Added checks for - volume image extensions. Renamed MakeGLCompliant to MakeGLCompliant2D. Added - MakeGLCompliant3D. - * ilut_opengl.c (ilutGLScreen): Added check for ilTexImage failing. - * il_vtf.c (iLoadVtfInternal): Added BGRA4444 support. - * il_alloc.c / ilu_scale.c: Cleaned up formatting some. - * devil_internal_exports.h: Added Faces member to ILimage. - * il_devil.c (iCopySubImages): Added support for faces. - * il_register.c: Added ilRegisterNumFaces. - * il_convert.c (ilFixImage): Added support for faces. - * il_stack.c: Added ilActiveFace. - * ilut_directx9:63,779: Added ILboolean typecast. - * ilut_win32:102: Added ILboolean typecast. - * il_jpeg.c:987: Commented out pragma warning at the end. - * il_mng.c: Added #pragma warning at the top to get rid of redefinition warning when compiling. - * il_nvidia.cpp (ilNVidiaCompressDXT): Added check for Data being NULL. - * ilut_win32.c (ilutConvertSliceToHBitmap): Fixed bug #2496509 - added line 117 and - added DataSize member. - * il_hdr.c (iGetHdrHead): Fixed bug #2496518 - Added check for count. Changed - sscanf to use %2s format specifier to prevent buffer overruns in x and y. - * il_pnm.c (iGetWord): Fixed bug mentioned in #2496518 - igetc was moved back - into the while loop. Added a check for WordPos to prevent buffer overflow. - Restructured the while loop to work properly. - * il_convert.c (iConvertPalette): Changed references of iCurImage to Image. - * il_gif.c (GifGetData): Added DataPtr and changed line 636 to use Data instead of Image->Data. - * il_gif.c (iGetPalette / GetImages): Changed to better deal with local palettes. - -2009-01-08 MatÄ›j TÃ½Ä - * TODO: Added some tasks that I would like to undertake - * ChangeLog, NEWS: Copied old ChangeLog entries to NEWS file - * lib/Makefile.am: Added two new files to the list of IL sources - (il_sun.c, il_nvidia.cpp) - * examples/iller: Made empty files where the ILU frontend will be in - the future. - * configure.ac, m4/devil-reports.m4: Put the report stage of the - configure script to a separate m4 file. - -2009-01-08 Denton Woods - * opengl_example/gltest.c (main): Added iluInit/ilutInit calls. - * ilut_opengl.c (ilutGLFormat): Added IL_ALPHA support. - * il_bmp.c: Minor formatting issues fixed. - * il.h: Added IL_NVIDIA_COMPRESS #define. - * il_states.h: Added ilUseNVidiaDXT to IL_STATES. - * il_state.c: Added IL_NVIDIA_COMPRESS support. - * il_dds-save.c (Compress): Changed to use NVTT if needed. - * il_nvidia.cpp: Added ilNVidiaCompressDXTFile and Depth parameter to ilNVidiaCompressDXT. - -2009-01-06/07 Denton Woods - * Added il_sun.c (Sun Raster file support) - * ilut_opengl.c (ilutGLInit): Changed Linux ilGLCompressed2D pointer casting - to coincide with the old SVN version. - * il_tiff.c / il_alloc.c: Fixed a few pointer casts that were fixed in SVN. - * test/DDrawTest: Fixed extra whitespace in all files in this project. - * il_endian.h (iGwapUShort/iSwapUInt): Fixed bug #2023453 (inline GCC asm). - * ilut_win32.c (ilutConvertSliceToBitmap): Fixed bug #1775036 (definition of buff). - * il_psd.c (PsdGetData): Fixed bug #2219350 (16-bit luminance images not loading properly). - * il_manip.c: Cleared up some minor formatting issues. - * il_png.c (iSavePngInternal): Fixed bug #1680577 (some metadata not written correctly). - * il_nvidia.cpp (ilnVidiaCompressDXT1): Disabled mipmap generation and added code to - ilOutputHandler constructor to determine the proper size of the buffer. - * il.h: Added IL_DXT1A define for nVidia Texture Tools. - * il_nvidia.cpp: Added DXT1a, DXT3 and DXT5 support. Renamed ilnVidiaCompressDXT to - ilnVidiaCompressDXT and added the DxtType parameter. - * il_internal.c: Cleaned up extra whitespace toward end. - -2009-01-02 MatÄ›j TÃ½Ä - * src-{IL,ILU,ILUT}/src/*_internal.c: Hopefully resolved the - HAVE_CONFIG_H thing once for all :-) - * src-IL/src/il_exr.cpp: Undefined OPENEXR_DLL if we are not on - Windows (=> when HAVE_CONFIG_H is not defined) - * src-IL/src/il_io.c:765: Fixed a typo - * src-IL/src/il_vtf.c: Added min and max macros to the beginning - * docs/Devil_manual.texi: Corrected typos and missing @code and other - formatting stuff, corrected image names and incorrect usage of @xref - etc. that prevented compilation - * build setup (Makefile.am and configure.ac): Added support for - compilation of EXR and WDP formats + various other tweaks. - -Up to 2009-01-02 (since 1.7.5 release) Denton Woods - * Readded EXR code. - * Redefined clamping values in il.h. - * Added 64-bit integer types. - * Fixed bug in iRegisterLoad (https://sourceforge.net/forum/message.php?msg_id=5973761). - * Changed seek functions in il_files.c to return ILint. - * Added rpcsal.h and sal.h #includes to ilut.h for DX10. - * Added IL_MAX_QUANT_INDICES to use instead of IL_MAX_QUANT_INDEXS (misspelled). - * Added WBMP support (loading and saving). - * EXR files can now be loaded as file streams and lumps. - * Changed iNeuQuant to take number of colors in palette. - * Compiled MNG support back in. diff --git a/samples/DevIL/DevIL Website.url b/samples/DevIL/DevIL Website.url deleted file mode 100644 index e002d0636..000000000 --- a/samples/DevIL/DevIL Website.url +++ /dev/null @@ -1,5 +0,0 @@ -[InternetShortcut] -URL=http://openil.sf.net/ -IDList= -[{000214A0-0000-0000-C000-000000000046}] -Prop3=19,2 diff --git a/samples/DevIL/Libraries.txt b/samples/DevIL/Libraries.txt deleted file mode 100644 index 727652ade..000000000 --- a/samples/DevIL/Libraries.txt +++ /dev/null @@ -1,40 +0,0 @@ -Libraries needed to compile DevIL* : ----------------------------------- - -(Most of these are optional) - - -Libpng for .png (and some .ico) support available at http://www.libpng.org/pub/png/libpng.html -ZLib for .png (and some .ico) support available at http://www.gzip.org/zlib/ -Libjpeg for .jpg (and some .blp) support from http://www.ijg.org/ -Libtiff for .tif support from http://www.libtiff.org/ -Libmng for .mng and .jng support from http://www.libmng.com/ -JasPer for .jp2 (and some .icns) support available at http://www.ece.uvic.ca/~mdadams/jasper/ -HD Photo Device Porting Kit for .wdp/.hdp support from http://www.microsoft.com/Downloads/details.aspx?FamilyID=285eeffd-d86c-48c3-ab93-3abd5ee7f1ce&displaylang=en. -Little CMS for color profiles (ILU) from http://www.littlecms.com/ -Colour Picker lib for WindowsTest from http://www.fluidstudios.com/freeware.html -Freeglut (or glut) for GLTest from http://freeglut.sourceforge.net -glext.h from http://oss.sgi.com/projects/ogl-sample/ABI/glext.h (as if using OpenGL) -libsquish for DXT compression from http://code.google.com/p/libsquish/ -nVidia Texture Tools for DXT compression from http://developer.nvidia.com/object/nv_texture_tools.html. - -MSVC++ precompiled versions of libpng, zlib, libjpeg, libtiff, lcms and JasPer can be found -at http://openil.sourceforge.net/libs/LibCompiled-vc8.zip or -http://openil.sourceforge.net/libs/LibCompiled-vc9.zip. - -Sources of libpng, zlib, libjpeg, libmng, libungif, libtiff, lcms and JasPer can be -found at http://openil.sourceforge.net/libs/LibSrc.zip - -Intel Jpeg Library from - http://developer.intel.com/software/products/perflib/ijl/index.htm - - -MAC OS X -These library are not still uploaded! -To learn how to install these libraries, read README.macosx - -Source of external framework, downloaded from the previous sites -http://openil.sourceforge.net/libs/ExternFrameworksSrc.sitx - -Complete Compiled Library -http://openil.sourceforge.net/libs/OpenILBin.sitx \ No newline at end of file diff --git a/samples/DevIL/README b/samples/DevIL/README deleted file mode 100644 index a043a64ee..000000000 --- a/samples/DevIL/README +++ /dev/null @@ -1,176 +0,0 @@ -Developer's Image Library version 1.7.8 Readme, Notes and Quick Use -------------------------------------------------------------------- - - DevIL song: "la la la, a cross-platform image library utilizing a - simple syntax to load, save, convert, manipulate, filter and display - a variety of images with ease, la la la" - - -What is it? ------------ - -DevIL is an Open Source image library whose distribution is done under the -terms of the GNU LGPL license. See the COPYING file for more details. -DevIL offers you a simple way to implement loading, manipulating, filtering, -converting, displaying, saving from/to several different image formats in your -own project. - - -Where can I find it? --------------------- - -DevIL can be found at http://openil.sourceforge.net - - -How do I build and install the 3 libraries ? ------------------------------------------ - -*nix users should read README.unix -VisualC users should read README.win -Cygwin users should read README.cygwin -MacOSX users should read README.macosx - -PS: *nix stands for GNU/Linux, *BSD, SunOS/Solaris and perhaps some more. - - -More Extensive Documentation ----------------------------- - -This file is only a quick guide to point you to more detailed information on -how to use DevIL. More extensive documentation can currently be found on the -DevIL site at http://openil.sf.net and in the /Docs directory in a normal -install. - - -Why the hell another image library? ------------------------------------ - -I have never seen an image library that can do everything DevIL does. Sure, -various different libraries can do part of what DevIL can do as well or even -better, but I wanted a simple to use library that encompassed all of these -features. I also wanted an extremely portable image library that could be used -from a variety of languages and utilized the OpenGL syntax. - - -Basic Readme ------------- - -Most anything stated in this document applies to DevIL as well as DevILU and -DevILUT, unless otherwise stated. (This file is best viewed with word wrap on.) - - -Errors: -------- - -All errors generated inside DevIL, along with illegal parameters passed to -DevIL functions are caught and passed to ilSetError(), an internal library -function. The calling program can call ilGetError() to get the value of the -error generated. Error types are defined in il.h, using the 0x501 - 0x5FF -range. ilGetError() will return 0 (IL_NO_ERROR) if no error has occurred. - - -Basic Usage: ------- - -This demonstrates loading an image through DevIL for OpenGL. Don't forget to -call ilInit before you before you do anything: - -#include -#include -#include - -... - -ILuint devilError; - - -ilInit(); - -devilError = ilGetError(); - -if (devilError != IL_NO_ERROR) { - printf ("Devil Error (ilInit: %s\n", iluGetErrorString (devilError)); - exit (2); -} - -.... - -ILuint devilID; - - -ilGenImages(1, &devilID); -ilBindImage(devilID); -ilLoadImage("default1.tga"); // Loads into the current bound image -devilError = ilGetError(); - -if (devilError != IL_NO_ERROR) { - printf ("Devil Error (ilLoadImage: %s\n", iluGetErrorString (devilError)); - exit (2); -} - -.... - -ilutRenderer(IL_OPENGL); // Switch the renderer - -.... - -GLuint openglID, openglError; - - -openglID = ilutGLBindTexImage(); // This generates the texture for you -devilError = ilGetError(); - -if (devilError != IL_NO_ERROR) { - printf ("Error: %s\n", iluGetErrorString (devilError)); - exit (2); -} - -if (openglError != GL_NO_ERROR) { - printf ("Opengl Error (ilutGLBindTexImage): %s\n", gluGetErrorString (openglError)); - exit (2); -} - - - -// Make sure to close the image when you are done with it (though DevIL -// automatically deletes them when the program exits): - -glDeleteTextures(1, &openglID); -ilDeleteImages (1, &devilID); - - -More Examples: ---------- - -The TestIL project is included to test features of DevIL. - -DevIL includes a project called GLTest. This is a simple test of DevIL's -capabilities. All it does it load any image and displays it in a window -created by FreeGlut, which is available on http://freeglut.sourceforge.net. It -is also included to let the user have an idea of what the library can really -be used for. - -Several other test projects are included to test support with various display -APIs. The WindowsTest project is a basic image program that only runs in -Windows right now but showcases several of DevIL's features through various -menus. - -If you want more in-depth tutorials, you can find them on -http://openil.sf.net, or they may be in your installation under the /examples -directory. Documents are also available in the /docs directory. - - -Additional Reading ------------------- - -All image formats used in DevIL have corresponding documents on -http://www.wotsit.org, under the Graphics Files section. These documents -proved invaluable for the creation of this library when there was no library -already available for that image format. - - -Legalese --------- - -All contents of this file are intellectual property of Denton Woods, -copyright 2001-2008. diff --git a/samples/DevIL/README.win b/samples/DevIL/README.win deleted file mode 100644 index 57e3e90eb..000000000 --- a/samples/DevIL/README.win +++ /dev/null @@ -1,44 +0,0 @@ -Where do I find the project files ? ------------------------------------------ - -MSVC++ projects are in DevIL\projects\vc8 and DevIL\projects\vc9. -If compiling with Cygwin or MinGW, use the instructions in README.unix. - - -The IL_NO_XXX #define's: ------------------------- - -A user can recompile this library without complete image support in it. For -example, if your project does not use .jpg files, you can uncomment -#define IL_NO_JPG at the top of il/il.h, recompile the library, and no .jpg -support will be added, meaning quicker compiles and a smaller library. - - -The ILUT_USE_XXX #define's: ---------------------------- - -To disable support for a specific API, edit IL/ilut.h and comment the -corresponding #define. Per example, to disable OpenGL functions support, - add // in front of the line that reads: - -#define ILUT_USE_OPENGL - - -Libraries needed to compile DevIL* : ------------------------------------ - -Libraries.txt (included with the DevIL distribution) lists all libraries needed -to properly compile DevIL. - -Precompiled versions and sources of all libraries needed to compile DevIL are -available at http://openil.sourceforge.net/libs/LibCompiled.zip and -http://openil.sourceforge.net/libs/LibSrc.zip , respectively. - - -Installation: -------------- - -Just unzip and compile other libs included if needed. - -Please also refer to MSVC++.txt for further instructions if you are using -Microsoft Visual C++. diff --git a/samples/DevIL/include/IL/config.h b/samples/DevIL/include/IL/config.h deleted file mode 100644 index 933759038..000000000 --- a/samples/DevIL/include/IL/config.h +++ /dev/null @@ -1,140 +0,0 @@ -/* include/IL/config.h. Generated by configure. */ -/* include/IL/config.h.in. Generated from configure.in by autoheader. */ -#ifndef __CONFIG_H__ -#define __CONFIG_H__ - -#define IL_USE_PRAGMA_LIBS - -// Supported image formats (IL) - -// #define IL_NO_BLP -// #define IL_NO_BMP -// #define IL_NO_CUT -// #define IL_NO_CHEAD -// #define IL_NO_DCX -// #define IL_NO_DDS -// #define IL_NO_DICOM -// #define IL_NO_DOOM -// #define IL_NO_EXR -// #define IL_NO_FITS -// #define IL_NO_FTX -// #define IL_NO_GIF -// #define IL_NO_HDR -// #define IL_NO_ICO -// #define IL_NO_ICNS -// #define IL_NO_IWI -// #define IL_NO_JP2 -// #define IL_NO_JPG -// #define IL_NO_LCMS -// #define IL_NO_LIF -// #define IL_NO_MDL -// #define IL_NO_MNG -// #define IL_NO_PCD -// #define IL_NO_PCX -// #define IL_NO_PIC -// #define IL_NO_PIX -// #define IL_NO_PNG -// #define IL_NO_PNM -// #define IL_NO_PSD -// #define IL_NO_PSP -// #define IL_NO_PXR -// #define IL_NO_RAW -// #define IL_NO_ROT -// #define IL_NO_SGI -// #define IL_NO_SUN -// #define IL_NO_TGA -// #define IL_NO_TIF -// #define IL_NO_TPL -// #define IL_NO_WAL -// #define IL_NO_WDP -// #define IL_NO_XPM -#define IL_USE_JPEGLIB_UNMODIFIED 1 -//#define IL_USE_DXTC_NVIDIA -#define IL_USE_DXTC_SQUISH - -/* Supported api (ilut) */ - - -// -// sorry just -// can't get this one to work under windows -// have disabled for the now -// -// will look at it some more later -// -// Kriss -// -#undef ILUT_USE_ALLEGRO - -#undef ILUT_USE_DIRECTX8 -//#define ILUT_USE_DIRECTX9 -//#define ILUT_USE_DIRECTX10 -//#define ILUT_USE_OPENGL -//#define ILUT_USE_SDL -//#define ILUT_USE_WIN32 - - -/* Define to 1 if you have the header file. */ -//#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the header file. */ -//#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -//#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -//#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -//#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -//#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -//#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -//#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -//#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -//#define HAVE_UNISTD_H 1 - -/* Name of package */ -#define IL_PACKAGE "DevIL" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define IL_PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define IL_PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define IL_PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define IL_PACKAGE_VERSION "" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -//#define IL_VERSION "1.7.3" - -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* If using Mac OS X uncomment this line */ -/* #include "macconfig.h" */ - -/* Define to 1 if the X Window System is missing or not being used. */ -/* #undef X_DISPLAY_MISSING */ -#endif /* __CONFIG_H__ */ diff --git a/samples/DevIL/include/IL/config.h.win b/samples/DevIL/include/IL/config.h.win deleted file mode 100644 index 0090b9b51..000000000 --- a/samples/DevIL/include/IL/config.h.win +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef __CONFIG_H__ -#define __CONFIG_H__ - -#define IL_USE_PRAGMA_LIBS // Links to only the libraries that are requested. -#define IL_INLINE_ASM 1 // Define if you can support at least some ASM - -// Supported images formats (IL) - -// #define IL_NO_BLP -// #define IL_NO_BMP -// #define IL_NO_CUT -// #define IL_NO_CHEAD -// #define IL_NO_DCX -// #define IL_NO_DDS -// #define IL_NO_DICOM -// #define IL_NO_DOOM -// #define IL_NO_EXR -// #define IL_NO_FITS -// #define IL_NO_FTX -// #define IL_NO_GIF -// #define IL_NO_HDR -// #define IL_NO_ICO -// #define IL_NO_ICNS -// #define IL_NO_IWI -// #define IL_NO_JP2 -// #define IL_NO_JPG -// #define IL_NO_LCMS -// #define IL_NO_LIF -// #define IL_NO_MDL -// #define IL_NO_MNG -// #define IL_NO_PCD -// #define IL_NO_PCX -// #define IL_NO_PIC -// #define IL_NO_PIX -// #define IL_NO_PNG -// #define IL_NO_PNM -// #define IL_NO_PSD -// #define IL_NO_PSP -// #define IL_NO_PXR -// #define IL_NO_RAW -// #define IL_NO_ROT -// #define IL_NO_SGI -// #define IL_NO_SUN -// #define IL_NO_TGA -// #define IL_NO_TIF -// #define IL_NO_TPL -// #define IL_NO_WAL -// #define IL_NO_WDP -// #define IL_NO_XPM - -#define IL_USE_JPEGLIB_UNMODIFIED 1 -#define IL_USE_DXTC_NVIDIA -#define IL_USE_DXTC_SQUISH - -//#define IL_NO_GAMES - -/* Supported api (ilut) */ - - -// -// sorry just -// can't get this one to work under windows -// have disabled for the now -// -// will look at it some more later -// -// Kriss -// -#undef ILUT_USE_ALLEGRO - -#undef ILUT_USE_DIRECTX8 -#define ILUT_USE_DIRECTX9 -#define ILUT_USE_DIRECTX10 -#define ILUT_USE_OPENGL -#define ILUT_USE_SDL -#define ILUT_USE_WIN32 - - -#endif /* __CONFIG_H__ */ diff --git a/samples/DevIL/include/IL/devil_internal_exports.h b/samples/DevIL/include/IL/devil_internal_exports.h deleted file mode 100644 index 30b7aaab4..000000000 --- a/samples/DevIL/include/IL/devil_internal_exports.h +++ /dev/null @@ -1,161 +0,0 @@ -//----------------------------------------------------------------------------- -// -// ImageLib Sources -// Copyright (C) 2000-2009 by Denton Woods -// Last modified: 01/06/2009 -// -// Filename: IL/devil_internal_exports.h -// -// Description: Internal stuff for DevIL (IL, ILU and ILUT) -// -//----------------------------------------------------------------------------- - -#ifndef IL_EXPORTS_H -#define IL_EXPORTS_H - -#include "IL/il.h" - -#ifdef DEBUG - #include -#else - #define assert(x) -#endif - -//#ifndef NOINLINE -#ifndef INLINE -#if defined(__GNUC__) - #define INLINE extern inline -#elif defined(_MSC_VER) //@TODO: Get this working in MSVC++. - // http://www.greenend.org.uk/rjk/2003/03/inline.html - #define NOINLINE - //#define INLINE - /*#ifndef _WIN64 // Cannot use inline assembly in x64 target platform. - #define USE_WIN32_ASM - #endif//_WIN64*/ - #define INLINE __inline -#else - #define INLINE inline -#endif -#endif -//#else -//#define INLINE -//#endif //NOINLINE - -#ifdef __cplusplus -extern "C" { -#endif - -#define IL_MAX(a,b) (((a) > (b)) ? (a) : (b)) -#define IL_MIN(a,b) (((a) < (b)) ? (a) : (b)) - - -//! Basic Palette struct -typedef struct ILpal -{ - ILubyte* Palette; //!< the image palette (if any) - ILuint PalSize; //!< size of the palette (in bytes) - ILenum PalType; //!< the palette types in il.h (0x0500 range) -} ILpal; - - -//! The Fundamental Image structure -/*! Every bit of information about an image is stored in this internal structure.*/ -typedef struct ILimage -{ - ILuint Width; //!< the image's width - ILuint Height; //!< the image's height - ILuint Depth; //!< the image's depth - ILubyte Bpp; //!< bytes per pixel (now number of channels) - ILubyte Bpc; //!< bytes per channel - ILuint Bps; //!< bytes per scanline (components for IL) - ILubyte* Data; //!< the image data - ILuint SizeOfData; //!< the total size of the data (in bytes) - ILuint SizeOfPlane; //!< SizeOfData in a 2d image, size of each plane slice in a 3d image (in bytes) - ILenum Format; //!< image format (in IL enum style) - ILenum Type; //!< image type (in IL enum style) - ILenum Origin; //!< origin of the image - ILpal Pal; //!< palette details - ILuint Duration; //!< length of the time to display this "frame" - ILenum CubeFlags; //!< cube map flags for sides present in chain - struct ILimage* Mipmaps; //!< mipmapped versions of this image terminated by a NULL - usu. NULL - struct ILimage* Next; //!< next image in the chain - usu. NULL - struct ILimage* Faces; //!< next cubemap face in the chain - usu. NULL - struct ILimage* Layers; //!< subsequent layers in the chain - usu. NULL - ILuint* AnimList; //!< animation list - ILuint AnimSize; //!< animation list size - void* Profile; //!< colour profile - ILuint ProfileSize; //!< colour profile size - ILuint OffX; //!< x-offset of the image - ILuint OffY; //!< y-offset of the image - ILubyte* DxtcData; //!< compressed data - ILenum DxtcFormat; //!< compressed data format - ILuint DxtcSize; //!< compressed data size -} ILimage; - - -// Memory functions -ILAPI void* ILAPIENTRY ialloc(const ILsizei Size); -ILAPI void ILAPIENTRY ifree(const void *Ptr); -ILAPI void* ILAPIENTRY icalloc(const ILsizei Size, const ILsizei Num); -#ifdef ALTIVEC_GCC -ILAPI void* ILAPIENTRY ivec_align_buffer(void *buffer, const ILuint size); -#endif - -// Internal library functions in IL -ILAPI ILimage* ILAPIENTRY ilGetCurImage(void); -ILAPI void ILAPIENTRY ilSetCurImage(ILimage *Image); -ILAPI void ILAPIENTRY ilSetError(ILenum Error); -ILAPI void ILAPIENTRY ilSetPal(ILpal *Pal); - -// -// Utility functions -// -ILAPI ILubyte ILAPIENTRY ilGetBppFormat(ILenum Format); -ILAPI ILenum ILAPIENTRY ilGetFormatBpp(ILubyte Bpp); -ILAPI ILubyte ILAPIENTRY ilGetBpcType(ILenum Type); -ILAPI ILenum ILAPIENTRY ilGetTypeBpc(ILubyte Bpc); -ILAPI ILubyte ILAPIENTRY ilGetBppPal(ILenum PalType); -ILAPI ILenum ILAPIENTRY ilGetPalBaseType(ILenum PalType); -ILAPI ILuint ILAPIENTRY ilNextPower2(ILuint Num); -ILAPI ILenum ILAPIENTRY ilTypeFromExt(ILconst_string FileName); -ILAPI void ILAPIENTRY ilReplaceCurImage(ILimage *Image); -ILAPI void ILAPIENTRY iMemSwap(ILubyte *, ILubyte *, const ILuint); - -// -// Image functions -// -ILAPI void ILAPIENTRY iBindImageTemp (void); -ILAPI ILboolean ILAPIENTRY ilClearImage_ (ILimage *Image); -ILAPI void ILAPIENTRY ilCloseImage (ILimage *Image); -ILAPI void ILAPIENTRY ilClosePal (ILpal *Palette); -ILAPI ILpal* ILAPIENTRY iCopyPal (void); -ILAPI ILboolean ILAPIENTRY ilCopyImageAttr (ILimage *Dest, ILimage *Src); -ILAPI ILimage* ILAPIENTRY ilCopyImage_ (ILimage *Src); -ILAPI void ILAPIENTRY ilGetClear (void *Colours, ILenum Format, ILenum Type); -ILAPI ILuint ILAPIENTRY ilGetCurName (void); -ILAPI ILboolean ILAPIENTRY ilIsValidPal (ILpal *Palette); -ILAPI ILimage* ILAPIENTRY ilNewImage (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc); -ILAPI ILimage* ILAPIENTRY ilNewImageFull (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data); -ILAPI ILboolean ILAPIENTRY ilInitImage (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data); -ILAPI ILboolean ILAPIENTRY ilResizeImage (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc); -ILAPI ILboolean ILAPIENTRY ilTexImage_ (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data); -ILAPI ILboolean ILAPIENTRY ilTexSubImage_ (ILimage *Image, void *Data); -ILAPI void* ILAPIENTRY ilConvertBuffer (ILuint SizeOfData, ILenum SrcFormat, ILenum DestFormat, ILenum SrcType, ILenum DestType, ILpal *SrcPal, void *Buffer); -ILAPI ILimage* ILAPIENTRY iConvertImage (ILimage *Image, ILenum DestFormat, ILenum DestType); -ILAPI ILpal* ILAPIENTRY iConvertPal (ILpal *Pal, ILenum DestFormat); -ILAPI ILubyte* ILAPIENTRY iGetFlipped (ILimage *Image); -ILAPI ILboolean ILAPIENTRY iMirror(); -ILAPI void ILAPIENTRY iFlipBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num); -ILubyte* iFlipNewBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num); -ILAPI void ILAPIENTRY iGetIntegervImage(ILimage *Image, ILenum Mode, ILint *Param); - -// Internal library functions in ILU -ILAPI ILimage* ILAPIENTRY iluRotate_(ILimage *Image, ILfloat Angle); -ILAPI ILimage* ILAPIENTRY iluRotate3D_(ILimage *Image, ILfloat x, ILfloat y, ILfloat z, ILfloat Angle); -ILAPI ILimage* ILAPIENTRY iluScale_(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth); - -#ifdef __cplusplus -} -#endif - -#endif//IL_EXPORTS_H diff --git a/samples/DevIL/include/IL/il.h b/samples/DevIL/include/IL/il.h deleted file mode 100644 index 540a56eb3..000000000 --- a/samples/DevIL/include/IL/il.h +++ /dev/null @@ -1,644 +0,0 @@ -//----------------------------------------------------------------------------- -// -// ImageLib Sources -// Copyright (C) 2000-2009 by Denton Woods -// Last modified: 03/07/2009 -// -// Filename: IL/il.h -// -// Description: The main include file for DevIL -// -//----------------------------------------------------------------------------- - -// Doxygen comment -/*! \file il.h - The main include file for DevIL -*/ - -#ifndef __il_h_ -#ifndef __IL_H__ - -#define __il_h_ -#define __IL_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -//this define controls if floats and doubles are clampled to [0..1] -//during conversion. It takes a little more time, but it is the correct -//way of doing this. If you are sure your floats are always valid, -//you can undefine this value... -#define CLAMP_HALF 1 -#define CLAMP_FLOATS 1 -#define CLAMP_DOUBLES 1 - -/*#ifdef _WIN32_WCE - #define IL_NO_EXR - #define IL_NO_GIF - #define IL_NO_JP2 - #define IL_NO_JPG - #define IL_NO_MNG - #define IL_NO_PNG - #define IL_NO_TIF - #define IL_NO_LCMS -#endif //_WIN32_WCE - -#ifdef DJGPP - #define IL_NO_EXR - #define IL_NO_GIF - #define IL_NO_JP2 - #define IL_NO_JPG - #define IL_NO_MNG - #define IL_NO_PNG - #define IL_NO_TIF - #define IL_NO_LCMS -#endif //DJGPP*/ - -#ifdef _WIN32 - #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY)) - #if defined(_MSC_VER) || defined(__BORLANDC__) - #pragma comment(lib, "DevIL.lib") - #endif - #endif -#endif - -#ifdef RESTRICT_KEYWORD -#define RESTRICT restrict -#define CONST_RESTRICT const restrict -#else -#define RESTRICT -#define CONST_RESTRICT const -#endif - -#include - -typedef unsigned int ILenum; -typedef unsigned char ILboolean; -typedef unsigned int ILbitfield; -typedef signed char ILbyte; -typedef signed short ILshort; -typedef int ILint; -typedef size_t ILsizei; -typedef unsigned char ILubyte; -typedef unsigned short ILushort; -typedef unsigned int ILuint; -typedef float ILfloat; -typedef float ILclampf; -typedef double ILdouble; -typedef double ILclampd; - -#ifdef _MSC_VER -typedef __int64 ILint64; -typedef unsigned __int64 ILuint64; -#else -typedef long long int ILint64; -typedef long long unsigned int ILuint64; -#endif - - -#include -#ifdef _UNICODE - #ifndef _WIN32_WCE - #include - #endif - //if we use a define instead of a typedef, - //ILconst_string works as intended - #define ILchar wchar_t - #define ILstring wchar_t* - #define ILconst_string wchar_t const * -#else - //if we use a define instead of a typedef, - //ILconst_string works as intended - #define ILchar char - #define ILstring char* - #define ILconst_string char const * -#endif //_UNICODE - -#define IL_FALSE 0 -#define IL_TRUE 1 - -// Matches OpenGL's right now. -//! Data formats \link Formats Formats\endlink -#define IL_COLOUR_INDEX 0x1900 -#define IL_COLOR_INDEX 0x1900 -#define IL_ALPHA 0x1906 -#define IL_RGB 0x1907 -#define IL_RGBA 0x1908 -#define IL_BGR 0x80E0 -#define IL_BGRA 0x80E1 -#define IL_LUMINANCE 0x1909 -#define IL_LUMINANCE_ALPHA 0x190A - -//! Data types \link Types Types\endlink -#define IL_BYTE 0x1400 -#define IL_UNSIGNED_BYTE 0x1401 -#define IL_SHORT 0x1402 -#define IL_UNSIGNED_SHORT 0x1403 -#define IL_INT 0x1404 -#define IL_UNSIGNED_INT 0x1405 -#define IL_FLOAT 0x1406 -#define IL_DOUBLE 0x140A -#define IL_HALF 0x140B - - -#define IL_MAX_BYTE SCHAR_MAX -#define IL_MAX_UNSIGNED_BYTE UCHAR_MAX -#define IL_MAX_SHORT SHRT_MAX -#define IL_MAX_UNSIGNED_SHORT USHRT_MAX -#define IL_MAX_INT INT_MAX -#define IL_MAX_UNSIGNED_INT UINT_MAX - -#define IL_LIMIT(x,m,M) (xM?M:x)) -#define IL_CLAMP(x) IL_LIMIT(x,0,1) - -#define IL_VENDOR 0x1F00 -#define IL_LOAD_EXT 0x1F01 -#define IL_SAVE_EXT 0x1F02 - - -// -// IL-specific #define's -// - -#define IL_VERSION_1_7_8 1 -#define IL_VERSION 178 - - -// Attribute Bits -#define IL_ORIGIN_BIT 0x00000001 -#define IL_FILE_BIT 0x00000002 -#define IL_PAL_BIT 0x00000004 -#define IL_FORMAT_BIT 0x00000008 -#define IL_TYPE_BIT 0x00000010 -#define IL_COMPRESS_BIT 0x00000020 -#define IL_LOADFAIL_BIT 0x00000040 -#define IL_FORMAT_SPECIFIC_BIT 0x00000080 -#define IL_ALL_ATTRIB_BITS 0x000FFFFF - - -// Palette types -#define IL_PAL_NONE 0x0400 -#define IL_PAL_RGB24 0x0401 -#define IL_PAL_RGB32 0x0402 -#define IL_PAL_RGBA32 0x0403 -#define IL_PAL_BGR24 0x0404 -#define IL_PAL_BGR32 0x0405 -#define IL_PAL_BGRA32 0x0406 - - -// Image types -#define IL_TYPE_UNKNOWN 0x0000 -#define IL_BMP 0x0420 //!< Microsoft Windows Bitmap - .bmp extension -#define IL_CUT 0x0421 //!< Dr. Halo - .cut extension -#define IL_DOOM 0x0422 //!< DooM walls - no specific extension -#define IL_DOOM_FLAT 0x0423 //!< DooM flats - no specific extension -#define IL_ICO 0x0424 //!< Microsoft Windows Icons and Cursors - .ico and .cur extensions -#define IL_JPG 0x0425 //!< JPEG - .jpg, .jpe and .jpeg extensions -#define IL_JFIF 0x0425 //!< -#define IL_ILBM 0x0426 //!< Amiga IFF (FORM ILBM) - .iff, .ilbm, .lbm extensions -#define IL_PCD 0x0427 //!< Kodak PhotoCD - .pcd extension -#define IL_PCX 0x0428 //!< ZSoft PCX - .pcx extension -#define IL_PIC 0x0429 //!< PIC - .pic extension -#define IL_PNG 0x042A //!< Portable Network Graphics - .png extension -#define IL_PNM 0x042B //!< Portable Any Map - .pbm, .pgm, .ppm and .pnm extensions -#define IL_SGI 0x042C //!< Silicon Graphics - .sgi, .bw, .rgb and .rgba extensions -#define IL_TGA 0x042D //!< TrueVision Targa File - .tga, .vda, .icb and .vst extensions -#define IL_TIF 0x042E //!< Tagged Image File Format - .tif and .tiff extensions -#define IL_CHEAD 0x042F //!< C-Style Header - .h extension -#define IL_RAW 0x0430 //!< Raw Image Data - any extension -#define IL_MDL 0x0431 //!< Half-Life Model Texture - .mdl extension -#define IL_WAL 0x0432 //!< Quake 2 Texture - .wal extension -#define IL_LIF 0x0434 //!< Homeworld Texture - .lif extension -#define IL_MNG 0x0435 //!< Multiple-image Network Graphics - .mng extension -#define IL_JNG 0x0435 //!< -#define IL_GIF 0x0436 //!< Graphics Interchange Format - .gif extension -#define IL_DDS 0x0437 //!< DirectDraw Surface - .dds extension -#define IL_DCX 0x0438 //!< ZSoft Multi-PCX - .dcx extension -#define IL_PSD 0x0439 //!< Adobe PhotoShop - .psd extension -#define IL_EXIF 0x043A //!< -#define IL_PSP 0x043B //!< PaintShop Pro - .psp extension -#define IL_PIX 0x043C //!< PIX - .pix extension -#define IL_PXR 0x043D //!< Pixar - .pxr extension -#define IL_XPM 0x043E //!< X Pixel Map - .xpm extension -#define IL_HDR 0x043F //!< Radiance High Dynamic Range - .hdr extension -#define IL_ICNS 0x0440 //!< Macintosh Icon - .icns extension -#define IL_JP2 0x0441 //!< Jpeg 2000 - .jp2 extension -#define IL_EXR 0x0442 //!< OpenEXR - .exr extension -#define IL_WDP 0x0443 //!< Microsoft HD Photo - .wdp and .hdp extension -#define IL_VTF 0x0444 //!< Valve Texture Format - .vtf extension -#define IL_WBMP 0x0445 //!< Wireless Bitmap - .wbmp extension -#define IL_SUN 0x0446 //!< Sun Raster - .sun, .ras, .rs, .im1, .im8, .im24 and .im32 extensions -#define IL_IFF 0x0447 //!< Interchange File Format - .iff extension -#define IL_TPL 0x0448 //!< Gamecube Texture - .tpl extension -#define IL_FITS 0x0449 //!< Flexible Image Transport System - .fit and .fits extensions -#define IL_DICOM 0x044A //!< Digital Imaging and Communications in Medicine (DICOM) - .dcm and .dicom extensions -#define IL_IWI 0x044B //!< Call of Duty Infinity Ward Image - .iwi extension -#define IL_BLP 0x044C //!< Blizzard Texture Format - .blp extension -#define IL_FTX 0x044D //!< Heavy Metal: FAKK2 Texture - .ftx extension -#define IL_ROT 0x044E //!< Homeworld 2 - Relic Texture - .rot extension -#define IL_TEXTURE 0x044F //!< Medieval II: Total War Texture - .texture extension -#define IL_DPX 0x0450 //!< Digital Picture Exchange - .dpx extension -#define IL_UTX 0x0451 //!< Unreal (and Unreal Tournament) Texture - .utx extension -#define IL_MP3 0x0452 //!< MPEG-1 Audio Layer 3 - .mp3 extension - - -#define IL_JASC_PAL 0x0475 //!< PaintShop Pro Palette - - -// Error Types -#define IL_NO_ERROR 0x0000 -#define IL_INVALID_ENUM 0x0501 -#define IL_OUT_OF_MEMORY 0x0502 -#define IL_FORMAT_NOT_SUPPORTED 0x0503 -#define IL_INTERNAL_ERROR 0x0504 -#define IL_INVALID_VALUE 0x0505 -#define IL_ILLEGAL_OPERATION 0x0506 -#define IL_ILLEGAL_FILE_VALUE 0x0507 -#define IL_INVALID_FILE_HEADER 0x0508 -#define IL_INVALID_PARAM 0x0509 -#define IL_COULD_NOT_OPEN_FILE 0x050A -#define IL_INVALID_EXTENSION 0x050B -#define IL_FILE_ALREADY_EXISTS 0x050C -#define IL_OUT_FORMAT_SAME 0x050D -#define IL_STACK_OVERFLOW 0x050E -#define IL_STACK_UNDERFLOW 0x050F -#define IL_INVALID_CONVERSION 0x0510 -#define IL_BAD_DIMENSIONS 0x0511 -#define IL_FILE_READ_ERROR 0x0512 // 05/12/2002: Addition by Sam. -#define IL_FILE_WRITE_ERROR 0x0512 - -#define IL_LIB_GIF_ERROR 0x05E1 -#define IL_LIB_JPEG_ERROR 0x05E2 -#define IL_LIB_PNG_ERROR 0x05E3 -#define IL_LIB_TIFF_ERROR 0x05E4 -#define IL_LIB_MNG_ERROR 0x05E5 -#define IL_LIB_JP2_ERROR 0x05E6 -#define IL_LIB_EXR_ERROR 0x05E7 -#define IL_UNKNOWN_ERROR 0x05FF - - -// Origin Definitions -#define IL_ORIGIN_SET 0x0600 -#define IL_ORIGIN_LOWER_LEFT 0x0601 -#define IL_ORIGIN_UPPER_LEFT 0x0602 -#define IL_ORIGIN_MODE 0x0603 - - -// Format and Type Mode Definitions -#define IL_FORMAT_SET 0x0610 -#define IL_FORMAT_MODE 0x0611 -#define IL_TYPE_SET 0x0612 -#define IL_TYPE_MODE 0x0613 - - -// File definitions -#define IL_FILE_OVERWRITE 0x0620 -#define IL_FILE_MODE 0x0621 - - -// Palette definitions -#define IL_CONV_PAL 0x0630 - - -// Load fail definitions -#define IL_DEFAULT_ON_FAIL 0x0632 - - -// Key colour and alpha definitions -#define IL_USE_KEY_COLOUR 0x0635 -#define IL_USE_KEY_COLOR 0x0635 -#define IL_BLIT_BLEND 0x0636 - - -// Interlace definitions -#define IL_SAVE_INTERLACED 0x0639 -#define IL_INTERLACE_MODE 0x063A - - -// Quantization definitions -#define IL_QUANTIZATION_MODE 0x0640 -#define IL_WU_QUANT 0x0641 -#define IL_NEU_QUANT 0x0642 -#define IL_NEU_QUANT_SAMPLE 0x0643 -#define IL_MAX_QUANT_INDEXS 0x0644 //XIX : ILint : Maximum number of colors to reduce to, default of 256. and has a range of 2-256 -#define IL_MAX_QUANT_INDICES 0x0644 // Redefined, since the above #define is misspelled - - -// Hints -#define IL_FASTEST 0x0660 -#define IL_LESS_MEM 0x0661 -#define IL_DONT_CARE 0x0662 -#define IL_MEM_SPEED_HINT 0x0665 -#define IL_USE_COMPRESSION 0x0666 -#define IL_NO_COMPRESSION 0x0667 -#define IL_COMPRESSION_HINT 0x0668 - - -// Compression -#define IL_NVIDIA_COMPRESS 0x0670 -#define IL_SQUISH_COMPRESS 0x0671 - - -// Subimage types -#define IL_SUB_NEXT 0x0680 -#define IL_SUB_MIPMAP 0x0681 -#define IL_SUB_LAYER 0x0682 - - -// Compression definitions -#define IL_COMPRESS_MODE 0x0700 -#define IL_COMPRESS_NONE 0x0701 -#define IL_COMPRESS_RLE 0x0702 -#define IL_COMPRESS_LZO 0x0703 -#define IL_COMPRESS_ZLIB 0x0704 - - -// File format-specific values -#define IL_TGA_CREATE_STAMP 0x0710 -#define IL_JPG_QUALITY 0x0711 -#define IL_PNG_INTERLACE 0x0712 -#define IL_TGA_RLE 0x0713 -#define IL_BMP_RLE 0x0714 -#define IL_SGI_RLE 0x0715 -#define IL_TGA_ID_STRING 0x0717 -#define IL_TGA_AUTHNAME_STRING 0x0718 -#define IL_TGA_AUTHCOMMENT_STRING 0x0719 -#define IL_PNG_AUTHNAME_STRING 0x071A -#define IL_PNG_TITLE_STRING 0x071B -#define IL_PNG_DESCRIPTION_STRING 0x071C -#define IL_TIF_DESCRIPTION_STRING 0x071D -#define IL_TIF_HOSTCOMPUTER_STRING 0x071E -#define IL_TIF_DOCUMENTNAME_STRING 0x071F -#define IL_TIF_AUTHNAME_STRING 0x0720 -#define IL_JPG_SAVE_FORMAT 0x0721 -#define IL_CHEAD_HEADER_STRING 0x0722 -#define IL_PCD_PICNUM 0x0723 -#define IL_PNG_ALPHA_INDEX 0x0724 //XIX : ILint : the color in the palette at this index value (0-255) is considered transparent, -1 for no trasparent color -#define IL_JPG_PROGRESSIVE 0x0725 -#define IL_VTF_COMP 0x0726 - - -// DXTC definitions -#define IL_DXTC_FORMAT 0x0705 -#define IL_DXT1 0x0706 -#define IL_DXT2 0x0707 -#define IL_DXT3 0x0708 -#define IL_DXT4 0x0709 -#define IL_DXT5 0x070A -#define IL_DXT_NO_COMP 0x070B -#define IL_KEEP_DXTC_DATA 0x070C -#define IL_DXTC_DATA_FORMAT 0x070D -#define IL_3DC 0x070E -#define IL_RXGB 0x070F -#define IL_ATI1N 0x0710 -#define IL_DXT1A 0x0711 // Normally the same as IL_DXT1, except for nVidia Texture Tools. - -// Environment map definitions -#define IL_CUBEMAP_POSITIVEX 0x00000400 -#define IL_CUBEMAP_NEGATIVEX 0x00000800 -#define IL_CUBEMAP_POSITIVEY 0x00001000 -#define IL_CUBEMAP_NEGATIVEY 0x00002000 -#define IL_CUBEMAP_POSITIVEZ 0x00004000 -#define IL_CUBEMAP_NEGATIVEZ 0x00008000 -#define IL_SPHEREMAP 0x00010000 - - -// Values -#define IL_VERSION_NUM 0x0DE2 -#define IL_IMAGE_WIDTH 0x0DE4 -#define IL_IMAGE_HEIGHT 0x0DE5 -#define IL_IMAGE_DEPTH 0x0DE6 -#define IL_IMAGE_SIZE_OF_DATA 0x0DE7 -#define IL_IMAGE_BPP 0x0DE8 -#define IL_IMAGE_BYTES_PER_PIXEL 0x0DE8 -#define IL_IMAGE_BPP 0x0DE8 -#define IL_IMAGE_BITS_PER_PIXEL 0x0DE9 -#define IL_IMAGE_FORMAT 0x0DEA -#define IL_IMAGE_TYPE 0x0DEB -#define IL_PALETTE_TYPE 0x0DEC -#define IL_PALETTE_SIZE 0x0DED -#define IL_PALETTE_BPP 0x0DEE -#define IL_PALETTE_NUM_COLS 0x0DEF -#define IL_PALETTE_BASE_TYPE 0x0DF0 -#define IL_NUM_FACES 0x0DE1 -#define IL_NUM_IMAGES 0x0DF1 -#define IL_NUM_MIPMAPS 0x0DF2 -#define IL_NUM_LAYERS 0x0DF3 -#define IL_ACTIVE_IMAGE 0x0DF4 -#define IL_ACTIVE_MIPMAP 0x0DF5 -#define IL_ACTIVE_LAYER 0x0DF6 -#define IL_ACTIVE_FACE 0x0E00 -#define IL_CUR_IMAGE 0x0DF7 -#define IL_IMAGE_DURATION 0x0DF8 -#define IL_IMAGE_PLANESIZE 0x0DF9 -#define IL_IMAGE_BPC 0x0DFA -#define IL_IMAGE_OFFX 0x0DFB -#define IL_IMAGE_OFFY 0x0DFC -#define IL_IMAGE_CUBEFLAGS 0x0DFD -#define IL_IMAGE_ORIGIN 0x0DFE -#define IL_IMAGE_CHANNELS 0x0DFF - -# if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)) -// __attribute__((deprecated)) is supported by GCC 3.1 and later. -# define DEPRECATED(D) D __attribute__((deprecated)) -# elif defined _MSC_VER && _MSC_VER >= 1300 -// __declspec(deprecated) is supported by MSVC 7.0 and later. -# define DEPRECATED(D) __declspec(deprecated) D -# else -# define DEPRECATED (D) D -# endif - -// -// Section shamelessly modified from the glut header. -// - -// This is from Win32's -#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__) - #define ILAPIENTRY __stdcall - #define IL_PACKSTRUCT -//#elif defined(linux) || defined(MACOSX) || defined(__CYGWIN__) //fix bug 840364 -#elif defined( __GNUC__ ) - // this should work for any of the above commented platforms - // plus any platform using GCC - #ifdef __MINGW32__ - #define ILAPIENTRY __stdcall - #else - #define ILAPIENTRY - #endif - #define IL_PACKSTRUCT __attribute__ ((packed)) -#else - #define ILAPIENTRY - #define IL_PACKSTRUCT -#endif - -// This is from Win32's and -#if defined(__LCC__) - #define ILAPI __stdcall -#elif defined(_WIN32) //changed 20031221 to fix bug 840421 - #ifdef IL_STATIC_LIB - #define ILAPI - #else - #ifdef _IL_BUILD_LIBRARY - #define ILAPI __declspec(dllexport) - #else - #define ILAPI __declspec(dllimport) - #endif - #endif -#elif __APPLE__ - #define ILAPI extern -#else - #define ILAPI -#endif - - -#define IL_SEEK_SET 0 -#define IL_SEEK_CUR 1 -#define IL_SEEK_END 2 -#define IL_EOF -1 - - -// Callback functions for file reading -typedef void* ILHANDLE; -typedef void (ILAPIENTRY *fCloseRProc)(ILHANDLE); -typedef ILboolean (ILAPIENTRY *fEofProc) (ILHANDLE); -typedef ILint (ILAPIENTRY *fGetcProc) (ILHANDLE); -typedef ILHANDLE (ILAPIENTRY *fOpenRProc) (ILconst_string); -typedef ILint (ILAPIENTRY *fReadProc) (void*, ILuint, ILuint, ILHANDLE); -typedef ILint (ILAPIENTRY *fSeekRProc) (ILHANDLE, ILint, ILint); -typedef ILint (ILAPIENTRY *fTellRProc) (ILHANDLE); - -// Callback functions for file writing -typedef void (ILAPIENTRY *fCloseWProc)(ILHANDLE); -typedef ILHANDLE (ILAPIENTRY *fOpenWProc) (ILconst_string); -typedef ILint (ILAPIENTRY *fPutcProc) (ILubyte, ILHANDLE); -typedef ILint (ILAPIENTRY *fSeekWProc) (ILHANDLE, ILint, ILint); -typedef ILint (ILAPIENTRY *fTellWProc) (ILHANDLE); -typedef ILint (ILAPIENTRY *fWriteProc) (const void*, ILuint, ILuint, ILHANDLE); - -// Callback functions for allocation and deallocation -typedef void* (ILAPIENTRY *mAlloc)(const ILsizei); -typedef void (ILAPIENTRY *mFree) (const void* CONST_RESTRICT); - -// Registered format procedures -typedef ILenum (ILAPIENTRY *IL_LOADPROC)(ILconst_string); -typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(ILconst_string); - - -// ImageLib Functions -ILAPI ILboolean ILAPIENTRY ilActiveFace(ILuint Number); -ILAPI ILboolean ILAPIENTRY ilActiveImage(ILuint Number); -ILAPI ILboolean ILAPIENTRY ilActiveLayer(ILuint Number); -ILAPI ILboolean ILAPIENTRY ilActiveMipmap(ILuint Number); -ILAPI ILboolean ILAPIENTRY ilApplyPal(ILconst_string FileName); -ILAPI ILboolean ILAPIENTRY ilApplyProfile(ILstring InProfile, ILstring OutProfile); -ILAPI void ILAPIENTRY ilBindImage(ILuint Image); -ILAPI ILboolean ILAPIENTRY ilBlit(ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth); -ILAPI ILboolean ILAPIENTRY ilClampNTSC(void); -ILAPI void ILAPIENTRY ilClearColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha); -ILAPI ILboolean ILAPIENTRY ilClearImage(void); -ILAPI ILuint ILAPIENTRY ilCloneCurImage(void); -ILAPI ILubyte* ILAPIENTRY ilCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DXTCFormat, ILuint *DXTCSize); -ILAPI ILboolean ILAPIENTRY ilCompressFunc(ILenum Mode); -ILAPI ILboolean ILAPIENTRY ilConvertImage(ILenum DestFormat, ILenum DestType); -ILAPI ILboolean ILAPIENTRY ilConvertPal(ILenum DestFormat); -ILAPI ILboolean ILAPIENTRY ilCopyImage(ILuint Src); -ILAPI ILuint ILAPIENTRY ilCopyPixels(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data); -ILAPI ILuint ILAPIENTRY ilCreateSubImage(ILenum Type, ILuint Num); -ILAPI ILboolean ILAPIENTRY ilDefaultImage(void); -ILAPI void ILAPIENTRY ilDeleteImage(const ILuint Num); -ILAPI void ILAPIENTRY ilDeleteImages(ILsizei Num, const ILuint *Images); -ILAPI ILenum ILAPIENTRY ilDetermineType(ILconst_string FileName); -ILAPI ILenum ILAPIENTRY ilDetermineTypeF(ILHANDLE File); -ILAPI ILenum ILAPIENTRY ilDetermineTypeL(const void *Lump, ILuint Size); -ILAPI ILboolean ILAPIENTRY ilDisable(ILenum Mode); -ILAPI ILboolean ILAPIENTRY ilDxtcDataToImage(void); -ILAPI ILboolean ILAPIENTRY ilDxtcDataToSurface(void); -ILAPI ILboolean ILAPIENTRY ilEnable(ILenum Mode); -ILAPI void ILAPIENTRY ilFlipSurfaceDxtcData(void); -ILAPI ILboolean ILAPIENTRY ilFormatFunc(ILenum Mode); -ILAPI void ILAPIENTRY ilGenImages(ILsizei Num, ILuint *Images); -ILAPI ILuint ILAPIENTRY ilGenImage(void); -ILAPI ILubyte* ILAPIENTRY ilGetAlpha(ILenum Type); -ILAPI ILboolean ILAPIENTRY ilGetBoolean(ILenum Mode); -ILAPI void ILAPIENTRY ilGetBooleanv(ILenum Mode, ILboolean *Param); -ILAPI ILubyte* ILAPIENTRY ilGetData(void); -ILAPI ILuint ILAPIENTRY ilGetDXTCData(void *Buffer, ILuint BufferSize, ILenum DXTCFormat); -ILAPI ILenum ILAPIENTRY ilGetError(void); -ILAPI ILint ILAPIENTRY ilGetInteger(ILenum Mode); -ILAPI void ILAPIENTRY ilGetIntegerv(ILenum Mode, ILint *Param); -ILAPI ILuint ILAPIENTRY ilGetLumpPos(void); -ILAPI ILubyte* ILAPIENTRY ilGetPalette(void); -ILAPI ILconst_string ILAPIENTRY ilGetString(ILenum StringName); -ILAPI void ILAPIENTRY ilHint(ILenum Target, ILenum Mode); -ILAPI ILboolean ILAPIENTRY ilInvertSurfaceDxtcDataAlpha(void); -ILAPI void ILAPIENTRY ilInit(void); -ILAPI ILboolean ILAPIENTRY ilImageToDxtcData(ILenum Format); -ILAPI ILboolean ILAPIENTRY ilIsDisabled(ILenum Mode); -ILAPI ILboolean ILAPIENTRY ilIsEnabled(ILenum Mode); -ILAPI ILboolean ILAPIENTRY ilIsImage(ILuint Image); -ILAPI ILboolean ILAPIENTRY ilIsValid(ILenum Type, ILconst_string FileName); -ILAPI ILboolean ILAPIENTRY ilIsValidF(ILenum Type, ILHANDLE File); -ILAPI ILboolean ILAPIENTRY ilIsValidL(ILenum Type, void *Lump, ILuint Size); -ILAPI void ILAPIENTRY ilKeyColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha); -ILAPI ILboolean ILAPIENTRY ilLoad(ILenum Type, ILconst_string FileName); -ILAPI ILboolean ILAPIENTRY ilLoadF(ILenum Type, ILHANDLE File); -ILAPI ILboolean ILAPIENTRY ilLoadImage(ILconst_string FileName); -ILAPI ILboolean ILAPIENTRY ilLoadL(ILenum Type, const void *Lump, ILuint Size); -ILAPI ILboolean ILAPIENTRY ilLoadPal(ILconst_string FileName); -ILAPI void ILAPIENTRY ilModAlpha(ILdouble AlphaValue); -ILAPI ILboolean ILAPIENTRY ilOriginFunc(ILenum Mode); -ILAPI ILboolean ILAPIENTRY ilOverlayImage(ILuint Source, ILint XCoord, ILint YCoord, ILint ZCoord); -ILAPI void ILAPIENTRY ilPopAttrib(void); -ILAPI void ILAPIENTRY ilPushAttrib(ILuint Bits); -ILAPI void ILAPIENTRY ilRegisterFormat(ILenum Format); -ILAPI ILboolean ILAPIENTRY ilRegisterLoad(ILconst_string Ext, IL_LOADPROC Load); -ILAPI ILboolean ILAPIENTRY ilRegisterMipNum(ILuint Num); -ILAPI ILboolean ILAPIENTRY ilRegisterNumFaces(ILuint Num); -ILAPI ILboolean ILAPIENTRY ilRegisterNumImages(ILuint Num); -ILAPI void ILAPIENTRY ilRegisterOrigin(ILenum Origin); -ILAPI void ILAPIENTRY ilRegisterPal(void *Pal, ILuint Size, ILenum Type); -ILAPI ILboolean ILAPIENTRY ilRegisterSave(ILconst_string Ext, IL_SAVEPROC Save); -ILAPI void ILAPIENTRY ilRegisterType(ILenum Type); -ILAPI ILboolean ILAPIENTRY ilRemoveLoad(ILconst_string Ext); -ILAPI ILboolean ILAPIENTRY ilRemoveSave(ILconst_string Ext); -ILAPI void ILAPIENTRY ilResetMemory(void); // Deprecated -ILAPI void ILAPIENTRY ilResetRead(void); -ILAPI void ILAPIENTRY ilResetWrite(void); -ILAPI ILboolean ILAPIENTRY ilSave(ILenum Type, ILconst_string FileName); -ILAPI ILuint ILAPIENTRY ilSaveF(ILenum Type, ILHANDLE File); -ILAPI ILboolean ILAPIENTRY ilSaveImage(ILconst_string FileName); -ILAPI ILuint ILAPIENTRY ilSaveL(ILenum Type, void *Lump, ILuint Size); -ILAPI ILboolean ILAPIENTRY ilSavePal(ILconst_string FileName); -ILAPI ILboolean ILAPIENTRY ilSetAlpha(ILdouble AlphaValue); -ILAPI ILboolean ILAPIENTRY ilSetData(void *Data); -ILAPI ILboolean ILAPIENTRY ilSetDuration(ILuint Duration); -ILAPI void ILAPIENTRY ilSetInteger(ILenum Mode, ILint Param); -ILAPI void ILAPIENTRY ilSetMemory(mAlloc, mFree); -ILAPI void ILAPIENTRY ilSetPixels(ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data); -ILAPI void ILAPIENTRY ilSetRead(fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc); -ILAPI void ILAPIENTRY ilSetString(ILenum Mode, const char *String); -ILAPI void ILAPIENTRY ilSetWrite(fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc); -ILAPI void ILAPIENTRY ilShutDown(void); -ILAPI ILboolean ILAPIENTRY ilSurfaceToDxtcData(ILenum Format); -ILAPI ILboolean ILAPIENTRY ilTexImage(ILuint Width, ILuint Height, ILuint Depth, ILubyte NumChannels, ILenum Format, ILenum Type, void *Data); -ILAPI ILboolean ILAPIENTRY ilTexImageDxtc(ILint w, ILint h, ILint d, ILenum DxtFormat, const ILubyte* data); -ILAPI ILenum ILAPIENTRY ilTypeFromExt(ILconst_string FileName); -ILAPI ILboolean ILAPIENTRY ilTypeFunc(ILenum Mode); -ILAPI ILboolean ILAPIENTRY ilLoadData(ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp); -ILAPI ILboolean ILAPIENTRY ilLoadDataF(ILHANDLE File, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp); -ILAPI ILboolean ILAPIENTRY ilLoadDataL(void *Lump, ILuint Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp); -ILAPI ILboolean ILAPIENTRY ilSaveData(ILconst_string FileName); - -// For all those weirdos that spell "colour" without the 'u'. -#define ilClearColor ilClearColour -#define ilKeyColor ilKeyColour - -#define imemclear(x,y) memset(x,0,y); - -#ifdef __cplusplus -} -#endif - -#endif // __IL_H__ -#endif // __il_h__ diff --git a/samples/DevIL/include/IL/il_wrap.h b/samples/DevIL/include/IL/il_wrap.h deleted file mode 100644 index 5cf9b0e0a..000000000 --- a/samples/DevIL/include/IL/il_wrap.h +++ /dev/null @@ -1,205 +0,0 @@ -#ifndef WRAPPER_H -#define WRAPPER_H - -/*#include -#include */ -#include // Probably only have to #include this one - -#ifdef _MSC_VER - #ifndef _IL_WRAP_BUILD_LIB - #pragma comment(lib, "il_wrap.lib") - #endif -#endif - -class ilImage -{ -public: - ilImage(); - ilImage(char *); - ilImage(const ilImage &); - virtual ~ilImage(); - - ILboolean Load(char *); - ILboolean Load(char *, ILenum); - ILboolean Save(char *); - ILboolean Save(char *, ILenum); - - - // ImageLib functions - ILboolean ActiveImage(ILuint); - ILboolean ActiveLayer(ILuint); - ILboolean ActiveMipmap(ILuint); - ILboolean Clear(void); - ILvoid ClearColour(ILclampf, ILclampf, ILclampf, ILclampf); - ILboolean Convert(ILenum); - ILboolean Copy(ILuint); - ILboolean Default(void); - ILboolean Flip(void); - ILboolean SwapColours(void); - ILboolean Resize(ILuint, ILuint, ILuint); - ILboolean TexImage(ILuint, ILuint, ILuint, ILubyte, ILenum, ILenum, ILvoid*); - - - // Image handling - ILvoid Bind(void) const; - ILvoid Bind(ILuint); - ILvoid Close(void) { this->Delete(); } - ILvoid Delete(void); - ILvoid iGenBind(); - ILenum PaletteAlphaIndex(); - - // Image characteristics - ILuint Width(void); - ILuint Height(void); - ILuint Depth(void); - ILubyte Bpp(void); - ILubyte Bitpp(void); - ILenum PaletteType(void); - ILenum Format(void); - ILenum Type(void); - ILuint NumImages(void); - ILuint NumMipmaps(void); - ILuint GetId(void) const; - ILenum GetOrigin(void); - ILubyte *GetData(void); - ILubyte *GetPalette(void); - - - // Rendering - ILuint BindImage(void); - ILuint BindImage(ILenum); - - - // Operators - ilImage& operator = (ILuint); - ilImage& operator = (const ilImage &); - - -protected: - ILuint Id; - -private: - ILvoid iStartUp(); - - -}; - - -class ilFilters -{ -public: - static ILboolean Alienify(ilImage &); - static ILboolean BlurAvg(ilImage &, ILuint Iter); - static ILboolean BlurGaussian(ilImage &, ILuint Iter); - static ILboolean Contrast(ilImage &, ILfloat Contrast); - static ILboolean EdgeDetectE(ilImage &); - static ILboolean EdgeDetectP(ilImage &); - static ILboolean EdgeDetectS(ilImage &); - static ILboolean Emboss(ilImage &); - static ILboolean Gamma(ilImage &, ILfloat Gamma); - static ILboolean Negative(ilImage &); - static ILboolean Noisify(ilImage &, ILubyte Factor); - static ILboolean Pixelize(ilImage &, ILuint PixSize); - static ILboolean Saturate(ilImage &, ILfloat Saturation); - static ILboolean Saturate(ilImage &, ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation); - static ILboolean ScaleColours(ilImage &, ILfloat r, ILfloat g, ILfloat b); - static ILboolean Sharpen(ilImage &, ILfloat Factor, ILuint Iter); -}; - - -#ifdef ILUT_USE_OPENGL -class ilOgl -{ -public: - static ILvoid Init(void); - static GLuint BindTex(ilImage &); - static ILboolean Upload(ilImage &, ILuint); - static GLuint Mipmap(ilImage &); - static ILboolean Screen(void); - static ILboolean Screenie(void); -}; -#endif//ILUT_USE_OPENGL - - -#ifdef ILUT_USE_ALLEGRO -class ilAlleg -{ -public: - static ILvoid Init(void); - static BITMAP *Convert(ilImage &); -}; -#endif//ILUT_USE_ALLEGRO - - -#ifdef ILUT_USE_WIN32 -class ilWin32 -{ -public: - static ILvoid Init(void); - static HBITMAP Convert(ilImage &); - static ILboolean GetClipboard(ilImage &); - static ILvoid GetInfo(ilImage &, BITMAPINFO *Info); - static ILubyte *GetPadData(ilImage &); - static HPALETTE GetPal(ilImage &); - static ILboolean GetResource(ilImage &, HINSTANCE hInst, ILint ID, char *ResourceType); - static ILboolean GetResource(ilImage &, HINSTANCE hInst, ILint ID, char *ResourceType, ILenum Type); - static ILboolean SetClipboard(ilImage &); -}; -#endif//ILUT_USE_WIN32 - - -class ilValidate -{ -public: - static ILboolean Valid(ILenum, char *); - static ILboolean Valid(ILenum, FILE *); - static ILboolean Valid(ILenum, ILvoid *, ILuint); - -protected: - -private: - -}; - - -class ilState -{ -public: - static ILboolean Disable(ILenum); - static ILboolean Enable(ILenum); - static ILvoid Get(ILenum, ILboolean &); - static ILvoid Get(ILenum, ILint &); - static ILboolean GetBool(ILenum); - static ILint GetInt(ILenum); - static const char *GetString(ILenum); - static ILboolean IsDisabled(ILenum); - static ILboolean IsEnabled(ILenum); - static ILboolean Origin(ILenum); - static ILvoid Pop(void); - static ILvoid Push(ILuint); - - -protected: - -private: - -}; - - -class ilError -{ -public: - static ILvoid Check(ILvoid (*Callback)(const char*)); - static ILvoid Check(ILvoid (*Callback)(ILenum)); - static ILenum Get(void); - static const char *String(void); - static const char *String(ILenum); - -protected: - -private: - -}; - - -#endif//WRAPPER_H diff --git a/samples/DevIL/include/IL/ilu.h b/samples/DevIL/include/IL/ilu.h deleted file mode 100644 index 49871d79f..000000000 --- a/samples/DevIL/include/IL/ilu.h +++ /dev/null @@ -1,195 +0,0 @@ -//----------------------------------------------------------------------------- -// -// ImageLib Utility Sources -// Copyright (C) 2000-2009 by Denton Woods -// Last modified: 03/07/2009 -// -// Filename: IL/ilu.h -// -// Description: The main include file for ILU -// -//----------------------------------------------------------------------------- - -// Doxygen comment -/*! \file ilu.h - The main include file for ILU -*/ - -#ifndef __ilu_h_ -#ifndef __ILU_H__ - -#define __ilu_h_ -#define __ILU_H__ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifdef _WIN32 - #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY)) - #if defined(_MSC_VER) || defined(__BORLANDC__) - #pragma comment(lib, "ILU.lib") - #endif - #endif -#endif - - -#define ILU_VERSION_1_7_8 1 -#define ILU_VERSION 178 - - -#define ILU_FILTER 0x2600 -#define ILU_NEAREST 0x2601 -#define ILU_LINEAR 0x2602 -#define ILU_BILINEAR 0x2603 -#define ILU_SCALE_BOX 0x2604 -#define ILU_SCALE_TRIANGLE 0x2605 -#define ILU_SCALE_BELL 0x2606 -#define ILU_SCALE_BSPLINE 0x2607 -#define ILU_SCALE_LANCZOS3 0x2608 -#define ILU_SCALE_MITCHELL 0x2609 - - -// Error types -#define ILU_INVALID_ENUM 0x0501 -#define ILU_OUT_OF_MEMORY 0x0502 -#define ILU_INTERNAL_ERROR 0x0504 -#define ILU_INVALID_VALUE 0x0505 -#define ILU_ILLEGAL_OPERATION 0x0506 -#define ILU_INVALID_PARAM 0x0509 - - -// Values -#define ILU_PLACEMENT 0x0700 -#define ILU_LOWER_LEFT 0x0701 -#define ILU_LOWER_RIGHT 0x0702 -#define ILU_UPPER_LEFT 0x0703 -#define ILU_UPPER_RIGHT 0x0704 -#define ILU_CENTER 0x0705 -#define ILU_CONVOLUTION_MATRIX 0x0710 - -#define ILU_VERSION_NUM IL_VERSION_NUM -#define ILU_VENDOR IL_VENDOR - - -// Languages -#define ILU_ENGLISH 0x0800 -#define ILU_ARABIC 0x0801 -#define ILU_DUTCH 0x0802 -#define ILU_JAPANESE 0x0803 -#define ILU_SPANISH 0x0804 -#define ILU_GERMAN 0x0805 -#define ILU_FRENCH 0x0806 - - -// Filters -/* -#define ILU_FILTER_BLUR 0x0803 -#define ILU_FILTER_GAUSSIAN_3x3 0x0804 -#define ILU_FILTER_GAUSSIAN_5X5 0x0805 -#define ILU_FILTER_EMBOSS1 0x0807 -#define ILU_FILTER_EMBOSS2 0x0808 -#define ILU_FILTER_LAPLACIAN1 0x080A -#define ILU_FILTER_LAPLACIAN2 0x080B -#define ILU_FILTER_LAPLACIAN3 0x080C -#define ILU_FILTER_LAPLACIAN4 0x080D -#define ILU_FILTER_SHARPEN1 0x080E -#define ILU_FILTER_SHARPEN2 0x080F -#define ILU_FILTER_SHARPEN3 0x0810 -*/ - - -typedef struct ILinfo -{ - ILuint Id; // the image's id - ILubyte *Data; // the image's data - ILuint Width; // the image's width - ILuint Height; // the image's height - ILuint Depth; // the image's depth - ILubyte Bpp; // bytes per pixel (not bits) of the image - ILuint SizeOfData; // the total size of the data (in bytes) - ILenum Format; // image format (in IL enum style) - ILenum Type; // image type (in IL enum style) - ILenum Origin; // origin of the image - ILubyte *Palette; // the image's palette - ILenum PalType; // palette type - ILuint PalSize; // palette size - ILenum CubeFlags; // flags for what cube map sides are present - ILuint NumNext; // number of images following - ILuint NumMips; // number of mipmaps - ILuint NumLayers; // number of layers -} ILinfo; - - -typedef struct ILpointf { - ILfloat x; - ILfloat y; -} ILpointf; - -typedef struct ILpointi { - ILint x; - ILint y; -} ILpointi; - -ILAPI ILboolean ILAPIENTRY iluAlienify(void); -ILAPI ILboolean ILAPIENTRY iluBlurAvg(ILuint Iter); -ILAPI ILboolean ILAPIENTRY iluBlurGaussian(ILuint Iter); -ILAPI ILboolean ILAPIENTRY iluBuildMipmaps(void); -ILAPI ILuint ILAPIENTRY iluColoursUsed(void); -ILAPI ILboolean ILAPIENTRY iluCompareImage(ILuint Comp); -ILAPI ILboolean ILAPIENTRY iluContrast(ILfloat Contrast); -ILAPI ILboolean ILAPIENTRY iluCrop(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth); -ILAPI void ILAPIENTRY iluDeleteImage(ILuint Id); // Deprecated -ILAPI ILboolean ILAPIENTRY iluEdgeDetectE(void); -ILAPI ILboolean ILAPIENTRY iluEdgeDetectP(void); -ILAPI ILboolean ILAPIENTRY iluEdgeDetectS(void); -ILAPI ILboolean ILAPIENTRY iluEmboss(void); -ILAPI ILboolean ILAPIENTRY iluEnlargeCanvas(ILuint Width, ILuint Height, ILuint Depth); -ILAPI ILboolean ILAPIENTRY iluEnlargeImage(ILfloat XDim, ILfloat YDim, ILfloat ZDim); -ILAPI ILboolean ILAPIENTRY iluEqualize(void); -ILAPI ILconst_string ILAPIENTRY iluErrorString(ILenum Error); -ILAPI ILboolean ILAPIENTRY iluConvolution(ILint *matrix, ILint scale, ILint bias); -ILAPI ILboolean ILAPIENTRY iluFlipImage(void); -ILAPI ILboolean ILAPIENTRY iluGammaCorrect(ILfloat Gamma); -ILAPI ILuint ILAPIENTRY iluGenImage(void); // Deprecated -ILAPI void ILAPIENTRY iluGetImageInfo(ILinfo *Info); -ILAPI ILint ILAPIENTRY iluGetInteger(ILenum Mode); -ILAPI void ILAPIENTRY iluGetIntegerv(ILenum Mode, ILint *Param); -ILAPI ILstring ILAPIENTRY iluGetString(ILenum StringName); -ILAPI void ILAPIENTRY iluImageParameter(ILenum PName, ILenum Param); -ILAPI void ILAPIENTRY iluInit(void); -ILAPI ILboolean ILAPIENTRY iluInvertAlpha(void); -ILAPI ILuint ILAPIENTRY iluLoadImage(ILconst_string FileName); -ILAPI ILboolean ILAPIENTRY iluMirror(void); -ILAPI ILboolean ILAPIENTRY iluNegative(void); -ILAPI ILboolean ILAPIENTRY iluNoisify(ILclampf Tolerance); -ILAPI ILboolean ILAPIENTRY iluPixelize(ILuint PixSize); -ILAPI void ILAPIENTRY iluRegionfv(ILpointf *Points, ILuint n); -ILAPI void ILAPIENTRY iluRegioniv(ILpointi *Points, ILuint n); -ILAPI ILboolean ILAPIENTRY iluReplaceColour(ILubyte Red, ILubyte Green, ILubyte Blue, ILfloat Tolerance); -ILAPI ILboolean ILAPIENTRY iluRotate(ILfloat Angle); -ILAPI ILboolean ILAPIENTRY iluRotate3D(ILfloat x, ILfloat y, ILfloat z, ILfloat Angle); -ILAPI ILboolean ILAPIENTRY iluSaturate1f(ILfloat Saturation); -ILAPI ILboolean ILAPIENTRY iluSaturate4f(ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation); -ILAPI ILboolean ILAPIENTRY iluScale(ILuint Width, ILuint Height, ILuint Depth); -ILAPI ILboolean ILAPIENTRY iluScaleAlpha(ILfloat scale); -ILAPI ILboolean ILAPIENTRY iluScaleColours(ILfloat r, ILfloat g, ILfloat b); -ILAPI ILboolean ILAPIENTRY iluSetLanguage(ILenum Language); -ILAPI ILboolean ILAPIENTRY iluSharpen(ILfloat Factor, ILuint Iter); -ILAPI ILboolean ILAPIENTRY iluSwapColours(void); -ILAPI ILboolean ILAPIENTRY iluWave(ILfloat Angle); - -#define iluColorsUsed iluColoursUsed -#define iluSwapColors iluSwapColours -#define iluReplaceColor iluReplaceColour -#define iluScaleColor iluScaleColour - -#ifdef __cplusplus -} -#endif - -#endif // __ILU_H__ -#endif // __ilu_h_ diff --git a/samples/DevIL/include/IL/ilu_region.h b/samples/DevIL/include/IL/ilu_region.h deleted file mode 100644 index b5b3adc2d..000000000 --- a/samples/DevIL/include/IL/ilu_region.h +++ /dev/null @@ -1,25 +0,0 @@ -//----------------------------------------------------------------------------- -// -// ImageLib Utility Sources -// Copyright (C) 2000-2002 by Denton Woods -// Last modified: 07/09/2002 <--Y2K Compliant! =] -// -// Filename: src-ILU/src/ilu_region.h -// -// Description: Creates an image region. -// -//----------------------------------------------------------------------------- - -#ifndef ILU_REGION_H -#define ILU_REGION_H - -typedef struct Edge -{ - ILint yUpper; - ILfloat xIntersect, dxPerScan; - struct Edge *next; -} Edge; - - -#endif//ILU_REGION_H - diff --git a/samples/DevIL/include/IL/ilut.h b/samples/DevIL/include/IL/ilut.h deleted file mode 100644 index 4a84b845d..000000000 --- a/samples/DevIL/include/IL/ilut.h +++ /dev/null @@ -1,390 +0,0 @@ -//----------------------------------------------------------------------------- -// -// ImageLib Utility Toolkit Sources -// Copyright (C) 2000-2009 by Denton Woods -// Last modified: 03/07/2009 -// -// Filename: IL/ilut.h -// -// Description: The main include file for ILUT -// -//----------------------------------------------------------------------------- - -// Doxygen comment -/*! \file ilut.h - The main include file for ILUT -*/ - -#ifndef __ilut_h_ -#ifndef __ILUT_H__ - -#define __ilut_h_ -#define __ILUT_H__ - -#include -#include - - -//----------------------------------------------------------------------------- -// Defines -//----------------------------------------------------------------------------- - -#define ILUT_VERSION_1_7_8 1 -#define ILUT_VERSION 178 - - -// Attribute Bits -#define ILUT_OPENGL_BIT 0x00000001 -#define ILUT_D3D_BIT 0x00000002 -#define ILUT_ALL_ATTRIB_BITS 0x000FFFFF - - -// Error Types -#define ILUT_INVALID_ENUM 0x0501 -#define ILUT_OUT_OF_MEMORY 0x0502 -#define ILUT_INVALID_VALUE 0x0505 -#define ILUT_ILLEGAL_OPERATION 0x0506 -#define ILUT_INVALID_PARAM 0x0509 -#define ILUT_COULD_NOT_OPEN_FILE 0x050A -#define ILUT_STACK_OVERFLOW 0x050E -#define ILUT_STACK_UNDERFLOW 0x050F -#define ILUT_BAD_DIMENSIONS 0x0511 -#define ILUT_NOT_SUPPORTED 0x0550 - - -// State Definitions -#define ILUT_PALETTE_MODE 0x0600 -#define ILUT_OPENGL_CONV 0x0610 -#define ILUT_D3D_MIPLEVELS 0x0620 -#define ILUT_MAXTEX_WIDTH 0x0630 -#define ILUT_MAXTEX_HEIGHT 0x0631 -#define ILUT_MAXTEX_DEPTH 0x0632 -#define ILUT_GL_USE_S3TC 0x0634 -#define ILUT_D3D_USE_DXTC 0x0634 -#define ILUT_GL_GEN_S3TC 0x0635 -#define ILUT_D3D_GEN_DXTC 0x0635 -#define ILUT_S3TC_FORMAT 0x0705 -#define ILUT_DXTC_FORMAT 0x0705 -#define ILUT_D3D_POOL 0x0706 -#define ILUT_D3D_ALPHA_KEY_COLOR 0x0707 -#define ILUT_D3D_ALPHA_KEY_COLOUR 0x0707 -#define ILUT_FORCE_INTEGER_FORMAT 0x0636 - -//This new state does automatic texture target detection -//if enabled. Currently, only cubemap detection is supported. -//if the current image is no cubemap, the 2d texture is chosen. -#define ILUT_GL_AUTODETECT_TEXTURE_TARGET 0x0807 - - -// Values -#define ILUT_VERSION_NUM IL_VERSION_NUM -#define ILUT_VENDOR IL_VENDOR - -// The different rendering api's...more to be added later? -#define ILUT_OPENGL 0 -#define ILUT_ALLEGRO 1 -#define ILUT_WIN32 2 -#define ILUT_DIRECT3D8 3 -#define ILUT_DIRECT3D9 4 -#define ILUT_X11 5 -#define ILUT_DIRECT3D10 6 - -/* -// Includes specific config -#ifdef DJGPP - #define ILUT_USE_ALLEGRO -#elif _WIN32_WCE - #define ILUT_USE_WIN32 -#elif _WIN32 - //#ifdef __GNUC__ //__CYGWIN32__ (Cygwin seems to not define this with DevIL builds) - #define ILUT_USE_WIN32 - #include "IL/config.h" - - // Temporary fix for the SDL main() linker bug. - //#ifdef ILUT_USE_SDL - //#undef ILUT_USE_SDL - //#endif//ILUT_USE_SDL - - //#else - // #define ILUT_USE_WIN32 - // #define ILUT_USE_OPENGL - // #define ILUT_USE_SDL - // #define ILUT_USE_DIRECTX8 - //#endif -#elif BEOS // Don't know the #define - #define ILUT_USE_BEOS - #define ILUT_USE_OPENGL -#elif MACOSX - #define ILUT_USE_OPENGL -#else - - // We are surely using a *nix so the configure script - // may have written the configured config.h header - #include "IL/config.h" -#endif -*/ - -#if (defined(_WIN32) || defined(_WIN64)) - #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY)) - #if defined(_MSC_VER) || defined(__BORLANDC__) - #pragma comment(lib, "ILUT.lib") - #endif - #endif - - #include -#endif - - - -//this should remain private and hidden -//#include "IL/config.h" - -////////////// -// OpenGL -////////////// - -#ifdef ILUT_USE_OPENGL - #if defined(_MSC_VER) || defined(_WIN32) - //#define WIN32_LEAN_AND_MEAN - #include - #endif//_MSC_VER - - #ifdef __APPLE__ - #include - #include - #else - #include - #include - #endif//__APPLE__ -#endif - - -#ifdef ILUT_USE_WIN32 - //#define WIN32_LEAN_AND_MEAN - #ifdef _DEBUG - #define _CRTDBG_MAP_ALLOC - #include - #ifndef _WIN32_WCE - #include - #endif - #endif - #include -#endif - - -// -// If we can avoid including these in all cases thing tend to break less -// and we can keep all of them defined as available -// -// Kriss -// - -// ImageLib Utility Toolkit's Allegro Functions -#ifdef ILUT_USE_ALLEGRO -// #include -#endif//ILUT_USE_ALLEGRO - -#ifdef ILUT_USE_SDL -// #include -#endif - -#ifdef ILUT_USE_DIRECTX8 - #include -#endif//ILUT_USE_DIRECTX9 - -#ifdef ILUT_USE_DIRECTX9 - #include -#endif//ILUT_USE_DIRECTX9 - -#ifdef ILUT_USE_DIRECTX10 - #pragma warning(push) - #pragma warning(disable : 4201) // Disables 'nonstandard extension used : nameless struct/union' warning - #include - #include - #include - #pragma warning(pop) -#endif//ILUT_USE_DIRECTX10 - -#ifdef ILUT_USE_X11 - #include - #include -#ifdef ILUT_USE_XSHM - #include - #include - #include -#endif//ILUT_USE_XSHM -#endif//ILUT_USE_X11 - - - -//----------------------------------------------------------------------------- -// Functions -//----------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -// ImageLib Utility Toolkit Functions -ILAPI ILboolean ILAPIENTRY ilutDisable(ILenum Mode); -ILAPI ILboolean ILAPIENTRY ilutEnable(ILenum Mode); -ILAPI ILboolean ILAPIENTRY ilutGetBoolean(ILenum Mode); -ILAPI void ILAPIENTRY ilutGetBooleanv(ILenum Mode, ILboolean *Param); -ILAPI ILint ILAPIENTRY ilutGetInteger(ILenum Mode); -ILAPI void ILAPIENTRY ilutGetIntegerv(ILenum Mode, ILint *Param); -ILAPI ILstring ILAPIENTRY ilutGetString(ILenum StringName); -ILAPI void ILAPIENTRY ilutInit(void); -ILAPI ILboolean ILAPIENTRY ilutIsDisabled(ILenum Mode); -ILAPI ILboolean ILAPIENTRY ilutIsEnabled(ILenum Mode); -ILAPI void ILAPIENTRY ilutPopAttrib(void); -ILAPI void ILAPIENTRY ilutPushAttrib(ILuint Bits); -ILAPI void ILAPIENTRY ilutSetInteger(ILenum Mode, ILint Param); - -ILAPI ILboolean ILAPIENTRY ilutRenderer(ILenum Renderer); - - -// ImageLib Utility Toolkit's OpenGL Functions -#ifdef ILUT_USE_OPENGL - ILAPI GLuint ILAPIENTRY ilutGLBindTexImage(); - ILAPI GLuint ILAPIENTRY ilutGLBindMipmaps(void); - ILAPI ILboolean ILAPIENTRY ilutGLBuildMipmaps(void); - ILAPI GLuint ILAPIENTRY ilutGLLoadImage(ILstring FileName); - ILAPI ILboolean ILAPIENTRY ilutGLScreen(void); - ILAPI ILboolean ILAPIENTRY ilutGLScreenie(void); - ILAPI ILboolean ILAPIENTRY ilutGLSaveImage(ILstring FileName, GLuint TexID); - ILAPI ILboolean ILAPIENTRY ilutGLSubTex2D(GLuint TexID, ILuint XOff, ILuint YOff); - ILAPI ILboolean ILAPIENTRY ilutGLSubTex3D(GLuint TexID, ILuint XOff, ILuint YOff, ILuint ZOff); - ILAPI ILboolean ILAPIENTRY ilutGLSetTex2D(GLuint TexID); - ILAPI ILboolean ILAPIENTRY ilutGLSetTex3D(GLuint TexID); - ILAPI ILboolean ILAPIENTRY ilutGLTexImage(GLuint Level); - ILAPI ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, ILuint YOff); - - ILAPI ILboolean ILAPIENTRY ilutGLSetTex(GLuint TexID); // Deprecated - use ilutGLSetTex2D. - ILAPI ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, ILuint YOff); // Use ilutGLSubTex2D. -#endif//ILUT_USE_OPENGL - - -// ImageLib Utility Toolkit's Allegro Functions -#ifdef ILUT_USE_ALLEGRO - #ifdef __cplusplus - extern "C" { - #endif - #include - #ifdef __cplusplus - } - #endif - - ILAPI BITMAP* ILAPIENTRY ilutAllegLoadImage(ILstring FileName); - ILAPI BITMAP* ILAPIENTRY ilutConvertToAlleg(PALETTE Pal); -#endif//ILUT_USE_ALLEGRO - - -// ImageLib Utility Toolkit's SDL Functions -#ifdef ILUT_USE_SDL - ILAPI struct SDL_Surface* ILAPIENTRY ilutConvertToSDLSurface(unsigned int flags); - ILAPI struct SDL_Surface* ILAPIENTRY ilutSDLSurfaceLoadImage(ILstring FileName); - ILAPI ILboolean ILAPIENTRY ilutSDLSurfaceFromBitmap(struct SDL_Surface *Bitmap); -#endif//ILUT_USE_SDL - - -// ImageLib Utility Toolkit's BeOS Functions -#ifdef ILUT_USE_BEOS - ILAPI BBitmap ILAPIENTRY ilutConvertToBBitmap(void); -#endif//ILUT_USE_BEOS - - -// ImageLib Utility Toolkit's Win32 GDI Functions -#ifdef ILUT_USE_WIN32 - ILAPI HBITMAP ILAPIENTRY ilutConvertToHBitmap(HDC hDC); - ILAPI HBITMAP ILAPIENTRY ilutConvertSliceToHBitmap(HDC hDC, ILuint slice); - ILAPI void ILAPIENTRY ilutFreePaddedData(ILubyte *Data); - ILAPI void ILAPIENTRY ilutGetBmpInfo(BITMAPINFO *Info); - ILAPI HPALETTE ILAPIENTRY ilutGetHPal(void); - ILAPI ILubyte* ILAPIENTRY ilutGetPaddedData(void); - ILAPI ILboolean ILAPIENTRY ilutGetWinClipboard(void); - ILAPI ILboolean ILAPIENTRY ilutLoadResource(HINSTANCE hInst, ILint ID, ILstring ResourceType, ILenum Type); - ILAPI ILboolean ILAPIENTRY ilutSetHBitmap(HBITMAP Bitmap); - ILAPI ILboolean ILAPIENTRY ilutSetHPal(HPALETTE Pal); - ILAPI ILboolean ILAPIENTRY ilutSetWinClipboard(void); - ILAPI HBITMAP ILAPIENTRY ilutWinLoadImage(ILstring FileName, HDC hDC); - ILAPI ILboolean ILAPIENTRY ilutWinLoadUrl(ILstring Url); - ILAPI ILboolean ILAPIENTRY ilutWinPrint(ILuint XPos, ILuint YPos, ILuint Width, ILuint Height, HDC hDC); - ILAPI ILboolean ILAPIENTRY ilutWinSaveImage(ILstring FileName, HBITMAP Bitmap); -#endif//ILUT_USE_WIN32 - -// ImageLib Utility Toolkit's DirectX 8 Functions -#ifdef ILUT_USE_DIRECTX8 -// ILAPI void ILAPIENTRY ilutD3D8MipFunc(ILuint NumLevels); - ILAPI struct IDirect3DTexture8* ILAPIENTRY ilutD3D8Texture(struct IDirect3DDevice8 *Device); - ILAPI struct IDirect3DVolumeTexture8* ILAPIENTRY ilutD3D8VolumeTexture(struct IDirect3DDevice8 *Device); - ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFile(struct IDirect3DDevice8 *Device, char *FileName, struct IDirect3DTexture8 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFile(struct IDirect3DDevice8 *Device, char *FileName, struct IDirect3DVolumeTexture8 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileInMemory(struct IDirect3DDevice8 *Device, void *Lump, ILuint Size, struct IDirect3DTexture8 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileInMemory(struct IDirect3DDevice8 *Device, void *Lump, ILuint Size, struct IDirect3DVolumeTexture8 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileHandle(struct IDirect3DDevice8 *Device, ILHANDLE File, struct IDirect3DTexture8 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileHandle(struct IDirect3DDevice8 *Device, ILHANDLE File, struct IDirect3DVolumeTexture8 **Texture); - // These two are not tested yet. - ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromResource(struct IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DTexture8 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromResource(struct IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DVolumeTexture8 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D8LoadSurface(struct IDirect3DDevice8 *Device, struct IDirect3DSurface8 *Surface); -#endif//ILUT_USE_DIRECTX8 - -#ifdef ILUT_USE_DIRECTX9 - #pragma warning(push) - #pragma warning(disable : 4115) // Disables 'named type definition in parentheses' warning -// ILAPI void ILAPIENTRY ilutD3D9MipFunc(ILuint NumLevels); - ILAPI struct IDirect3DTexture9* ILAPIENTRY ilutD3D9Texture (struct IDirect3DDevice9* Device); - ILAPI struct IDirect3DVolumeTexture9* ILAPIENTRY ilutD3D9VolumeTexture (struct IDirect3DDevice9* Device); - ILAPI struct IDirect3DCubeTexture9* ILAPIENTRY ilutD3D9CubeTexture (struct IDirect3DDevice9* Device); - - ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFile(struct IDirect3DDevice9 *Device, ILconst_string FileName, struct IDirect3DCubeTexture9 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileInMemory(struct IDirect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DCubeTexture9 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DCubeTexture9 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDirect3DCubeTexture9 **Texture); - - ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFile(struct IDirect3DDevice9 *Device, ILconst_string FileName, struct IDirect3DTexture9 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFile(struct IDirect3DDevice9 *Device, ILconst_string FileName, struct IDirect3DVolumeTexture9 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileInMemory(struct IDirect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DTexture9 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileInMemory(struct IDirect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DVolumeTexture9 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DTexture9 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DVolumeTexture9 **Texture); - - // These three are not tested yet. - ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDirect3DTexture9 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDirect3DVolumeTexture9 **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D9LoadSurface(struct IDirect3DDevice9 *Device, struct IDirect3DSurface9 *Surface); - #pragma warning(pop) -#endif//ILUT_USE_DIRECTX9 - -#ifdef ILUT_USE_DIRECTX10 - ILAPI ID3D10Texture2D* ILAPIENTRY ilutD3D10Texture(ID3D10Device *Device); - ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFile(ID3D10Device *Device, ILconst_string FileName, ID3D10Texture2D **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFileInMemory(ID3D10Device *Device, void *Lump, ILuint Size, ID3D10Texture2D **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromResource(ID3D10Device *Device, HMODULE SrcModule, ILconst_string SrcResource, ID3D10Texture2D **Texture); - ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFileHandle(ID3D10Device *Device, ILHANDLE File, ID3D10Texture2D **Texture); -#endif//ILUT_USE_DIRECTX10 - - - -#ifdef ILUT_USE_X11 - ILAPI XImage * ILAPIENTRY ilutXCreateImage( Display* ); - ILAPI Pixmap ILAPIENTRY ilutXCreatePixmap( Display*,Drawable ); - ILAPI XImage * ILAPIENTRY ilutXLoadImage( Display*,char* ); - ILAPI Pixmap ILAPIENTRY ilutXLoadPixmap( Display*,Drawable,char* ); -#ifdef ILUT_USE_XSHM - ILAPI XImage * ILAPIENTRY ilutXShmCreateImage( Display*,XShmSegmentInfo* ); - ILAPI void ILAPIENTRY ilutXShmDestroyImage( Display*,XImage*,XShmSegmentInfo* ); - ILAPI Pixmap ILAPIENTRY ilutXShmCreatePixmap( Display*,Drawable,XShmSegmentInfo* ); - ILAPI void ILAPIENTRY ilutXShmFreePixmap( Display*,Pixmap,XShmSegmentInfo* ); - ILAPI XImage * ILAPIENTRY ilutXShmLoadImage( Display*,char*,XShmSegmentInfo* ); - ILAPI Pixmap ILAPIENTRY ilutXShmLoadPixmap( Display*,Drawable,char*,XShmSegmentInfo* ); -#endif//ILUT_USE_XSHM -#endif//ILUT_USE_X11 - - -#ifdef __cplusplus -} -#endif - -#endif // __ILUT_H__ -#endif // __ilut_h_ diff --git a/samples/DevIL/include/IL/ilut_config.h b/samples/DevIL/include/IL/ilut_config.h deleted file mode 100644 index bd9cbc694..000000000 --- a/samples/DevIL/include/IL/ilut_config.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __ILUT_CONFIG_H__ -#define __ILUT_CONFIG_H__ - -#define IL_USE_PRAGMA_LIBS - -// Supported APIs (ILUT) - -// -// sorry just -// can't get this one to work under windows -// have disabled for the now -// -// will look at it some more later -// -// Kriss -// -#undef ILUT_USE_ALLEGRO - -#undef ILUT_USE_DIRECTX8 -//#define ILUT_USE_DIRECTX9 -//#define ILUT_USE_DIRECTX10 -#define ILUT_USE_OPENGL -//#define ILUT_USE_SDL -#define ILUT_USE_WIN32 - -#endif//__ILUT_CONFIG_H__ diff --git a/samples/DevIL/lib/DevIL.lib b/samples/DevIL/lib/DevIL.lib deleted file mode 100644 index 1aa82d047..000000000 Binary files a/samples/DevIL/lib/DevIL.lib and /dev/null differ diff --git a/samples/DevIL/lib/ILU.lib b/samples/DevIL/lib/ILU.lib deleted file mode 100644 index 5124172e2..000000000 Binary files a/samples/DevIL/lib/ILU.lib and /dev/null differ diff --git a/samples/DevIL/lib/ILUT.lib b/samples/DevIL/lib/ILUT.lib deleted file mode 100644 index 99bfb6124..000000000 Binary files a/samples/DevIL/lib/ILUT.lib and /dev/null differ diff --git a/samples/README b/samples/README index 995a84f0c..a9f44cec2 100644 --- a/samples/README +++ b/samples/README @@ -12,22 +12,25 @@ use in various real-world environments. Workspaces to build the samples can be found in the respective directories. The VC workspaces copy the created executables to the ./bin directory. -All GL-based samples depend on GLUT, some on DevIL. For convenience, -these libraries are included in the repository in their respective - Windows/x86 prebuilt versions. To build on linux, install the - required packages using the package manager of your choice. +All GL-based samples depend on FreeGLUT, the image loading will be done +by a header-only library. For convenience, these libraries are included +in the repository in their respective Windows/x86 prebuilt versions. +To build on linux, install freeglut using the package manager of your +choice. For instance on Ubuntu to install freeglut you can use the following +command: -Also note that the VS workspaces link against the DLL version of the -Assimp library, thus you need to build it in the first place ( -assimp-release-dll build configuration). The Assimp DLL needs to be -copied to ./bin as well (the VS workspaces will try to do this -automatically). +> sudo apt install freeglut + +All samples will be placed at + +Win32: //bin + +or Linux : /bin 2. List of samples ------------------ - SimpleOpenGL A very simple and straightforward OpenGL sample. It loads a diff --git a/samples/SimpleOpenGL/CMakeLists.txt b/samples/SimpleOpenGL/CMakeLists.txt index 455cbd8ca..e594f2dae 100644 --- a/samples/SimpleOpenGL/CMakeLists.txt +++ b/samples/SimpleOpenGL/CMakeLists.txt @@ -9,8 +9,8 @@ ENDIF ( MSVC ) IF ( NOT GLUT_FOUND ) IF ( MSVC ) SET ( GLUT_FOUND 1 ) - SET ( GLUT_INCLUDE_DIR ${Assimp_SOURCE_DIR}/samples/glut/ ) - SET ( GLUT_LIBRARIES ${Assimp_SOURCE_DIR}/samples/glut/glut32.lib ) + SET ( GLUT_INCLUDE_DIR ${Assimp_SOURCE_DIR}/samples/freeglut/ ) + SET ( GLUT_LIBRARIES ${Assimp_SOURCE_DIR}/samples/freeglut/lib/freeglut.lib ) ELSE ( MSVC ) MESSAGE( WARNING "Please install glut." ) ENDIF ( MSVC ) @@ -25,7 +25,7 @@ INCLUDE_DIRECTORIES( ${Assimp_SOURCE_DIR}/include ${Assimp_SOURCE_DIR}/code ${OPENGL_INCLUDE_DIR} - ${GLUT_INCLUDE_DIR} + ${Assimp_SOURCE_DIR}/samples/freeglut/include ) LINK_DIRECTORIES( diff --git a/samples/SimpleTexturedOpenGL/CMakeLists.txt b/samples/SimpleTexturedOpenGL/CMakeLists.txt index 1b206af50..40138c49b 100644 --- a/samples/SimpleTexturedOpenGL/CMakeLists.txt +++ b/samples/SimpleTexturedOpenGL/CMakeLists.txt @@ -4,8 +4,8 @@ FIND_PACKAGE(GLUT) IF ( NOT GLUT_FOUND ) IF ( MSVC ) SET ( GLUT_FOUND 1 ) - SET ( GLUT_INCLUDE_DIR ${Assimp_SOURCE_DIR}/samples/glut/ ) - SET ( GLUT_LIBRARIES ${Assimp_SOURCE_DIR}/samples/glut/glut32.lib ) + SET ( GLUT_INCLUDE_DIR ${Assimp_SOURCE_DIR}/samples/freeglut/ ) + SET ( GLUT_LIBRARIES ${Assimp_SOURCE_DIR}/samples/freeglut/lib/freeglut.lib ) ELSE ( MSVC ) MESSAGE( WARNING "Please install glut." ) ENDIF ( MSVC ) @@ -21,13 +21,11 @@ INCLUDE_DIRECTORIES( ${Assimp_SOURCE_DIR}/code ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR} - ${Assimp_SOURCE_DIR}/samples/DevIL/include/ ) LINK_DIRECTORIES( ${Assimp_BINARY_DIR} ${Assimp_BINARY_DIR}/lib/ - ${Assimp_SOURCE_DIR}/samples/DevIL/lib/ ) ADD_EXECUTABLE( assimp_simpletexturedogl WIN32 diff --git a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp index df05b56c4..8d25aaaed 100644 --- a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp +++ b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp @@ -17,7 +17,9 @@ #include #include #include -#include + +#define STB_IMAGE_IMPLEMENTATION +#include "contrib/stb_image/stb_image.h" #include @@ -25,19 +27,17 @@ #include #include - // assimp include files. These three are usually needed. -#include "assimp/Importer.hpp" //OO version Header! -#include "assimp/postprocess.h" -#include "assimp/scene.h" -#include "assimp/DefaultLogger.hpp" -#include "assimp/LogStream.hpp" +#include +#include +#include +#include +#include // The default hard-coded path. Can be overridden by supplying a path through the command line. static std::string modelpath = "../../test/models/OBJ/spider.obj"; - HGLRC hRC=NULL; // Permanent Rendering Context HDC hDC=NULL; // Private GDI Device Context HWND hWnd=NULL; // Holds Window Handle @@ -75,7 +75,6 @@ GLuint* textureIds; // pointer to texture Array // Create an instance of the Importer class Assimp::Importer importer; - void createAILogger() { // Change this line to normal if you not want to analyse the import process @@ -173,21 +172,22 @@ std::string getBasePath(const std::string& path) int LoadGLTextures(const aiScene* scene) { - ILboolean success; + //ILboolean success; /* Before calling ilInit() version should be checked. */ - if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION) + /*if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION) { /// wrong DevIL version /// std::string err_msg = "Wrong DevIL version. Old devil.dll in system32/SysWow64?"; char* cErr_msg = (char *) err_msg.c_str(); abortGLInit(cErr_msg); return -1; - } + }*/ - ilInit(); /* Initialization of DevIL */ + //ilInit(); /* Initialization of DevIL */ - if (scene->HasTextures()) abortGLInit("Support for meshes with embedded textures is not implemented"); + if (scene->HasTextures()) return 1; + //abortGLInit("Support for meshes with embedded textures is not implemented"); /* getTexture Filenames and Numb of Textures */ for (unsigned int m=0; mmNumMaterials; m++) @@ -207,12 +207,13 @@ int LoadGLTextures(const aiScene* scene) int numTextures = textureIdMap.size(); + /* array with DevIL image IDs */ - ILuint* imageIds = NULL; - imageIds = new ILuint[numTextures]; + //ILuint* imageIds = NULL; +// imageIds = new ILuint[numTextures]; /* generate DevIL Image IDs */ - ilGenImages(numTextures, imageIds); /* Generation of numTextures image names */ +// ilGenImages(numTextures, imageIds); /* Generation of numTextures image names */ /* create and fill array with GL texture ids */ textureIds = new GLuint[numTextures]; @@ -231,21 +232,22 @@ int LoadGLTextures(const aiScene* scene) itr++; // next texture - ilBindImage(imageIds[i]); /* Binding of DevIL image name */ + //ilBindImage(imageIds[i]); /* Binding of DevIL image name */ std::string fileloc = basepath + filename; /* Loading of image */ - success = ilLoadImage(fileloc.c_str()); + //success = ilLoadImage(fileloc.c_str()); + int x, y, n; + unsigned char *data = stbi_load(fileloc.c_str(), &x, &y, &n, STBI_rgb_alpha); - if (success) /* If no error occurred: */ + if (nullptr != data ) { // Convert every colour component into unsigned byte.If your image contains // alpha channel you can replace IL_RGB with IL_RGBA - success = ilConvertImage(IL_RGB, IL_UNSIGNED_BYTE); - if (!success) + //success = ilConvertImage(IL_RGB, IL_UNSIGNED_BYTE); + /*if (!success) { - /* Error occurred */ abortGLInit("Couldn't convert image"); return -1; - } + }*/ // Binding of texture name glBindTexture(GL_TEXTURE_2D, textureIds[i]); // redefine standard texture values @@ -254,15 +256,15 @@ int LoadGLTextures(const aiScene* scene) // We will use linear interpolation for minifying filter glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); // Texture specification - glTexImage2D(GL_TEXTURE_2D, 0, ilGetInteger(IL_IMAGE_BPP), ilGetInteger(IL_IMAGE_WIDTH), - ilGetInteger(IL_IMAGE_HEIGHT), 0, ilGetInteger(IL_IMAGE_FORMAT), GL_UNSIGNED_BYTE, - ilGetData()); + glTexImage2D(GL_TEXTURE_2D, 0, n, x, y, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);// Texture specification. + // we also want to be able to deal with odd texture dimensions glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); glPixelStorei( GL_UNPACK_ROW_LENGTH, 0 ); glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0 ); glPixelStorei( GL_UNPACK_SKIP_ROWS, 0 ); - } + stbi_image_free(data); + } else { /* Error occurred */ @@ -270,11 +272,11 @@ int LoadGLTextures(const aiScene* scene) } } // Because we have already copied image data into texture data we can release memory used by image. - ilDeleteImages(numTextures, imageIds); +// ilDeleteImages(numTextures, imageIds); // Cleanup - delete [] imageIds; - imageIds = NULL; + //delete [] imageIds; + //imageIds = NULL; return TRUE; } diff --git a/samples/bin/DevIL.dll b/samples/bin/DevIL.dll deleted file mode 100644 index 689b3d4de..000000000 Binary files a/samples/bin/DevIL.dll and /dev/null differ diff --git a/samples/bin/ILU.dll b/samples/bin/ILU.dll deleted file mode 100644 index ed44744e6..000000000 Binary files a/samples/bin/ILU.dll and /dev/null differ diff --git a/samples/bin/ILUT.dll b/samples/bin/ILUT.dll deleted file mode 100644 index 8b274b351..000000000 Binary files a/samples/bin/ILUT.dll and /dev/null differ diff --git a/samples/bin/ShowDwarf.bat b/samples/bin/ShowDwarf.bat deleted file mode 100644 index 935343fb0..000000000 --- a/samples/bin/ShowDwarf.bat +++ /dev/null @@ -1 +0,0 @@ -SimpleOpenGL.exe ..\..\test\models-nonbsd\X\dwarf.X \ No newline at end of file diff --git a/samples/bin/ShowWuson.bat b/samples/bin/ShowWuson.bat deleted file mode 100644 index 9eb879dde..000000000 --- a/samples/bin/ShowWuson.bat +++ /dev/null @@ -1 +0,0 @@ -SimpleOpenGL.exe ..\..\test\models\X\Testwuson.X \ No newline at end of file diff --git a/samples/bin/glut32.dll b/samples/bin/glut32.dll deleted file mode 100644 index 196ba78a9..000000000 Binary files a/samples/bin/glut32.dll and /dev/null differ diff --git a/samples/glut/GL/glut.h b/samples/glut/GL/glut.h deleted file mode 100644 index 86aa5c423..000000000 --- a/samples/glut/GL/glut.h +++ /dev/null @@ -1,716 +0,0 @@ -#ifndef __glut_h__ -#define __glut_h__ - -/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */ - -/* This program is freely distributable without licensing fees and is - provided without guarantee or warrantee expressed or implied. This - program is -not- in the public domain. */ - -#if defined(_WIN32) - -/* GLUT 3.7 now tries to avoid including - to avoid name space pollution, but Win32's - needs APIENTRY and WINGDIAPI defined properly. */ -# if 0 - /* This would put tons of macros and crap in our clean name space. */ -# define WIN32_LEAN_AND_MEAN -# include -# else - /* XXX This is from Win32's */ -# ifndef APIENTRY -# define GLUT_APIENTRY_DEFINED -# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__) -# define APIENTRY __stdcall -# else -# define APIENTRY -# endif -# endif - /* XXX This is from Win32's */ -# ifndef CALLBACK -# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS) || defined(__LCC__) -# define CALLBACK __stdcall -# else -# define CALLBACK -# endif -# endif - /* XXX Hack for lcc compiler. It doesn't support __declspec(dllimport), just __stdcall. */ -# if defined( __LCC__ ) -# undef WINGDIAPI -# define WINGDIAPI __stdcall -# else - /* XXX This is from Win32's and */ -# ifndef WINGDIAPI -# define GLUT_WINGDIAPI_DEFINED -# define WINGDIAPI __declspec(dllimport) -# endif -# endif - /* XXX This is from Win32's */ -# ifndef _WCHAR_T_DEFINED -typedef unsigned short wchar_t; -# define _WCHAR_T_DEFINED -# endif -# endif - -/* To disable automatic library usage for GLUT, define GLUT_NO_LIB_PRAGMA - in your compile preprocessor options. */ -# if !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA) -# pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */ -/* To enable automatic SGI OpenGL for Windows library usage for GLUT, - define GLUT_USE_SGI_OPENGL in your compile preprocessor options. */ -# ifdef GLUT_USE_SGI_OPENGL -# pragma comment (lib, "opengl.lib") /* link with SGI OpenGL for Windows lib */ -# pragma comment (lib, "glu.lib") /* link with SGI OpenGL Utility lib */ -# pragma comment (lib, "glut.lib") /* link with Win32 GLUT for SGI OpenGL lib */ -# else -# pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */ -# pragma comment (lib, "glu32.lib") /* link with Microsoft OpenGL Utility lib */ -# pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */ -# endif -# endif - -/* To disable supression of annoying warnings about floats being promoted - to doubles, define GLUT_NO_WARNING_DISABLE in your compile preprocessor - options. */ -# ifndef GLUT_NO_WARNING_DISABLE -# pragma warning (disable:4244) /* Disable bogus VC++ 4.2 conversion warnings. */ -# pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ -# endif - -/* Win32 has an annoying issue where there are multiple C run-time - libraries (CRTs). If the executable is linked with a different CRT - from the GLUT DLL, the GLUT DLL will not share the same CRT static - data seen by the executable. In particular, atexit callbacks registered - in the executable will not be called if GLUT calls its (different) - exit routine). GLUT is typically built with the - "/MD" option (the CRT with multithreading DLL support), but the Visual - C++ linker default is "/ML" (the single threaded CRT). - - One workaround to this issue is requiring users to always link with - the same CRT as GLUT is compiled with. That requires users supply a - non-standard option. GLUT 3.7 has its own built-in workaround where - the executable's "exit" function pointer is covertly passed to GLUT. - GLUT then calls the executable's exit function pointer to ensure that - any "atexit" calls registered by the application are called if GLUT - needs to exit. - - Note that the __glut*WithExit routines should NEVER be called directly. - To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */ - -/* XXX This is from Win32's */ -# if !defined(_MSC_VER) && !defined(__cdecl) - /* Define __cdecl for non-Microsoft compilers. */ -# define __cdecl -# define GLUT_DEFINED___CDECL -# endif -# ifndef _CRTIMP -# ifdef _NTSDK - /* Definition compatible with NT SDK */ -# define _CRTIMP -# else - /* Current definition */ -# ifdef _DLL -# define _CRTIMP __declspec(dllimport) -# else -# define _CRTIMP -# endif -# endif -# define GLUT_DEFINED__CRTIMP -# endif - -/* GLUT API entry point declarations for Win32. */ -# ifdef GLUT_BUILDING_LIB -# define GLUTAPI __declspec(dllexport) -# else -# ifdef _DLL -# define GLUTAPI __declspec(dllimport) -# else -# define GLUTAPI extern -# endif -# endif - -/* GLUT callback calling convention for Win32. */ -# define GLUTCALLBACK __cdecl - -#endif /* _WIN32 */ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(_WIN32) -# ifndef GLUT_BUILDING_LIB -extern _CRTIMP void __cdecl exit(int); -# endif -#else -/* non-Win32 case. */ -/* Define APIENTRY and CALLBACK to nothing if we aren't on Win32. */ -# define APIENTRY -# define GLUT_APIENTRY_DEFINED -# define CALLBACK -/* Define GLUTAPI and GLUTCALLBACK as below if we aren't on Win32. */ -# define GLUTAPI extern -# define GLUTCALLBACK -/* Prototype exit for the non-Win32 case (see above). */ -extern void exit(int); -#endif - -/** - GLUT API revision history: - - GLUT_API_VERSION is updated to reflect incompatible GLUT - API changes (interface changes, semantic changes, deletions, - or additions). - - GLUT_API_VERSION=1 First public release of GLUT. 11/29/94 - - GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling, - extension. Supports new input devices like tablet, dial and button - box, and Spaceball. Easy to query OpenGL extensions. - - GLUT_API_VERSION=3 glutMenuStatus added. - - GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer, - glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic - video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc, - glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat, - glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!). -**/ -#ifndef GLUT_API_VERSION /* allow this to be overridden */ -#define GLUT_API_VERSION 3 -#endif - -/** - GLUT implementation revision history: - - GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT - API revisions and implementation revisions (ie, bug fixes). - - GLUT_XLIB_IMPLEMENTATION=1 mjk's first public release of - GLUT Xlib-based implementation. 11/29/94 - - GLUT_XLIB_IMPLEMENTATION=2 mjk's second public release of - GLUT Xlib-based implementation providing GLUT version 2 - interfaces. - - GLUT_XLIB_IMPLEMENTATION=3 mjk's GLUT 2.2 images. 4/17/95 - - GLUT_XLIB_IMPLEMENTATION=4 mjk's GLUT 2.3 images. 6/?/95 - - GLUT_XLIB_IMPLEMENTATION=5 mjk's GLUT 3.0 images. 10/?/95 - - GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96 - - GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner - and video resize. 1/3/97 - - GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines. - - GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release. - - GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling. - - GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 beta with GameGLUT support. - - GLUT_XLIB_IMPLEMENTATION=14 mjk's GLUT 3.7 beta with f90gl friend interface. - - GLUT_XLIB_IMPLEMENTATION=15 mjk's GLUT 3.7 beta sync'ed with Mesa -**/ -#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overridden. */ -#define GLUT_XLIB_IMPLEMENTATION 15 -#endif - -/* Display mode bit masks. */ -#define GLUT_RGB 0 -#define GLUT_RGBA GLUT_RGB -#define GLUT_INDEX 1 -#define GLUT_SINGLE 0 -#define GLUT_DOUBLE 2 -#define GLUT_ACCUM 4 -#define GLUT_ALPHA 8 -#define GLUT_DEPTH 16 -#define GLUT_STENCIL 32 -#if (GLUT_API_VERSION >= 2) -#define GLUT_MULTISAMPLE 128 -#define GLUT_STEREO 256 -#endif -#if (GLUT_API_VERSION >= 3) -#define GLUT_LUMINANCE 512 -#endif - -/* Mouse buttons. */ -#define GLUT_LEFT_BUTTON 0 -#define GLUT_MIDDLE_BUTTON 1 -#define GLUT_RIGHT_BUTTON 2 - -/* Mouse button state. */ -#define GLUT_DOWN 0 -#define GLUT_UP 1 - -#if (GLUT_API_VERSION >= 2) -/* function keys */ -#define GLUT_KEY_F1 1 -#define GLUT_KEY_F2 2 -#define GLUT_KEY_F3 3 -#define GLUT_KEY_F4 4 -#define GLUT_KEY_F5 5 -#define GLUT_KEY_F6 6 -#define GLUT_KEY_F7 7 -#define GLUT_KEY_F8 8 -#define GLUT_KEY_F9 9 -#define GLUT_KEY_F10 10 -#define GLUT_KEY_F11 11 -#define GLUT_KEY_F12 12 -/* directional keys */ -#define GLUT_KEY_LEFT 100 -#define GLUT_KEY_UP 101 -#define GLUT_KEY_RIGHT 102 -#define GLUT_KEY_DOWN 103 -#define GLUT_KEY_PAGE_UP 104 -#define GLUT_KEY_PAGE_DOWN 105 -#define GLUT_KEY_HOME 106 -#define GLUT_KEY_END 107 -#define GLUT_KEY_INSERT 108 -#endif - -/* Entry/exit state. */ -#define GLUT_LEFT 0 -#define GLUT_ENTERED 1 - -/* Menu usage state. */ -#define GLUT_MENU_NOT_IN_USE 0 -#define GLUT_MENU_IN_USE 1 - -/* Visibility state. */ -#define GLUT_NOT_VISIBLE 0 -#define GLUT_VISIBLE 1 - -/* Window status state. */ -#define GLUT_HIDDEN 0 -#define GLUT_FULLY_RETAINED 1 -#define GLUT_PARTIALLY_RETAINED 2 -#define GLUT_FULLY_COVERED 3 - -/* Color index component selection values. */ -#define GLUT_RED 0 -#define GLUT_GREEN 1 -#define GLUT_BLUE 2 - -#if defined(_WIN32) -/* Stroke font constants (use these in GLUT program). */ -#define GLUT_STROKE_ROMAN ((void*)0) -#define GLUT_STROKE_MONO_ROMAN ((void*)1) - -/* Bitmap font constants (use these in GLUT program). */ -#define GLUT_BITMAP_9_BY_15 ((void*)2) -#define GLUT_BITMAP_8_BY_13 ((void*)3) -#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4) -#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5) -#if (GLUT_API_VERSION >= 3) -#define GLUT_BITMAP_HELVETICA_10 ((void*)6) -#define GLUT_BITMAP_HELVETICA_12 ((void*)7) -#define GLUT_BITMAP_HELVETICA_18 ((void*)8) -#endif -#else -/* Stroke font opaque addresses (use constants instead in source code). */ -GLUTAPI void *glutStrokeRoman; -GLUTAPI void *glutStrokeMonoRoman; - -/* Stroke font constants (use these in GLUT program). */ -#define GLUT_STROKE_ROMAN (&glutStrokeRoman) -#define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman) - -/* Bitmap font opaque addresses (use constants instead in source code). */ -GLUTAPI void *glutBitmap9By15; -GLUTAPI void *glutBitmap8By13; -GLUTAPI void *glutBitmapTimesRoman10; -GLUTAPI void *glutBitmapTimesRoman24; -GLUTAPI void *glutBitmapHelvetica10; -GLUTAPI void *glutBitmapHelvetica12; -GLUTAPI void *glutBitmapHelvetica18; - -/* Bitmap font constants (use these in GLUT program). */ -#define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15) -#define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13) -#define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10) -#define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24) -#if (GLUT_API_VERSION >= 3) -#define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10) -#define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12) -#define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18) -#endif -#endif - -/* glutGet parameters. */ -#define GLUT_WINDOW_X ((GLenum) 100) -#define GLUT_WINDOW_Y ((GLenum) 101) -#define GLUT_WINDOW_WIDTH ((GLenum) 102) -#define GLUT_WINDOW_HEIGHT ((GLenum) 103) -#define GLUT_WINDOW_BUFFER_SIZE ((GLenum) 104) -#define GLUT_WINDOW_STENCIL_SIZE ((GLenum) 105) -#define GLUT_WINDOW_DEPTH_SIZE ((GLenum) 106) -#define GLUT_WINDOW_RED_SIZE ((GLenum) 107) -#define GLUT_WINDOW_GREEN_SIZE ((GLenum) 108) -#define GLUT_WINDOW_BLUE_SIZE ((GLenum) 109) -#define GLUT_WINDOW_ALPHA_SIZE ((GLenum) 110) -#define GLUT_WINDOW_ACCUM_RED_SIZE ((GLenum) 111) -#define GLUT_WINDOW_ACCUM_GREEN_SIZE ((GLenum) 112) -#define GLUT_WINDOW_ACCUM_BLUE_SIZE ((GLenum) 113) -#define GLUT_WINDOW_ACCUM_ALPHA_SIZE ((GLenum) 114) -#define GLUT_WINDOW_DOUBLEBUFFER ((GLenum) 115) -#define GLUT_WINDOW_RGBA ((GLenum) 116) -#define GLUT_WINDOW_PARENT ((GLenum) 117) -#define GLUT_WINDOW_NUM_CHILDREN ((GLenum) 118) -#define GLUT_WINDOW_COLORMAP_SIZE ((GLenum) 119) -#if (GLUT_API_VERSION >= 2) -#define GLUT_WINDOW_NUM_SAMPLES ((GLenum) 120) -#define GLUT_WINDOW_STEREO ((GLenum) 121) -#endif -#if (GLUT_API_VERSION >= 3) -#define GLUT_WINDOW_CURSOR ((GLenum) 122) -#endif -#define GLUT_SCREEN_WIDTH ((GLenum) 200) -#define GLUT_SCREEN_HEIGHT ((GLenum) 201) -#define GLUT_SCREEN_WIDTH_MM ((GLenum) 202) -#define GLUT_SCREEN_HEIGHT_MM ((GLenum) 203) -#define GLUT_MENU_NUM_ITEMS ((GLenum) 300) -#define GLUT_DISPLAY_MODE_POSSIBLE ((GLenum) 400) -#define GLUT_INIT_WINDOW_X ((GLenum) 500) -#define GLUT_INIT_WINDOW_Y ((GLenum) 501) -#define GLUT_INIT_WINDOW_WIDTH ((GLenum) 502) -#define GLUT_INIT_WINDOW_HEIGHT ((GLenum) 503) -#define GLUT_INIT_DISPLAY_MODE ((GLenum) 504) -#if (GLUT_API_VERSION >= 2) -#define GLUT_ELAPSED_TIME ((GLenum) 700) -#endif -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) -#define GLUT_WINDOW_FORMAT_ID ((GLenum) 123) -#endif - -#if (GLUT_API_VERSION >= 2) -/* glutDeviceGet parameters. */ -#define GLUT_HAS_KEYBOARD ((GLenum) 600) -#define GLUT_HAS_MOUSE ((GLenum) 601) -#define GLUT_HAS_SPACEBALL ((GLenum) 602) -#define GLUT_HAS_DIAL_AND_BUTTON_BOX ((GLenum) 603) -#define GLUT_HAS_TABLET ((GLenum) 604) -#define GLUT_NUM_MOUSE_BUTTONS ((GLenum) 605) -#define GLUT_NUM_SPACEBALL_BUTTONS ((GLenum) 606) -#define GLUT_NUM_BUTTON_BOX_BUTTONS ((GLenum) 607) -#define GLUT_NUM_DIALS ((GLenum) 608) -#define GLUT_NUM_TABLET_BUTTONS ((GLenum) 609) -#endif -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) -#define GLUT_DEVICE_IGNORE_KEY_REPEAT ((GLenum) 610) -#define GLUT_DEVICE_KEY_REPEAT ((GLenum) 611) -#define GLUT_HAS_JOYSTICK ((GLenum) 612) -#define GLUT_OWNS_JOYSTICK ((GLenum) 613) -#define GLUT_JOYSTICK_BUTTONS ((GLenum) 614) -#define GLUT_JOYSTICK_AXES ((GLenum) 615) -#define GLUT_JOYSTICK_POLL_RATE ((GLenum) 616) -#endif - -#if (GLUT_API_VERSION >= 3) -/* glutLayerGet parameters. */ -#define GLUT_OVERLAY_POSSIBLE ((GLenum) 800) -#define GLUT_LAYER_IN_USE ((GLenum) 801) -#define GLUT_HAS_OVERLAY ((GLenum) 802) -#define GLUT_TRANSPARENT_INDEX ((GLenum) 803) -#define GLUT_NORMAL_DAMAGED ((GLenum) 804) -#define GLUT_OVERLAY_DAMAGED ((GLenum) 805) - -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -/* glutVideoResizeGet parameters. */ -#define GLUT_VIDEO_RESIZE_POSSIBLE ((GLenum) 900) -#define GLUT_VIDEO_RESIZE_IN_USE ((GLenum) 901) -#define GLUT_VIDEO_RESIZE_X_DELTA ((GLenum) 902) -#define GLUT_VIDEO_RESIZE_Y_DELTA ((GLenum) 903) -#define GLUT_VIDEO_RESIZE_WIDTH_DELTA ((GLenum) 904) -#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA ((GLenum) 905) -#define GLUT_VIDEO_RESIZE_X ((GLenum) 906) -#define GLUT_VIDEO_RESIZE_Y ((GLenum) 907) -#define GLUT_VIDEO_RESIZE_WIDTH ((GLenum) 908) -#define GLUT_VIDEO_RESIZE_HEIGHT ((GLenum) 909) -#endif - -/* glutUseLayer parameters. */ -#define GLUT_NORMAL ((GLenum) 0) -#define GLUT_OVERLAY ((GLenum) 1) - -/* glutGetModifiers return mask. */ -#define GLUT_ACTIVE_SHIFT 1 -#define GLUT_ACTIVE_CTRL 2 -#define GLUT_ACTIVE_ALT 4 - -/* glutSetCursor parameters. */ -/* Basic arrows. */ -#define GLUT_CURSOR_RIGHT_ARROW 0 -#define GLUT_CURSOR_LEFT_ARROW 1 -/* Symbolic cursor shapes. */ -#define GLUT_CURSOR_INFO 2 -#define GLUT_CURSOR_DESTROY 3 -#define GLUT_CURSOR_HELP 4 -#define GLUT_CURSOR_CYCLE 5 -#define GLUT_CURSOR_SPRAY 6 -#define GLUT_CURSOR_WAIT 7 -#define GLUT_CURSOR_TEXT 8 -#define GLUT_CURSOR_CROSSHAIR 9 -/* Directional cursors. */ -#define GLUT_CURSOR_UP_DOWN 10 -#define GLUT_CURSOR_LEFT_RIGHT 11 -/* Sizing cursors. */ -#define GLUT_CURSOR_TOP_SIDE 12 -#define GLUT_CURSOR_BOTTOM_SIDE 13 -#define GLUT_CURSOR_LEFT_SIDE 14 -#define GLUT_CURSOR_RIGHT_SIDE 15 -#define GLUT_CURSOR_TOP_LEFT_CORNER 16 -#define GLUT_CURSOR_TOP_RIGHT_CORNER 17 -#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18 -#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19 -/* Inherit from parent window. */ -#define GLUT_CURSOR_INHERIT 100 -/* Blank cursor. */ -#define GLUT_CURSOR_NONE 101 -/* Fullscreen crosshair (if available). */ -#define GLUT_CURSOR_FULL_CROSSHAIR 102 -#endif - -/* GLUT initialization sub-API. */ -GLUTAPI void APIENTRY glutInit(int *argcp, char **argv); -#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) -GLUTAPI void APIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int)); -#ifndef GLUT_BUILDING_LIB -static void APIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } -#define glutInit glutInit_ATEXIT_HACK -#endif -#endif -GLUTAPI void APIENTRY glutInitDisplayMode(unsigned int mode); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -GLUTAPI void APIENTRY glutInitDisplayString(const char *string); -#endif -GLUTAPI void APIENTRY glutInitWindowPosition(int x, int y); -GLUTAPI void APIENTRY glutInitWindowSize(int width, int height); -GLUTAPI void APIENTRY glutMainLoop(void); - -/* GLUT window sub-API. */ -GLUTAPI int APIENTRY glutCreateWindow(const char *title); -#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) -GLUTAPI int APIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int)); -#ifndef GLUT_BUILDING_LIB -static int APIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); } -#define glutCreateWindow glutCreateWindow_ATEXIT_HACK -#endif -#endif -GLUTAPI int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height); -GLUTAPI void APIENTRY glutDestroyWindow(int win); -GLUTAPI void APIENTRY glutPostRedisplay(void); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11) -GLUTAPI void APIENTRY glutPostWindowRedisplay(int win); -#endif -GLUTAPI void APIENTRY glutSwapBuffers(void); -GLUTAPI int APIENTRY glutGetWindow(void); -GLUTAPI void APIENTRY glutSetWindow(int win); -GLUTAPI void APIENTRY glutSetWindowTitle(const char *title); -GLUTAPI void APIENTRY glutSetIconTitle(const char *title); -GLUTAPI void APIENTRY glutPositionWindow(int x, int y); -GLUTAPI void APIENTRY glutReshapeWindow(int width, int height); -GLUTAPI void APIENTRY glutPopWindow(void); -GLUTAPI void APIENTRY glutPushWindow(void); -GLUTAPI void APIENTRY glutIconifyWindow(void); -GLUTAPI void APIENTRY glutShowWindow(void); -GLUTAPI void APIENTRY glutHideWindow(void); -#if (GLUT_API_VERSION >= 3) -GLUTAPI void APIENTRY glutFullScreen(void); -GLUTAPI void APIENTRY glutSetCursor(int cursor); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -GLUTAPI void APIENTRY glutWarpPointer(int x, int y); -#endif - -/* GLUT overlay sub-API. */ -GLUTAPI void APIENTRY glutEstablishOverlay(void); -GLUTAPI void APIENTRY glutRemoveOverlay(void); -GLUTAPI void APIENTRY glutUseLayer(GLenum layer); -GLUTAPI void APIENTRY glutPostOverlayRedisplay(void); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11) -GLUTAPI void APIENTRY glutPostWindowOverlayRedisplay(int win); -#endif -GLUTAPI void APIENTRY glutShowOverlay(void); -GLUTAPI void APIENTRY glutHideOverlay(void); -#endif - -/* GLUT menu sub-API. */ -GLUTAPI int APIENTRY glutCreateMenu(void (GLUTCALLBACK *func)(int)); -#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) -GLUTAPI int APIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (__cdecl *exitfunc)(int)); -#ifndef GLUT_BUILDING_LIB -static int APIENTRY glutCreateMenu_ATEXIT_HACK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); } -#define glutCreateMenu glutCreateMenu_ATEXIT_HACK -#endif -#endif -GLUTAPI void APIENTRY glutDestroyMenu(int menu); -GLUTAPI int APIENTRY glutGetMenu(void); -GLUTAPI void APIENTRY glutSetMenu(int menu); -GLUTAPI void APIENTRY glutAddMenuEntry(const char *label, int value); -GLUTAPI void APIENTRY glutAddSubMenu(const char *label, int submenu); -GLUTAPI void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value); -GLUTAPI void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu); -GLUTAPI void APIENTRY glutRemoveMenuItem(int item); -GLUTAPI void APIENTRY glutAttachMenu(int button); -GLUTAPI void APIENTRY glutDetachMenu(int button); - -/* GLUT window callback sub-API. */ -GLUTAPI void APIENTRY glutDisplayFunc(void (GLUTCALLBACK *func)(void)); -GLUTAPI void APIENTRY glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height)); -GLUTAPI void APIENTRY glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y)); -GLUTAPI void APIENTRY glutMouseFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y)); -GLUTAPI void APIENTRY glutMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); -GLUTAPI void APIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); -GLUTAPI void APIENTRY glutEntryFunc(void (GLUTCALLBACK *func)(int state)); -GLUTAPI void APIENTRY glutVisibilityFunc(void (GLUTCALLBACK *func)(int state)); -GLUTAPI void APIENTRY glutIdleFunc(void (GLUTCALLBACK *func)(void)); -GLUTAPI void APIENTRY glutTimerFunc(unsigned int millis, void (GLUTCALLBACK *func)(int value), int value); -GLUTAPI void APIENTRY glutMenuStateFunc(void (GLUTCALLBACK *func)(int state)); -#if (GLUT_API_VERSION >= 2) -GLUTAPI void APIENTRY glutSpecialFunc(void (GLUTCALLBACK *func)(int key, int x, int y)); -GLUTAPI void APIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK *func)(int x, int y, int z)); -GLUTAPI void APIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK *func)(int x, int y, int z)); -GLUTAPI void APIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK *func)(int button, int state)); -GLUTAPI void APIENTRY glutButtonBoxFunc(void (GLUTCALLBACK *func)(int button, int state)); -GLUTAPI void APIENTRY glutDialsFunc(void (GLUTCALLBACK *func)(int dial, int value)); -GLUTAPI void APIENTRY glutTabletMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); -GLUTAPI void APIENTRY glutTabletButtonFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y)); -#if (GLUT_API_VERSION >= 3) -GLUTAPI void APIENTRY glutMenuStatusFunc(void (GLUTCALLBACK *func)(int status, int x, int y)); -GLUTAPI void APIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK *func)(void)); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -GLUTAPI void APIENTRY glutWindowStatusFunc(void (GLUTCALLBACK *func)(int state)); -#endif -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) -GLUTAPI void APIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y)); -GLUTAPI void APIENTRY glutSpecialUpFunc(void (GLUTCALLBACK *func)(int key, int x, int y)); -GLUTAPI void APIENTRY glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval); -#endif -#endif -#endif - -/* GLUT color index sub-API. */ -GLUTAPI void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); -GLUTAPI GLfloat APIENTRY glutGetColor(int ndx, int component); -GLUTAPI void APIENTRY glutCopyColormap(int win); - -/* GLUT state retrieval sub-API. */ -GLUTAPI int APIENTRY glutGet(GLenum type); -GLUTAPI int APIENTRY glutDeviceGet(GLenum type); -#if (GLUT_API_VERSION >= 2) -/* GLUT extension support sub-API */ -GLUTAPI int APIENTRY glutExtensionSupported(const char *name); -#endif -#if (GLUT_API_VERSION >= 3) -GLUTAPI int APIENTRY glutGetModifiers(void); -GLUTAPI int APIENTRY glutLayerGet(GLenum type); -#endif - -/* GLUT font sub-API */ -GLUTAPI void APIENTRY glutBitmapCharacter(void *font, int character); -GLUTAPI int APIENTRY glutBitmapWidth(void *font, int character); -GLUTAPI void APIENTRY glutStrokeCharacter(void *font, int character); -GLUTAPI int APIENTRY glutStrokeWidth(void *font, int character); -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -GLUTAPI int APIENTRY glutBitmapLength(void *font, const unsigned char *string); -GLUTAPI int APIENTRY glutStrokeLength(void *font, const unsigned char *string); -#endif - -/* GLUT pre-built models sub-API */ -GLUTAPI void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks); -GLUTAPI void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); -GLUTAPI void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -GLUTAPI void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -GLUTAPI void APIENTRY glutWireCube(GLdouble size); -GLUTAPI void APIENTRY glutSolidCube(GLdouble size); -GLUTAPI void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -GLUTAPI void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -GLUTAPI void APIENTRY glutWireDodecahedron(void); -GLUTAPI void APIENTRY glutSolidDodecahedron(void); -GLUTAPI void APIENTRY glutWireTeapot(GLdouble size); -GLUTAPI void APIENTRY glutSolidTeapot(GLdouble size); -GLUTAPI void APIENTRY glutWireOctahedron(void); -GLUTAPI void APIENTRY glutSolidOctahedron(void); -GLUTAPI void APIENTRY glutWireTetrahedron(void); -GLUTAPI void APIENTRY glutSolidTetrahedron(void); -GLUTAPI void APIENTRY glutWireIcosahedron(void); -GLUTAPI void APIENTRY glutSolidIcosahedron(void); - -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) -/* GLUT video resize sub-API. */ -GLUTAPI int APIENTRY glutVideoResizeGet(GLenum param); -GLUTAPI void APIENTRY glutSetupVideoResizing(void); -GLUTAPI void APIENTRY glutStopVideoResizing(void); -GLUTAPI void APIENTRY glutVideoResize(int x, int y, int width, int height); -GLUTAPI void APIENTRY glutVideoPan(int x, int y, int width, int height); - -/* GLUT debugging sub-API. */ -GLUTAPI void APIENTRY glutReportErrors(void); -#endif - -#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) -/* GLUT device control sub-API. */ -/* glutSetKeyRepeat modes. */ -#define GLUT_KEY_REPEAT_OFF 0 -#define GLUT_KEY_REPEAT_ON 1 -#define GLUT_KEY_REPEAT_DEFAULT 2 - -/* Joystick button masks. */ -#define GLUT_JOYSTICK_BUTTON_A 1 -#define GLUT_JOYSTICK_BUTTON_B 2 -#define GLUT_JOYSTICK_BUTTON_C 4 -#define GLUT_JOYSTICK_BUTTON_D 8 - -GLUTAPI void APIENTRY glutIgnoreKeyRepeat(int ignore); -GLUTAPI void APIENTRY glutSetKeyRepeat(int repeatMode); -GLUTAPI void APIENTRY glutForceJoystickFunc(void); - -/* GLUT game mode sub-API. */ -/* glutGameModeGet. */ -#define GLUT_GAME_MODE_ACTIVE ((GLenum) 0) -#define GLUT_GAME_MODE_POSSIBLE ((GLenum) 1) -#define GLUT_GAME_MODE_WIDTH ((GLenum) 2) -#define GLUT_GAME_MODE_HEIGHT ((GLenum) 3) -#define GLUT_GAME_MODE_PIXEL_DEPTH ((GLenum) 4) -#define GLUT_GAME_MODE_REFRESH_RATE ((GLenum) 5) -#define GLUT_GAME_MODE_DISPLAY_CHANGED ((GLenum) 6) - -GLUTAPI void APIENTRY glutGameModeString(const char *string); -GLUTAPI int APIENTRY glutEnterGameMode(void); -GLUTAPI void APIENTRY glutLeaveGameMode(void); -GLUTAPI int APIENTRY glutGameModeGet(GLenum mode); -#endif - -#ifdef __cplusplus -} - -#endif - -#ifdef GLUT_APIENTRY_DEFINED -# undef GLUT_APIENTRY_DEFINED -# undef APIENTRY -#endif - -#ifdef GLUT_WINGDIAPI_DEFINED -# undef GLUT_WINGDIAPI_DEFINED -# undef WINGDIAPI -#endif - -#ifdef GLUT_DEFINED___CDECL -# undef GLUT_DEFINED___CDECL -# undef __cdecl -#endif - -#ifdef GLUT_DEFINED__CRTIMP -# undef GLUT_DEFINED__CRTIMP -# undef _CRTIMP -#endif - -#endif /* __glut_h__ */ diff --git a/samples/glut/README-win32.txt b/samples/glut/README-win32.txt deleted file mode 100644 index 59bd9504e..000000000 --- a/samples/glut/README-win32.txt +++ /dev/null @@ -1,613 +0,0 @@ - - - GLUT for Win32 README - --------------------- - - -VERSION/INFO: - - This is GLUT for Win32 version 3.7.6 as of Nov 8th 2001. - See the COPYRIGHT section for distribution and copyright notices. - Send all bug reports and questions for this version of GLUT to - Nate Robins [nate@pobox.com]. - - For more information about GLUT for Win32, see the web page: - www.pobox.com/~nate/glut.html or subscribe to the GLUT for Win32 - mailing list by sending e-mail to majordomo@perp.com with - "subscribe glut" in the body of the message. - - For general information about GLUT, see the GLUT web page: - http://reality.sgi.com/opengl/glut3/glut3.html and be sure to - check the GLUT FAQ first for any questions that you may have: - http://reality.sgi.com/opengl/glut3/glut-faq.html - - -COMPILING/INSTALLATION: - - o Precompiled versions of the DLL and import library can be - found on the GLUT for Win32 web page mentioned above. - - o Microsoft Developer Studio 6 workspace and project files have - been included in the source code distribution. - - To build the glut dll: - First, open Microsoft Developer Studio. - Then, select File -> Open Workspace and find the glut.dsw file - in the file dialog and double-click on it. - Finally, select Build -> Build glut32.dll. - When the build is finished, it will copy: - glut32.dll to %WinDir%\System, - glut32.lib to $(MSDevDir)\..\..\VC98\lib, and - glut.h to $(MSDevDir)\..\..\VC98\include\GL. - - Additional workspace files have been included in the progs, test - and lib directories to build the progs, tests and libs respectively. - - -BORLAND NOTES: - - From what I understand, Borland supplies a utility that - converts Microsoft Visual C++ .libs into Borland compatible - files. Therefore, the best method for Borland users is - probably to get the precompiled versions of the library and - convert the library. To create an import library for Borland - from the DLLs, use the following command (from a command prompt): - IMPLIB glut32.lib glut32.dll - If IMPLIB crashes when called this way, try - IMPLIB glut32.lib glut32.def - using the glut32.def file in this distribution. - - -FORTRAN NOTES: - - Bill Mitchell [william.mitchell@nist.gov] has put considerable - effort into getting GLUT to work with different compilers for - Fortran 90. He indicates that you should copy the f90glut.h - file to your $(MSDevDir)\..\..\VC98\include\GL directory. - Then, just build GLUT as usual. The Fortran 90 interface, f90gl, - can be obtained at http://math.nist.gov/f90gl and contains - installation instructions and usage examples. - - -MISC NOTES: - - o Overlay support is not implemented, nor are there any plans to - implement it in the near future. - - o To customize the windows icon, you can use the resource name - GLUT_ICON. For example, create an icon named "glut.ico", and - create a file called glut.rc that contains the following: - GLUT_ICON ICON glut.ico - then compile the glut.rc file with the following: - rc /r glut - and link the resulting glut.res file into your executable - (just like you would an object file). - Alternatively, you can simply add the glut.rc file to your - project if you are using Microsoft Developer Studio. - - -IMPLEMENTATION DEPENDENT DIFFERENCES: - - There are a few differences between the Win32 version of GLUT - and the X11 version of GLUT. Those are outlined here. Note - that MOST of these differences are allowed by the GLUT - specification. Bugs and unsupported features are outlined in - the UNSUPPORTED/BUGS section. - - o glutInit: - The following command line options have no meaning (and are - ignored) in GLUT for Win32: - -display, -indirect, -direct, -sync. - - o glutInitWindowPosition, glutPositionWindow: - Win32 has two different coordinate systems for windows. - One is in terms of client space and the other is the whole - window space (including the decorations). If you - glutPositionWindow(0, 0), GLUT for Win32 will place the - window CLIENT area at 0, 0. This will cause the window - decorations (title bar and left edge) to be OFF-SCREEN, but - it gives the user the most flexibility in positioning. - HOWEVER, if the user specifies glutInitWindowPosition(0, 0), - the window is placed relative to window space at 0, 0. - This will cause the window to be opened in the upper left - corner with all the decorations showing. This behaviour is - acceptable under the current GLUT specification. - - o glutSetIconTitle, glutSetWindowTitle: - There is no separation between Icon title and Window title - in Win32. Therefore, setting an icon title in Win32 has - no effect. - - o glutSetCursor: - As indicated in the GLUT specification, cursors may be - different on different platforms. This is the case in GLUT - for Win32. For the most part, the cursors will match the - meaning, but not necessarily the shape. Notable exceptions - are the GLUT_CURSOR_INFO & GLUT_CURSOR_SPRAY which use the - crosshair cursor and the GLUT_CURSOR_CYCLE which uses the - 'no' or 'destroy' cursor in Win32. - - o glutVisibilityFunc: - Win32 seems to be unable to determine if a window is fully - obscured. Therefore, the visibility of a GLUT window is - only reflected by its Iconic, Hidden or Shown state. That - is, even if a window is fully obscured, in GLUT for Win32, - it is still "visible". - - o glutEntryFunc: - Window Focus is handled differently in Win32 and X. - Specifically, the "window manager" in Win32 uses a "click to - focus" policy. That is, in order for a window to receive - focus, a mouse button must be clicked in it. Likewise, in - order for a window to lose focus, a mouse button must be - clicked outside the window (or in another window). - Therefore, the Enter and Leave notification provided by GLUT - may behave differently in the Win32 and in X11 versions. - There is a viable workaround for this. A program called - "Tweak UI" is provided by Microsoft which can be used to - change the focus policy in Win32 to "focus follows mouse". - It is available from the Microsoft Web Pages: - http://www.microsoft.com/windows/software/PowerToy.htm - - o glutCopyColormap: - GLUT for Win32 always copies the colormap. There is never - any sharing of colormaps. This is probably okay, since - Win32 merges the logical palette and the physical palette - anyway, so even if there are two windows with totally - different colors in their colormaps, Win32 will find a - (hopefully) good match between them. - - o glutIdleFunc + menus: - The glut idle function will NOT be called when a menu is - active. This causes all animation to stop when a menu is - active (in general, this is probably okay). Timer - functions will still fire, however. If the timer callback - draws into the rendering context, the drawing will not show - up until after the menu has finished, though. - - -UNSUPPORTED/BUGS: - - o glutAttachMenu: - Win32 only likes to work with left and right mouse buttons. - Especially so with popup menus. Therefore, when attaching - the menu to the middle mouse button, the LEFT mouse button - must be used to select from the menu. - - o glutSpaceball*, glutButtonBox*, glutTablet*, glutDials*: - None of the special input devices are supported at this - time. - - o When resizing or moving a GLUT for Win32 window, no updating - is performed. This causes the window to leave "tracks" on - the screen when getting bigger or when previously obscured - parts are being revealed. I put in a bit of a kludgy - workaround for those that absolutely can't have the weird - lines. The reshape callback is called multiple times for - reshapes. Therefore, in the reshape callback, some drawing - can be done. It should probably be limited to a color buffer - clear. - - o The video resizing capabilities of GLUT 3.3+ for X11 is - currently unimplemented (this is probably ok, since it - really isn't part of the spec until 4.0). I doubt that - this will ever be part of GLUT for Win32, since there is no - hardware to support it. A hack could simply change the - resolution of the desktop. - - -CHANGES/FIXES: - - (Nov 8, '01) - x Released 3.7.6 - - (Nov 8, '01) - x Changed fullscreen mode from TOPMOST back to simply TOP, since - (it turns out) many people use windows atop a GLUT window. - - (Nov 8, '01) - x Added code to prevent CPU spiking when no idle function is - registered. Otherwise, if an idle function is registered, spike - CPU so that the idle function gets all the attention it needs and - if this is a problem on the program side, the user can stick a - sleep() in their idle function. I believe that this strikes the - best balance betweeen GLUT being fast, and also being "nice" to - other processes. Thanks to James Wright for reporting this bug. - - (Nov 8, '01) - x Fixed bug in motion callback handler which wasn't setting the - current window, so multiple window apps (e.g., any GLUI app) - wouldn't get the callback correctly. - - (Oct 4, '01) - x Fixed bug in glutEnterGameMode() that caused new windows to not - be in "fullscreen" mode, so they got window decorations. - - (Oct 4, '01) - x Fixed bug in glutEnterGameMode() that caused new windows to not - be in "fullscreen" mode, so they got window decorations. - - (Oct 3, '01) - x Fixed bug in getVisualInfoFromString(): visuals not reloaded on - display mode change. Reload visuals each time they are queried. - This fixes a problem with Win32 because the list of available Visuals - (Pixelformats) changes after a change in displaymode. The problem - occurs when switching to gamemode and back. Thanks to Michael - Wimmer for pointing this out & providing the fix. - - (Oct 3, '01) - x Fixed bug in XGetVisualInfo(): pixelformats enumerated incorrectly. - Passing 0 as a pixelformat index to DescribePixelFormat gives - unpredictible results (e.g., this fails on the Voodoo opengl32.dll - and always reports 0 as the last available pixelformat index). - Thanks to Michael Wimmer for pointing this out & providing the fix. - - (Oct 3, '01) - x Fixed bug in glXGetConfig(): pixelformats enumerated incorrectly. The - test was OpenGL support OR draw to window, but should be AND. Thanks - to Michael Wimmer for pointing this out & providing the fix. - - (Sep 28, '01) - x Fixed glutChangeToSubMenu()/glutChangeToMenuEntry() bug where if you - went back and forth between a submenu and a plain entry, the submenu - wouldn't be updated properly. - - (Sep 28, '01) - x glutSetIconTitle() is now a nop. - - (Sep 28, '01) - x glutFullScreen() now sets the window as TOPMOST, therefore, the - window will always be on top (this essentially disables alt-tabbing). - - (Sep 28, '01) - x The key repeat ignore flag is now honored correctly. - - (Sep 28, '01) - x Key presses are now reported more accurately and fully, in - particular, modified up events (i.e., SHIFT-2) are now reported - correctly. - - (Sep 28, '01) - x Subwindows nested arbitrarily deep get their keyboard callbacks - correctly now. - - (Sep 28, '01) - x Major rewrite of the window procedure code to clean it up and make - way for other bug fixes. - - (Sep 23, '01) - x Fixed noof example program to use RAND_MAX instead of assumed - max of 2147483647.0. (Now it looks _much_ better!) - - (Sep 22, '01) - x Fixed sunlight example program. globe.raw data file was corrupt, - added a new one. - - (Sep 22, '01) - x Fixed zcomposite example program to print message if overlay - support is not found (instead of crashing). - - (Jan 22, '01) - x Fixed malloc(0) bug in Win32 version of XGetVisualInfo. Thanks - to Kekoa Proudfoot for bringing this to my attention. - - (Dec 12, '00) - x Added data files for the advanced & advanced97 programs. - - (Dec 12, '00) - x Added Developer Studio 6 project and workspace files for pretty - much everything (the stuff left out was usually unix specific). - - (Dec 7, '00) - x Fixed several compilation problems & corrupt files. Thanks to - Alexander Stohr for bringing these to my attention and providing - detailed fixes. - - (Dec 6, '00) - x Fixed compiler support for lcc. Thanks to Gordon for bringing - this to my attention and debugging fixes. - - (Nov 8, '00) - x Fixed submenu problem (sometimes the menu callback was not - called for valid items). Thanks to Michael Keeley. - - (Oct 16, '00) - x Corrected corrupt duck.iv file. Thanks to Jon Willeke for finding - this problem. - - (Sept 27, '00) - x Fixed bug in processWorkList that could cause a hang. Thanks to - Bill Volz & Daniel Azuma. - - (Sept 26, '00) - x Added mui DLL project file (thanks to DMWeldy@ugsolutions.com). - - (Sept 9, '00) - x Fixed Delete key bug (crash when no keyboard callback was - registered, but a special key callback was). Thanks to - Kent Bowling (kent_bowling@hotmail.com) for finding this bug. - - (May 18, '00) - x Fixed subwindow keyboard callbacks. - - (May 22, '97) - o Menus don't work under Windows 95 - x Fixed! Added a unique identifier to each menu item, and a - search function to grab a menu item given the unique identifier. - - (May 21, '97) - o A few minor bug fixes here and there. - x Thanks to Bruce Silberman and Chris Vale for their help with - this. We now have a DLL! - - (Apr 25, '97) - o DLL version of the library is coming (as soon as I figure out - how to do it -- if you know, let me know). - x Thanks to Bruce Silberman and Chris Vale for their help with - this. We now have a DLL! - - (Apr 24, '97) - x Added returns to KEY_DOWN etc messages so that the F10 key - doesn't toggle the system menu anymore. - - (Apr 7, '97) - o Palette is incorrect for modes other than TrueColor. - x Fixed this by forcing a default palette in modes that aren't - Truecolor in order to 'simulate' it. The applications - program shouldn't have to do this IMHO, but I guess we - can't argue with Microsoft (well, we can, but what good - will it do?). - - (Apr 2, '97) - x Added glut.ide file for Borland users. - - (Apr 2, '97) - x Fixed a bug in the WM_QUERYNEWPALETTE message. Wasn't - checking for a null colormap, then de-ref'd it. Oops. - - (Mar 13, '97) - o glutTimerFunc: - Currently, GLUT for Win32 programs busy waits when there is - an outstanding timer event (i.e., there is no select() - call). I haven't found this to be a problem, but I plan to - fix it just because I can't bear the thought of a busy wait. - x Added a timer event and a wait in the main loop. This fixes - the CPU spike. - - (Mar 11, '97) - x Fixed subwindow visibility. The visibility callback of - subwindows wasn't being called, now it is. - - (Mar 11, '97) - o glutGetHDC, glutGetHWND: - In order to support additional dialog boxes, wgl fonts, and - a host of other Win32 dependent structures, two functions - have been added that operate on the current window in GLUT. - The first (glutGetHDC) returns a handle to the current - windows device context. The second (glutGetHWND) returns - handle to the current window. - x Took these out to preserve GLUT portability. - - (Mar 11, '97) - x Fixed the glutWarpPointer() coordinates. Were relative to - the screen, now relative to window (client area) origin - (which is what they're supposed to be). - - (Mar 11, '97) - o glutCreateMenu, glutIdleFunc: - Menu's are modal in Win32. That is, they don't allow any - messages to be processed while they are up. Therefore, if - an idle function exists, it will not be called while - processing a menu. - x Fixed! I've put in a timer function that fires every - millisecond while a menu is up. The timer function handles - idle and timer events only (which should be the only - functions that are firing when a menu is up anyway). - - (Mar 7 '97) - x Fixed minor bugs tracked down by the example programs. - - (Mar 6, '97) - x Merged 3.3 GLUT for X11 into 3.2 GLUT for Win32. New code - structure allows for EASY merging! - - o In Win32, the parent gets the right to set the cursor of - any of its children. Therefore, a child windows cursor - will 'blink' between its cursor and its parent. - x Fixed this by checking whether the cursor is in a child - window or not. - - (Feb 28 '97) - o On initial bringup apps are getting 2 display callbacks. - x Fixed by the Fev 28 re-write. - - o Some multiple window (not subwindow) functionality is messed up. - See the sphere.exe program. - x Fixed by the Feb 28 re-write. - - o GLUT for Win32 supports color index mode ONLY in a paletted - display mode (i.e., 256 or 16 color mode). - x Fixed this in the re-write. If you can get a color index - visual (pixel format) you can use color index mode. - - (Feb 28 '97) - o Quite a few bugs (and incompatibilities) were being caused - by the structure that I used in the previous port of GLUT. - Therefore I decided that it would be best to "get back to - the roots". I re-implemented most of glut trying to stick - with the structure laid out by Mark. The result is a much - more stable version that passes ALL (!) (except overlay) - the tests provided by Mark. In addition, this new - structure will allow future enhancements by Mark to be - integrated much more quickly into the Win32 version. Also, - I'm now ordering the bugs in reverse, so that the most - recently fixed appear at the top of the list. - - (9/8/96) - o Changed the glutGetModifiers code to produce an error if not - called in the core input callbacks. - - (9/11/96) - o If the alt key is pressed with more than one other modifier key - it acts as if it is stuck -- it stays selected until pressed - and released again. - x Fixed. - - (9/12/96) - o When a submenu is attached to a menu, sometimes a GPF occurs. - Fixed. Needed to set the submenu before referencing it's members. - - o Kenny: Also, one little problem, I attached the menu to the - right-button, but when the left-button is pressed I detach - it to give the right-button new meaning; if I pop-up the menu and I - don't want to select anything, like most users, I click off of the - menu to make it disappear. When I do this, I get a GLUT error and - the program terminates because I am altering the menu attachment - from within the button press while the menu is active. - x Fixed. Needed to finish the menu when the user presses the button, - not just when a button is released. - - o GLUT for Win32 emulates a middle mouse button by checking if - both mouse buttons are down. This causes a lot of problems with - the menu and other multiple mouse button things. - x Fixed. No more middle mouse button emulation. Perhaps it would - be a good idea to emulate the middle mouse button (if not present) - with a key? - - (9/15/96) - o Added code to accept a user defined icon. If no icon is provided, - a default icon is loaded. - - (9/19/96) - o Shane: Command line options seem to be screwed up. (9/13) - x Fixed. The geometry command line was broken, and so was the - gldebug command line. - - o Fixed a bug in the default glut reshape. It was looking for the - parent of the current window and GPF'ing if there wasn't a parent. - Put in a check for a parent, and if none is there, use the - child. - - o Idle function sucks up all processor cycles. (9/8/96) - x I don't know if this is avoidable. If you have a tight rendering - loop, it may be that the processor time is going to be sucked up - no matter what. You can add a sleep() to the end of your render - loop if you would like to yield to other processes and you don't - care too much about the speed of your rendering loop. If you have - Hardware that supports OpenGL (like a 3Dpro card, or GLint card) - then this should be less of a problem, since it won't be rendering - in software. (9/11/96) - - o If a window is fully obscured by another window, the visibility - callback is NOT called. As far as I can tell, this is a limitation - of the Win32 api, but a workaround is being searched for. (9/8/96) - x Limitation of the Win32 API - - o Fixed the entry functions. They only work if the keyboard focus - changes. Therefore, in most Win32 systems, the mouse must be - pressed outside of the window to get a GLUT_LEFT message and - then pressed inside the window for a GLUT_ENTERED message. - - o Alt modifier key doesn't work with keyboard callback. (9/8/96) - x Probably okay, because the glut spec says that these keys can - be intercepted by the system (which the alt key is...) (9/11/96) - - (11/17/96) - o glutRemoveMenuItem() not working properly. - x Thanks to Gary (grc@maple.civeng.rutgers.edu) for the fix to - this one. - - o Timer functions are messed up. - x Thanks to Joseph Galbraith for the fix to this one. - - (12/9/96) - o One (minor) difference came up between the X version of glut - and the nt one which you should know about. It is not a new - problem, and it concerns co-ords returned to the pointer - callbacks. (glutMotionFunc, glutMouseFunc) - Under X, you get co-ords in the range 0 +/- 2^15, under NT - you get 0..2^16. This is only really a problem when moving - above or to the left of the window. - eg dragging one pixel ABOVE the window will give :- - under x11 : y = -1 - under nt : y = 2^16 -1 - x Put in fix provided by Shane Clauson. - - (12/17/96) - o Idle functions not working properly for multiple windows. - x Fixed this by posting an idle message to every window in the - window list when idle. - - (12/18/96) - o glutSetCursor() was misbehaving (lthomas@cco.caltech.edu). - x Win32 requires that the hCursor member of the window class - be set to NULL when the class is registered or whenever the - mouse is moved, the original cursor is replaced (go - figure!). Now sets the cursor whenever a WM_MOUSEMOVE message - is received, because the WM_SETCURSOR event resets the cursor - even when in the decoration area. - - o Geometry is not being handled quite right. The numbers don't - take into account the window decorations. That is, if I say - make a window 100x100, then the WHOLE window (not just the - client area) is 100x100. Therefore, the client (opengl) area - is smaller than 100x100. (9/8/96) - x Fixed. Added code to subtract the decoration size on glutGet() - and add the decoration size on glutReshapeWindow(). - - o Multiple glutPostRedisplay() calls are NOT being combined. - To get round the "coalesce" problem on glutPostRedisplay, - the easiest solution is to roll-your-own coalesce by - keeping a global "dirty" flag in the app (eg replace all - calls to glutPostRedisplay with image_dirty=TRUE;), and to - handle image_dirty with a single glutPostRedisplay in the - idle callback when required. (erk - but increases - performance for my particular app (a rendering engine on - the end of a pipleine with a stream of graphics updates) by - a couple of orders of magnitude ! ) (9/8/96) - x Added code to coalesce redisplays. Every idle cycle, a - check is made to see which windows need redisplay, if they - need it, a redisplay is posted. The glutPostRedisplay() - call is just a stub that sets a flag. - - -THANKS: - - Special thanks to the following people for extensive testing, - suggestions, fixes and help: - - Alexander Stohr - Shane Clauson - Kenny Hoff - Richard Readings - Paul McQuesten - Philip Winston - JaeWoo Ahn - Joseph Galbraith - Paula Higgins - Sam Fortin - Chris Vale - Bill Mitchell - - and of course, the original author of GLUT: - Mark Kilgard. - - and many others... - - -COPYRIGHT: - -The OpenGL Utility Toolkit distribution for Win32 (Windows NT & -Windows 95) contains source code modified from the original source -code for GLUT version 3.3 which was developed by Mark J. Kilgard. The -original source code for GLUT is Copyright 1997 by Mark J. Kilgard. -GLUT for Win32 is Copyright 1997 by Nate Robins and is not in the -public domain, but it is freely distributable without licensing fees. -It is provided without guarantee or warrantee expressed or implied. -It was ported with the permission of Mark J. Kilgard by Nate Robins. - -THIS SOURCE CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OR MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -OpenGL (R) is a registered trademark of Silicon Graphics, Inc. diff --git a/samples/glut/glut.def b/samples/glut/glut.def deleted file mode 100644 index d7d0240fc..000000000 --- a/samples/glut/glut.def +++ /dev/null @@ -1,126 +0,0 @@ -DESCRIPTION 'OpenGL Utility Toolkit for Win32' - -VERSION 3.7 - -EXPORTS - - glutAddMenuEntry - glutAddSubMenu - glutAttachMenu - glutBitmapCharacter - glutBitmapLength - glutBitmapWidth - glutButtonBoxFunc - glutChangeToMenuEntry - glutChangeToSubMenu - glutCopyColormap - glutCreateMenu - __glutCreateMenuWithExit - glutCreateSubWindow - glutCreateWindow - __glutCreateWindowWithExit - glutDestroyMenu - glutDestroyWindow - glutDetachMenu - glutDeviceGet - glutDialsFunc - glutDisplayFunc - glutEnterGameMode - glutEntryFunc - glutEstablishOverlay - glutExtensionSupported - glutForceJoystickFunc - glutFullScreen - glutGameModeGet - glutGameModeString - glutGet - glutGetColor - glutGetMenu - glutGetModifiers - glutGetWindow - glutHideOverlay - glutHideWindow - glutIconifyWindow - glutIdleFunc - glutIgnoreKeyRepeat - glutInit - __glutInitWithExit - glutInitDisplayMode - glutInitDisplayString - glutInitWindowPosition - glutInitWindowSize - glutJoystickFunc - glutKeyboardFunc - glutKeyboardUpFunc - glutLayerGet - glutLeaveGameMode - glutMainLoop - glutMenuStateFunc - glutMenuStatusFunc - glutMotionFunc - glutMouseFunc - glutOverlayDisplayFunc - glutPassiveMotionFunc - glutPopWindow - glutPositionWindow - glutPostOverlayRedisplay - glutPostRedisplay - glutPostWindowOverlayRedisplay - glutPostWindowRedisplay - glutPushWindow - glutRemoveMenuItem - glutRemoveOverlay - glutReportErrors - glutReshapeFunc - glutReshapeWindow - glutSetColor - glutSetCursor - glutSetIconTitle - glutSetKeyRepeat - glutSetMenu - glutSetWindow - glutSetWindowTitle - glutSetupVideoResizing - glutShowOverlay - glutShowWindow - glutSolidCone - glutSolidCube - glutSolidDodecahedron - glutSolidIcosahedron - glutSolidOctahedron - glutSolidSphere - glutSolidTeapot - glutSolidTetrahedron - glutSolidTorus - glutSpaceballButtonFunc - glutSpaceballMotionFunc - glutSpaceballRotateFunc - glutSpecialFunc - glutSpecialUpFunc - glutStopVideoResizing - glutStrokeCharacter - glutStrokeLength - glutStrokeWidth - glutSwapBuffers - glutTabletButtonFunc - glutTabletMotionFunc - glutTimerFunc - glutUseLayer - glutVideoPan - glutVideoResize - glutVideoResizeGet - glutVisibilityFunc - glutWarpPointer - glutWindowStatusFunc - glutWireCone - glutWireCube - glutWireDodecahedron - glutWireIcosahedron - glutWireOctahedron - glutWireSphere - glutWireTeapot - glutWireTetrahedron - glutWireTorus -; __glutSetFCB -; __glutGetFCB - diff --git a/samples/glut/glut32.lib b/samples/glut/glut32.lib deleted file mode 100644 index c25583d44..000000000 Binary files a/samples/glut/glut32.lib and /dev/null differ diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 210d95550..03c4ac6a1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,7 +1,7 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- # -# Copyright (c) 2006-2018, assimp team +# Copyright (c) 2006-2019, assimp team # All rights reserved. diff --git a/test/models/FBX/boxWithCompressedCTypeArray.FBX b/test/models/FBX/boxWithCompressedCTypeArray.FBX new file mode 100644 index 000000000..2f71bc7ee Binary files /dev/null and b/test/models/FBX/boxWithCompressedCTypeArray.FBX differ diff --git a/test/models/FBX/boxWithUncompressedCTypeArray.FBX b/test/models/FBX/boxWithUncompressedCTypeArray.FBX new file mode 100644 index 000000000..2ec3d77d7 Binary files /dev/null and b/test/models/FBX/boxWithUncompressedCTypeArray.FBX differ diff --git a/test/unit/AbstractImportExportBase.cpp b/test/unit/AbstractImportExportBase.cpp index c09ec0fd7..bf89fa5d4 100644 --- a/test/unit/AbstractImportExportBase.cpp +++ b/test/unit/AbstractImportExportBase.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/AssimpAPITest.cpp b/test/unit/AssimpAPITest.cpp index faf551f7c..3e1d97314 100644 --- a/test/unit/AssimpAPITest.cpp +++ b/test/unit/AssimpAPITest.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/Common/utLineSplitter.cpp b/test/unit/Common/utLineSplitter.cpp index ad050ea73..2aa581add 100644 --- a/test/unit/Common/utLineSplitter.cpp +++ b/test/unit/Common/utLineSplitter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/ImportExport/utCOBImportExport.cpp b/test/unit/ImportExport/utCOBImportExport.cpp index 854f27cbb..d80757e53 100644 --- a/test/unit/ImportExport/utCOBImportExport.cpp +++ b/test/unit/ImportExport/utCOBImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/ImportExport/utExporter.cpp b/test/unit/ImportExport/utExporter.cpp index 9ce4bfdd7..c46a55b00 100644 --- a/test/unit/ImportExport/utExporter.cpp +++ b/test/unit/ImportExport/utExporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/ImportExport/utNFFImportExport.cpp b/test/unit/ImportExport/utNFFImportExport.cpp index aca9e0392..d2fc1df5f 100644 --- a/test/unit/ImportExport/utNFFImportExport.cpp +++ b/test/unit/ImportExport/utNFFImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/ImportExport/utOFFImportExport.cpp b/test/unit/ImportExport/utOFFImportExport.cpp index a355beab6..eadd48b12 100644 --- a/test/unit/ImportExport/utOFFImportExport.cpp +++ b/test/unit/ImportExport/utOFFImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/ImportExport/utOgreImportExport.cpp b/test/unit/ImportExport/utOgreImportExport.cpp index 1950fc90a..608d0b068 100644 --- a/test/unit/ImportExport/utOgreImportExport.cpp +++ b/test/unit/ImportExport/utOgreImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/ImportExport/utQ3BSPFileImportExport.cpp b/test/unit/ImportExport/utQ3BSPFileImportExport.cpp index ba12652b4..70d89f1d2 100644 --- a/test/unit/ImportExport/utQ3BSPFileImportExport.cpp +++ b/test/unit/ImportExport/utQ3BSPFileImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/ImportExport/utXGLImportExport.cpp b/test/unit/ImportExport/utXGLImportExport.cpp index 8f82ba48d..89e780e20 100644 --- a/test/unit/ImportExport/utXGLImportExport.cpp +++ b/test/unit/ImportExport/utXGLImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/SceneDiffer.cpp b/test/unit/SceneDiffer.cpp index 30b6e9086..fb000db29 100644 --- a/test/unit/SceneDiffer.cpp +++ b/test/unit/SceneDiffer.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/SceneDiffer.h b/test/unit/SceneDiffer.h index 5c9ce2c3b..2a8bdae33 100644 --- a/test/unit/SceneDiffer.h +++ b/test/unit/SceneDiffer.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/TestIOSystem.h b/test/unit/TestIOSystem.h index f984baa13..5749df45b 100644 --- a/test/unit/TestIOSystem.h +++ b/test/unit/TestIOSystem.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/test/unit/TestModelFactory.h b/test/unit/TestModelFactory.h index 6afbe5685..f1ef1701f 100644 --- a/test/unit/TestModelFactory.h +++ b/test/unit/TestModelFactory.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/UTLogStream.h b/test/unit/UTLogStream.h index 6e24fc5ed..e679249df 100644 --- a/test/unit/UTLogStream.h +++ b/test/unit/UTLogStream.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/test/unit/ut3DImportExport.cpp b/test/unit/ut3DImportExport.cpp index 1268fa360..a3a3197cc 100644 --- a/test/unit/ut3DImportExport.cpp +++ b/test/unit/ut3DImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/ut3DSImportExport.cpp b/test/unit/ut3DSImportExport.cpp index 0f91e0f7d..edec1d793 100644 --- a/test/unit/ut3DSImportExport.cpp +++ b/test/unit/ut3DSImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utACImportExport.cpp b/test/unit/utACImportExport.cpp index 937c0afb4..192de16a0 100644 --- a/test/unit/utACImportExport.cpp +++ b/test/unit/utACImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utAMFImportExport.cpp b/test/unit/utAMFImportExport.cpp index 332d5b929..dc2c9b99b 100644 --- a/test/unit/utAMFImportExport.cpp +++ b/test/unit/utAMFImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utASEImportExport.cpp b/test/unit/utASEImportExport.cpp index 28c498dca..28168de7d 100644 --- a/test/unit/utASEImportExport.cpp +++ b/test/unit/utASEImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utAnim.cpp b/test/unit/utAnim.cpp index 40c840d7e..7d4cff7d1 100644 --- a/test/unit/utAnim.cpp +++ b/test/unit/utAnim.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/test/unit/utAssbinImportExport.cpp b/test/unit/utAssbinImportExport.cpp index bbfb9421b..6def04796 100644 --- a/test/unit/utAssbinImportExport.cpp +++ b/test/unit/utAssbinImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utB3DImportExport.cpp b/test/unit/utB3DImportExport.cpp index 6795f8cba..d51ca51a6 100644 --- a/test/unit/utB3DImportExport.cpp +++ b/test/unit/utB3DImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utBVHImportExport.cpp b/test/unit/utBVHImportExport.cpp index eebfe1439..c4ed43cf8 100644 --- a/test/unit/utBVHImportExport.cpp +++ b/test/unit/utBVHImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utBatchLoader.cpp b/test/unit/utBatchLoader.cpp index ce95727ee..d38f83b35 100644 --- a/test/unit/utBatchLoader.cpp +++ b/test/unit/utBatchLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utBlendImportAreaLight.cpp b/test/unit/utBlendImportAreaLight.cpp index c2f6c0be3..a259294aa 100644 --- a/test/unit/utBlendImportAreaLight.cpp +++ b/test/unit/utBlendImportAreaLight.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utBlendImportMaterials.cpp b/test/unit/utBlendImportMaterials.cpp index f36ffdb18..cefacbe27 100644 --- a/test/unit/utBlendImportMaterials.cpp +++ b/test/unit/utBlendImportMaterials.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utBlenderImportExport.cpp b/test/unit/utBlenderImportExport.cpp index 5634b33a8..b2d268497 100644 --- a/test/unit/utBlenderImportExport.cpp +++ b/test/unit/utBlenderImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utBlenderIntermediate.cpp b/test/unit/utBlenderIntermediate.cpp index 55490e613..c1b53bbfd 100644 --- a/test/unit/utBlenderIntermediate.cpp +++ b/test/unit/utBlenderIntermediate.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utBlenderWork.cpp b/test/unit/utBlenderWork.cpp index a17764673..65fefde28 100644 --- a/test/unit/utBlenderWork.cpp +++ b/test/unit/utBlenderWork.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utCSMImportExport.cpp b/test/unit/utCSMImportExport.cpp index 4da51f089..7f6ae0f4e 100644 --- a/test/unit/utCSMImportExport.cpp +++ b/test/unit/utCSMImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utColladaExportCamera.cpp b/test/unit/utColladaExportCamera.cpp index 3219dbf0c..3c7412e0b 100644 --- a/test/unit/utColladaExportCamera.cpp +++ b/test/unit/utColladaExportCamera.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utColladaExportLight.cpp b/test/unit/utColladaExportLight.cpp index 71f404c29..502cecf3a 100644 --- a/test/unit/utColladaExportLight.cpp +++ b/test/unit/utColladaExportLight.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utColladaImportExport.cpp b/test/unit/utColladaImportExport.cpp index c7ad6f906..78a74d973 100644 --- a/test/unit/utColladaImportExport.cpp +++ b/test/unit/utColladaImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utD3MFImportExport.cpp b/test/unit/utD3MFImportExport.cpp index c5fdd003b..9d97f0f19 100644 --- a/test/unit/utD3MFImportExport.cpp +++ b/test/unit/utD3MFImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utDXFImporterExporter.cpp b/test/unit/utDXFImporterExporter.cpp index e0e764ea6..af57ffc79 100644 --- a/test/unit/utDXFImporterExporter.cpp +++ b/test/unit/utDXFImporterExporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utDefaultIOStream.cpp b/test/unit/utDefaultIOStream.cpp index cf51ed56a..bfc82a620 100644 --- a/test/unit/utDefaultIOStream.cpp +++ b/test/unit/utDefaultIOStream.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utFBXImporterExporter.cpp b/test/unit/utFBXImporterExporter.cpp index 1d6cdf883..5aca810a0 100644 --- a/test/unit/utFBXImporterExporter.cpp +++ b/test/unit/utFBXImporterExporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utFastAtof.cpp b/test/unit/utFastAtof.cpp index 10284a1de..ef1e72202 100644 --- a/test/unit/utFastAtof.cpp +++ b/test/unit/utFastAtof.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utFindDegenerates.cpp b/test/unit/utFindDegenerates.cpp index 5fd016b2c..d6ef803fa 100644 --- a/test/unit/utFindDegenerates.cpp +++ b/test/unit/utFindDegenerates.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utFindInvalidData.cpp b/test/unit/utFindInvalidData.cpp index 2313555b8..953c6728c 100644 --- a/test/unit/utFindInvalidData.cpp +++ b/test/unit/utFindInvalidData.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utFixInfacingNormals.cpp b/test/unit/utFixInfacingNormals.cpp index 742b12013..40b962dcb 100644 --- a/test/unit/utFixInfacingNormals.cpp +++ b/test/unit/utFixInfacingNormals.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utGenNormals.cpp b/test/unit/utGenNormals.cpp index 253d76742..65ab7c833 100644 --- a/test/unit/utGenNormals.cpp +++ b/test/unit/utGenNormals.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utHMPImportExport.cpp b/test/unit/utHMPImportExport.cpp index 1e1a4bcd2..35f4583aa 100644 --- a/test/unit/utHMPImportExport.cpp +++ b/test/unit/utHMPImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utIFCImportExport.cpp b/test/unit/utIFCImportExport.cpp index 01132435b..3f7cf7c8c 100644 --- a/test/unit/utIFCImportExport.cpp +++ b/test/unit/utIFCImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utIOStreamBuffer.cpp b/test/unit/utIOStreamBuffer.cpp index 41575fa59..6c6153135 100644 --- a/test/unit/utIOStreamBuffer.cpp +++ b/test/unit/utIOStreamBuffer.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utIOSystem.cpp b/test/unit/utIOSystem.cpp index c5c02bd45..80165fe79 100644 --- a/test/unit/utIOSystem.cpp +++ b/test/unit/utIOSystem.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utImporter.cpp b/test/unit/utImporter.cpp index b76c96d2a..3e88e3ff4 100644 --- a/test/unit/utImporter.cpp +++ b/test/unit/utImporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utImproveCacheLocality.cpp b/test/unit/utImproveCacheLocality.cpp index 01f99ebb9..8564bb01d 100644 --- a/test/unit/utImproveCacheLocality.cpp +++ b/test/unit/utImproveCacheLocality.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utIssues.cpp b/test/unit/utIssues.cpp index e526c2b82..6a974d7b9 100644 --- a/test/unit/utIssues.cpp +++ b/test/unit/utIssues.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utJoinVertices.cpp b/test/unit/utJoinVertices.cpp index 522cec4af..067c0558c 100644 --- a/test/unit/utJoinVertices.cpp +++ b/test/unit/utJoinVertices.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utLWOImportExport.cpp b/test/unit/utLWOImportExport.cpp index 7e03ee2e4..c8655b664 100644 --- a/test/unit/utLWOImportExport.cpp +++ b/test/unit/utLWOImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utLWSImportExport.cpp b/test/unit/utLWSImportExport.cpp index e34cfc90e..b04424b48 100644 --- a/test/unit/utLWSImportExport.cpp +++ b/test/unit/utLWSImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utLimitBoneWeights.cpp b/test/unit/utLimitBoneWeights.cpp index 1ce1cff1b..48da66df0 100644 --- a/test/unit/utLimitBoneWeights.cpp +++ b/test/unit/utLimitBoneWeights.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utMDCImportExport.cpp b/test/unit/utMDCImportExport.cpp index 19b8e68d2..30a4cfad1 100644 --- a/test/unit/utMDCImportExport.cpp +++ b/test/unit/utMDCImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utMaterialSystem.cpp b/test/unit/utMaterialSystem.cpp index 55ee6e2a0..c2a9b520b 100644 --- a/test/unit/utMaterialSystem.cpp +++ b/test/unit/utMaterialSystem.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utMatrix3x3.cpp b/test/unit/utMatrix3x3.cpp index bc15f780d..bff8ca1cd 100644 --- a/test/unit/utMatrix3x3.cpp +++ b/test/unit/utMatrix3x3.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utMatrix4x4.cpp b/test/unit/utMatrix4x4.cpp index b11f0b43d..e94bf500c 100644 --- a/test/unit/utMatrix4x4.cpp +++ b/test/unit/utMatrix4x4.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utMetadata.cpp b/test/unit/utMetadata.cpp index c2cd6e1ef..64b7dfe4c 100644 --- a/test/unit/utMetadata.cpp +++ b/test/unit/utMetadata.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utObjImportExport.cpp b/test/unit/utObjImportExport.cpp index f0b20fb7f..0f715af14 100644 --- a/test/unit/utObjImportExport.cpp +++ b/test/unit/utObjImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team @@ -78,7 +78,7 @@ static const float VertComponents[ 24 * 3 ] = { 0.500000, -0.500000, 0.500000f }; -static const std::string ObjModel = +static const char *ObjModel = "o 1\n" "\n" "# Vertex list\n" @@ -105,7 +105,7 @@ static const std::string ObjModel = "\n" "# End of file\n"; -static const std::string ObjModel_Issue1111 = +static const char *ObjModel_Issue1111 = "o 1\n" "\n" "# Vertex list\n" @@ -231,7 +231,7 @@ TEST_F( utObjImportExport, exportObjFromFileTest ) { #endif // ASSIMP_BUILD_NO_EXPORT TEST_F( utObjImportExport, obj_import_test ) { - const aiScene *scene = m_im->ReadFileFromMemory( (void*) ObjModel.c_str(), ObjModel.size(), 0 ); + const aiScene *scene = m_im->ReadFileFromMemory( (void*) ObjModel, strlen(ObjModel), 0 ); aiScene *expected = createScene(); EXPECT_NE( nullptr, scene ); @@ -252,7 +252,7 @@ TEST_F( utObjImportExport, obj_import_test ) { } TEST_F( utObjImportExport, issue1111_no_mat_name_Test ) { - const aiScene *scene = m_im->ReadFileFromMemory( ( void* ) ObjModel_Issue1111.c_str(), ObjModel_Issue1111.size(), 0 ); + const aiScene *scene = m_im->ReadFileFromMemory( ( void* ) ObjModel_Issue1111, strlen(ObjModel_Issue1111), 0 ); EXPECT_NE( nullptr, scene ); } @@ -290,7 +290,7 @@ TEST_F( utObjImportExport, issue1923_vertex_color_Test ) { } TEST_F( utObjImportExport, issue1453_segfault ) { - static const std::string ObjModel = + static const char *ObjModel = "v 0.0 0.0 0.0\n" "v 0.0 0.0 1.0\n" "v 0.0 1.0 0.0\n" @@ -301,12 +301,12 @@ TEST_F( utObjImportExport, issue1453_segfault ) { "v 1.0 1.0 1.0\nB"; Assimp::Importer myimporter; - const aiScene *scene = myimporter.ReadFileFromMemory( ObjModel.c_str(), ObjModel.size(), aiProcess_ValidateDataStructure ); + const aiScene *scene = myimporter.ReadFileFromMemory( ObjModel, strlen(ObjModel), aiProcess_ValidateDataStructure ); EXPECT_EQ( nullptr, scene ); } TEST_F(utObjImportExport, relative_indices_Test) { - static const std::string ObjModel = + static const char *ObjModel = "v -0.500000 0.000000 0.400000\n" "v -0.500000 0.000000 -0.800000\n" "v -0.500000 1.000000 -0.800000\n" @@ -314,7 +314,7 @@ TEST_F(utObjImportExport, relative_indices_Test) { "f -4 -3 -2 -1\nB"; Assimp::Importer myimporter; - const aiScene *scene = myimporter.ReadFileFromMemory(ObjModel.c_str(), ObjModel.size(), aiProcess_ValidateDataStructure); + const aiScene *scene = myimporter.ReadFileFromMemory(ObjModel, strlen(ObjModel), aiProcess_ValidateDataStructure); EXPECT_NE(nullptr, scene); EXPECT_EQ(scene->mNumMeshes, 1U); @@ -331,14 +331,14 @@ TEST_F(utObjImportExport, relative_indices_Test) { } TEST_F(utObjImportExport, homogeneous_coordinates_Test) { - static const std::string ObjModel = + static const char *ObjModel = "v -0.500000 0.000000 0.400000 0.50000\n" "v -0.500000 0.000000 -0.800000 1.00000\n" "v 0.500000 1.000000 -0.800000 0.5000\n" "f 1 2 3\nB"; Assimp::Importer myimporter; - const aiScene *scene = myimporter.ReadFileFromMemory(ObjModel.c_str(), ObjModel.size(), aiProcess_ValidateDataStructure); + const aiScene *scene = myimporter.ReadFileFromMemory(ObjModel, strlen(ObjModel), aiProcess_ValidateDataStructure); EXPECT_NE(nullptr, scene); EXPECT_EQ(scene->mNumMeshes, 1U); @@ -354,26 +354,26 @@ TEST_F(utObjImportExport, homogeneous_coordinates_Test) { } TEST_F(utObjImportExport, homogeneous_coordinates_divide_by_zero_Test) { - static const std::string ObjModel = + static const char *ObjModel = "v -0.500000 0.000000 0.400000 0.\n" "v -0.500000 0.000000 -0.800000 1.00000\n" "v 0.500000 1.000000 -0.800000 0.5000\n" "f 1 2 3\nB"; Assimp::Importer myimporter; - const aiScene *scene = myimporter.ReadFileFromMemory(ObjModel.c_str(), ObjModel.size(), aiProcess_ValidateDataStructure); + const aiScene *scene = myimporter.ReadFileFromMemory(ObjModel, strlen(ObjModel), aiProcess_ValidateDataStructure); EXPECT_EQ(nullptr, scene); } TEST_F(utObjImportExport, 0based_array_Test) { - static const std::string ObjModel = + static const char *ObjModel = "v -0.500000 0.000000 0.400000\n" "v -0.500000 0.000000 -0.800000\n" "v -0.500000 1.000000 -0.800000\n" "f 0 1 2\nB"; - Assimp::Importer myimporter; - const aiScene *scene = myimporter.ReadFileFromMemory(ObjModel.c_str(), ObjModel.size(), 0); + Assimp::Importer myImporter; + const aiScene *scene = myImporter.ReadFileFromMemory(ObjModel, strlen(ObjModel), 0); EXPECT_EQ(nullptr, scene); } @@ -396,3 +396,8 @@ TEST_F(utObjImportExport, import_point_cloud) { ASSERT_NE(nullptr, scene); } +TEST_F(utObjImportExport, import_without_linend) { + Assimp::Importer myImporter; + const aiScene *scene = myImporter.ReadFile(ASSIMP_TEST_MODELS_DIR "/OBJ/box_without_lineending.obj", 0); + ASSERT_NE(nullptr, scene); +} diff --git a/test/unit/utObjTools.cpp b/test/unit/utObjTools.cpp index 6604dfd59..e08b5de79 100644 --- a/test/unit/utObjTools.cpp +++ b/test/unit/utObjTools.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utOpenGEXImportExport.cpp b/test/unit/utOpenGEXImportExport.cpp index 313a7210e..4e154f50f 100644 --- a/test/unit/utOpenGEXImportExport.cpp +++ b/test/unit/utOpenGEXImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utPLYImportExport.cpp b/test/unit/utPLYImportExport.cpp index 540996b21..bb8ba64d9 100644 --- a/test/unit/utPLYImportExport.cpp +++ b/test/unit/utPLYImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/test/unit/utPretransformVertices.cpp b/test/unit/utPretransformVertices.cpp index d8f7de165..0bf6245c6 100644 --- a/test/unit/utPretransformVertices.cpp +++ b/test/unit/utPretransformVertices.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utProfiler.cpp b/test/unit/utProfiler.cpp index 49c9a855c..b86f1952c 100644 --- a/test/unit/utProfiler.cpp +++ b/test/unit/utProfiler.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utQ3DImportExport.cpp b/test/unit/utQ3DImportExport.cpp index 6f840cfc9..51fa4b70a 100644 --- a/test/unit/utQ3DImportExport.cpp +++ b/test/unit/utQ3DImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utRemoveComments.cpp b/test/unit/utRemoveComments.cpp index e236b1d30..cd3175f5a 100644 --- a/test/unit/utRemoveComments.cpp +++ b/test/unit/utRemoveComments.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utRemoveComponent.cpp b/test/unit/utRemoveComponent.cpp index 5fb9656d1..1b13989dd 100644 --- a/test/unit/utRemoveComponent.cpp +++ b/test/unit/utRemoveComponent.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utRemoveRedundantMaterials.cpp b/test/unit/utRemoveRedundantMaterials.cpp index 312302846..c3497595b 100644 --- a/test/unit/utRemoveRedundantMaterials.cpp +++ b/test/unit/utRemoveRedundantMaterials.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utRemoveVCProcess.cpp b/test/unit/utRemoveVCProcess.cpp index 8c726de4a..1eedf9842 100644 --- a/test/unit/utRemoveVCProcess.cpp +++ b/test/unit/utRemoveVCProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utSIBImporter.cpp b/test/unit/utSIBImporter.cpp index da51b14af..4d6a09783 100644 --- a/test/unit/utSIBImporter.cpp +++ b/test/unit/utSIBImporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utSMDImportExport.cpp b/test/unit/utSMDImportExport.cpp index ea315db83..500277099 100644 --- a/test/unit/utSMDImportExport.cpp +++ b/test/unit/utSMDImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utSTLImportExport.cpp b/test/unit/utSTLImportExport.cpp index 77602a882..b5518de23 100644 --- a/test/unit/utSTLImportExport.cpp +++ b/test/unit/utSTLImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utScaleProcess.cpp b/test/unit/utScaleProcess.cpp index e01f822b9..13a184249 100644 --- a/test/unit/utScaleProcess.cpp +++ b/test/unit/utScaleProcess.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utSceneCombiner.cpp b/test/unit/utSceneCombiner.cpp index 3e7ba0146..e9be598e1 100644 --- a/test/unit/utSceneCombiner.cpp +++ b/test/unit/utSceneCombiner.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utScenePreprocessor.cpp b/test/unit/utScenePreprocessor.cpp index 788ee1d34..5e1af334c 100644 --- a/test/unit/utScenePreprocessor.cpp +++ b/test/unit/utScenePreprocessor.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utSharedPPData.cpp b/test/unit/utSharedPPData.cpp index 94f2a5678..380235c58 100644 --- a/test/unit/utSharedPPData.cpp +++ b/test/unit/utSharedPPData.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utSimd.cpp b/test/unit/utSimd.cpp index 33358c0da..e7779a0ee 100644 --- a/test/unit/utSimd.cpp +++ b/test/unit/utSimd.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/test/unit/utSortByPType.cpp b/test/unit/utSortByPType.cpp index 7affd56f1..4d9240c93 100644 --- a/test/unit/utSortByPType.cpp +++ b/test/unit/utSortByPType.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utSplitLargeMeshes.cpp b/test/unit/utSplitLargeMeshes.cpp index 496049d65..fced5df4b 100644 --- a/test/unit/utSplitLargeMeshes.cpp +++ b/test/unit/utSplitLargeMeshes.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utStringUtils.cpp b/test/unit/utStringUtils.cpp index ab053fd6f..3791e8622 100644 --- a/test/unit/utStringUtils.cpp +++ b/test/unit/utStringUtils.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utTargetAnimation.cpp b/test/unit/utTargetAnimation.cpp index 6bbc1f418..bbcacd2cb 100644 --- a/test/unit/utTargetAnimation.cpp +++ b/test/unit/utTargetAnimation.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utTextureTransform.cpp b/test/unit/utTextureTransform.cpp index 6bbc1f418..bbcacd2cb 100644 --- a/test/unit/utTextureTransform.cpp +++ b/test/unit/utTextureTransform.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utTriangulate.cpp b/test/unit/utTriangulate.cpp index e421d40b1..8c42000cd 100644 --- a/test/unit/utTriangulate.cpp +++ b/test/unit/utTriangulate.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utTypes.cpp b/test/unit/utTypes.cpp index a67154f7c..6289c75e7 100644 --- a/test/unit/utTypes.cpp +++ b/test/unit/utTypes.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utVector3.cpp b/test/unit/utVector3.cpp index 387b4614d..adeb70615 100644 --- a/test/unit/utVector3.cpp +++ b/test/unit/utVector3.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp index 4886377f8..5cfc91ccd 100644 --- a/test/unit/utVersion.cpp +++ b/test/unit/utVersion.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utVertexTriangleAdjacency.cpp b/test/unit/utVertexTriangleAdjacency.cpp index dc109f519..f15b0d21f 100644 --- a/test/unit/utVertexTriangleAdjacency.cpp +++ b/test/unit/utVertexTriangleAdjacency.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utX3DImportExport.cpp b/test/unit/utX3DImportExport.cpp index aeee72318..2aa0ae3cc 100644 --- a/test/unit/utX3DImportExport.cpp +++ b/test/unit/utX3DImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utXImporterExporter.cpp b/test/unit/utXImporterExporter.cpp index d4c742e6f..53e156bcc 100644 --- a/test/unit/utXImporterExporter.cpp +++ b/test/unit/utXImporterExporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utglTF2ImportExport.cpp b/test/unit/utglTF2ImportExport.cpp index 08fa9d989..3ad02645d 100644 --- a/test/unit/utglTF2ImportExport.cpp +++ b/test/unit/utglTF2ImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/test/unit/utglTFImportExport.cpp b/test/unit/utglTFImportExport.cpp index 17aa94d31..562cb05b9 100644 --- a/test/unit/utglTFImportExport.cpp +++ b/test/unit/utglTFImportExport.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/tools/assimp_cmd/CMakeLists.txt b/tools/assimp_cmd/CMakeLists.txt index ae38b5f11..5ea4e1a24 100644 --- a/tools/assimp_cmd/CMakeLists.txt +++ b/tools/assimp_cmd/CMakeLists.txt @@ -1,7 +1,7 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- # -# Copyright (c) 2006-2018, assimp team +# Copyright (c) 2006-2019, assimp team # All rights reserved. diff --git a/tools/assimp_cmd/CompareDump.cpp b/tools/assimp_cmd/CompareDump.cpp index d8304f020..0ea0893f9 100644 --- a/tools/assimp_cmd/CompareDump.cpp +++ b/tools/assimp_cmd/CompareDump.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/tools/assimp_cmd/Export.cpp b/tools/assimp_cmd/Export.cpp index 03f896822..e29936e38 100644 --- a/tools/assimp_cmd/Export.cpp +++ b/tools/assimp_cmd/Export.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/tools/assimp_cmd/ImageExtractor.cpp b/tools/assimp_cmd/ImageExtractor.cpp index ce472dcb3..f9d55b8e8 100644 --- a/tools/assimp_cmd/ImageExtractor.cpp +++ b/tools/assimp_cmd/ImageExtractor.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/tools/assimp_cmd/Info.cpp b/tools/assimp_cmd/Info.cpp index 050dbf989..cb7ac86cf 100644 --- a/tools/assimp_cmd/Info.cpp +++ b/tools/assimp_cmd/Info.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/tools/assimp_cmd/Main.cpp b/tools/assimp_cmd/Main.cpp index 2a18bf33a..af372582c 100644 --- a/tools/assimp_cmd/Main.cpp +++ b/tools/assimp_cmd/Main.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team diff --git a/tools/assimp_cmd/Main.h b/tools/assimp_cmd/Main.h index 56b06d57e..5dc4f7d28 100644 --- a/tools/assimp_cmd/Main.h +++ b/tools/assimp_cmd/Main.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -89,9 +89,8 @@ extern Assimp::Exporter* globalExporter; #endif // ------------------------------------------------------------------------------ -/** Defines common import parameters */ -struct ImportData -{ +/// Defines common import parameters +struct ImportData { ImportData() : ppFlags (0) , showLog (false) @@ -99,11 +98,9 @@ struct ImportData , log (false) {} - /** Postprocessing flags - */ + /// Post-processing flags unsigned int ppFlags; - // Log to std::err? bool showLog; diff --git a/tools/assimp_cmd/WriteDumb.cpp b/tools/assimp_cmd/WriteDumb.cpp index b05adf249..569749994 100644 --- a/tools/assimp_cmd/WriteDumb.cpp +++ b/tools/assimp_cmd/WriteDumb.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team @@ -679,7 +679,13 @@ void WriteBinaryDump(const aiScene* scene, FILE* _out, const char* src, const ch shortened = _shortened; time_t tt = time(NULL); - tm* p = gmtime(&tt); +#if _WIN32 + tm* p = gmtime(&tt); +#else + struct tm now; + tm* p = gmtime_r(&tt, &now); +#endif + ai_assert(nullptr != p); // header fprintf(out,"ASSIMP.binary-dump.%s",asctime(p)); @@ -861,7 +867,13 @@ static std::string encodeXML(const std::string& data) { void WriteDump(const aiScene* scene, FILE* out, const char* src, const char* cmd, bool shortened) { time_t tt = ::time(NULL); - tm* p = ::gmtime(&tt); +#if _WIN32 + tm* p = gmtime(&tt); +#else + struct tm now; + tm* p = gmtime_r(&tt, &now); +#endif + ai_assert(nullptr != p); std::string c = cmd; std::string::size_type s; diff --git a/tools/assimp_qt_viewer/CMakeLists.txt b/tools/assimp_qt_viewer/CMakeLists.txt index f559041d3..cd15372b5 100644 --- a/tools/assimp_qt_viewer/CMakeLists.txt +++ b/tools/assimp_qt_viewer/CMakeLists.txt @@ -1,7 +1,7 @@ set(PROJECT_VERSION "") project(assimp_qt_viewer) -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.0) FIND_PACKAGE(OpenGL QUIET) @@ -33,7 +33,6 @@ IF(VIEWER_BUILD) ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${OPENGL_INCLUDE_DIR} - ${IL_INCLUDE_DIR} ) LINK_DIRECTORIES(${Assimp_BINARY_DIR}) @@ -55,7 +54,7 @@ IF(VIEWER_BUILD) qt5_wrap_cpp(MOCrcs mainwindow.hpp glview.hpp) add_executable(${PROJECT_NAME} ${assimp_qt_viewer_SRCS} ${UISrcs} ${MOCrcs}) - target_link_libraries(${PROJECT_NAME} Qt5::Gui Qt5::Widgets Qt5::OpenGL ${IL_LIBRARIES} ${OPENGL_LIBRARIES} assimp) + target_link_libraries(${PROJECT_NAME} Qt5::Gui Qt5::Widgets Qt5::OpenGL ${OPENGL_LIBRARIES} assimp) IF(WIN32) # Check if we are on Windows IF(MSVC) # Check if we are using the Visual Studio compiler diff --git a/tools/assimp_qt_viewer/glview.cpp b/tools/assimp_qt_viewer/glview.cpp index 409e323cc..97eba83a1 100644 --- a/tools/assimp_qt_viewer/glview.cpp +++ b/tools/assimp_qt_viewer/glview.cpp @@ -58,7 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #define STB_IMAGE_IMPLEMENTATION -#include "stb_image.h" +#include "contrib/stb_image/stb_image.h" CGLView::SHelper_Mesh::SHelper_Mesh(const size_t pQuantity_Point, const size_t pQuantity_Line, const size_t pQuantity_Triangle, const SBBox& pBBox) : Quantity_Point(pQuantity_Point) @@ -237,7 +237,7 @@ void CGLView::ImportTextures(const QString& scenePath) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);// We will use linear interpolation for magnification filter. glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);// We will use linear interpolation for minifying filter. glTexImage2D(GL_TEXTURE_2D, 0, n, x, y, 0, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE, data );// Texture specification. - + stbi_image_free(data); // Cleanup } else diff --git a/tools/assimp_view/AnimEvaluator.cpp b/tools/assimp_view/AnimEvaluator.cpp index 94c581df4..9d9481a77 100644 --- a/tools/assimp_view/AnimEvaluator.cpp +++ b/tools/assimp_view/AnimEvaluator.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -47,17 +47,21 @@ using namespace AssimpView; // ------------------------------------------------------------------------------------------------ // Constructor on a given animation. -AnimEvaluator::AnimEvaluator( const aiAnimation* pAnim) -{ - mAnim = pAnim; - mLastTime = 0.0; +AnimEvaluator::AnimEvaluator( const aiAnimation *pAnim ) +: mAnim(pAnim) +, mLastTime(0.0) { mLastPositions.resize( pAnim->mNumChannels, std::make_tuple( 0, 0, 0)); } +// ------------------------------------------------------------------------------------------------ +// Destructor. +AnimEvaluator::~AnimEvaluator() { + // empty +} + // ------------------------------------------------------------------------------------------------ // Evaluates the animation tracks for a given time stamp. -void AnimEvaluator::Evaluate( double pTime) -{ +void AnimEvaluator::Evaluate( double pTime ) { // extract ticks per second. Assume default value if not given double ticksPerSecond = mAnim->mTicksPerSecond != 0.0 ? mAnim->mTicksPerSecond : 25.0; // every following time calculation happens in ticks @@ -65,29 +69,29 @@ void AnimEvaluator::Evaluate( double pTime) // map into anim's duration double time = 0.0f; - if( mAnim->mDuration > 0.0) - time = fmod( pTime, mAnim->mDuration); + if (mAnim->mDuration > 0.0) { + time = fmod(pTime, mAnim->mDuration); + } - if( mTransforms.size() != mAnim->mNumChannels) - mTransforms.resize( mAnim->mNumChannels); + if (mTransforms.size() != mAnim->mNumChannels) { + mTransforms.resize(mAnim->mNumChannels); + } // calculate the transformations for each animation channel - for( unsigned int a = 0; a < mAnim->mNumChannels; a++) - { + for( unsigned int a = 0; a < mAnim->mNumChannels; ++a ) { const aiNodeAnim* channel = mAnim->mChannels[a]; // ******** Position ***** aiVector3D presentPosition( 0, 0, 0); - if( channel->mNumPositionKeys > 0) - { + if( channel->mNumPositionKeys > 0) { // Look for present frame number. Search from last position if time is after the last time, else from beginning // Should be much quicker than always looking from start for the average use case. unsigned int frame = (time >= mLastTime) ? std::get<0>(mLastPositions[a]) : 0; - while( frame < channel->mNumPositionKeys - 1) - { - if( time < channel->mPositionKeys[frame+1].mTime) + while( frame < channel->mNumPositionKeys - 1) { + if (time < channel->mPositionKeys[frame + 1].mTime) { break; - frame++; + } + ++frame; } // interpolate between this frame's value and next frame's value @@ -95,14 +99,13 @@ void AnimEvaluator::Evaluate( double pTime) const aiVectorKey& key = channel->mPositionKeys[frame]; const aiVectorKey& nextKey = channel->mPositionKeys[nextFrame]; double diffTime = nextKey.mTime - key.mTime; - if( diffTime < 0.0) + if (diffTime < 0.0) { diffTime += mAnim->mDuration; - if( diffTime > 0) - { + } + if( diffTime > 0) { float factor = float( (time - key.mTime) / diffTime); presentPosition = key.mValue + (nextKey.mValue - key.mValue) * factor; - } else - { + } else { presentPosition = key.mValue; } @@ -111,14 +114,13 @@ void AnimEvaluator::Evaluate( double pTime) // ******** Rotation ********* aiQuaternion presentRotation( 1, 0, 0, 0); - if( channel->mNumRotationKeys > 0) - { + if( channel->mNumRotationKeys > 0) { unsigned int frame = (time >= mLastTime) ? std::get<1>(mLastPositions[a]) : 0; - while( frame < channel->mNumRotationKeys - 1) - { - if( time < channel->mRotationKeys[frame+1].mTime) + while( frame < channel->mNumRotationKeys - 1) { + if (time < channel->mRotationKeys[frame + 1].mTime) { break; - frame++; + } + ++frame; } // interpolate between this frame's value and next frame's value @@ -126,14 +128,13 @@ void AnimEvaluator::Evaluate( double pTime) const aiQuatKey& key = channel->mRotationKeys[frame]; const aiQuatKey& nextKey = channel->mRotationKeys[nextFrame]; double diffTime = nextKey.mTime - key.mTime; - if( diffTime < 0.0) + if (diffTime < 0.0) { diffTime += mAnim->mDuration; - if( diffTime > 0) - { + } + if( diffTime > 0) { float factor = float( (time - key.mTime) / diffTime); aiQuaternion::Interpolate( presentRotation, key.mValue, nextKey.mValue, factor); - } else - { + } else { presentRotation = key.mValue; } @@ -142,14 +143,13 @@ void AnimEvaluator::Evaluate( double pTime) // ******** Scaling ********** aiVector3D presentScaling( 1, 1, 1); - if( channel->mNumScalingKeys > 0) - { + if( channel->mNumScalingKeys > 0) { unsigned int frame = (time >= mLastTime) ? std::get<2>(mLastPositions[a]) : 0; - while( frame < channel->mNumScalingKeys - 1) - { - if( time < channel->mScalingKeys[frame+1].mTime) + while( frame < channel->mNumScalingKeys - 1) { + if (time < channel->mScalingKeys[frame + 1].mTime) { break; - frame++; + } + ++frame; } // TODO: (thom) interpolation maybe? This time maybe even logarithmic, not linear @@ -164,7 +164,6 @@ void AnimEvaluator::Evaluate( double pTime) mat.a2 *= presentScaling.y; mat.b2 *= presentScaling.y; mat.c2 *= presentScaling.y; mat.a3 *= presentScaling.z; mat.b3 *= presentScaling.z; mat.c3 *= presentScaling.z; mat.a4 = presentPosition.x; mat.b4 = presentPosition.y; mat.c4 = presentPosition.z; - //mat.Transpose(); } mLastTime = time; diff --git a/tools/assimp_view/AnimEvaluator.h b/tools/assimp_view/AnimEvaluator.h index 417a02935..1b4d54186 100644 --- a/tools/assimp_view/AnimEvaluator.h +++ b/tools/assimp_view/AnimEvaluator.h @@ -4,7 +4,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2012, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -46,22 +46,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -namespace AssimpView -{ +namespace AssimpView { -/** Calculates transformations for a given timestamp from a set of animation tracks. Not directly useful, - * better use the AnimPlayer class. +/** + * @brief Calculates transformations for a given timestamp from a set of animation tracks. Not directly useful, + * better use the AnimPlayer class. */ -class AnimEvaluator -{ +class AnimEvaluator { public: - /** Constructor on a given animation. The animation is fixed throughout the lifetime of - * the object. - * @param pAnim The animation to calculate poses for. Ownership of the animation object stays - * at the caller, the evaluator just keeps a reference to it as long as it persists. - */ + /// @brief Constructor on a given animation. The animation is fixed throughout the lifetime of + /// the object. + /// @param pAnim The animation to calculate poses for. Ownership of the animation object stays + /// at the caller, the evaluator just keeps a reference to it as long as it persists. AnimEvaluator( const aiAnimation* pAnim); + /// @brief The class destructor. + ~AnimEvaluator(); + /** Evaluates the animation tracks for a given time stamp. The calculated pose can be retrieved as a * array of transformation matrices afterwards by calling GetTransformations(). * @param pTime The time for which you want to evaluate the animation, in seconds. Will be mapped into the animation cycle, so @@ -74,16 +75,9 @@ public: const std::vector& GetTransformations() const { return mTransforms; } protected: - /** The animation we're working on */ const aiAnimation* mAnim; - - /** At which frame the last evaluation happened for each channel. - * Useful to quickly find the corresponding frame for slightly increased time stamps - */ double mLastTime; std::vector > mLastPositions; - - /** The array to store the transformations results of the evaluation */ std::vector mTransforms; }; diff --git a/tools/assimp_view/Background.cpp b/tools/assimp_view/Background.cpp index 14bf5b90d..b356a245b 100644 --- a/tools/assimp_view/Background.cpp +++ b/tools/assimp_view/Background.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/tools/assimp_view/CMakeLists.txt b/tools/assimp_view/CMakeLists.txt index f75937eff..f5365e11a 100644 --- a/tools/assimp_view/CMakeLists.txt +++ b/tools/assimp_view/CMakeLists.txt @@ -1,7 +1,7 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- # -# Copyright (c) 2006-2018, assimp team +# Copyright (c) 2006-2019, assimp team # All rights reserved. diff --git a/tools/assimp_view/Display.cpp b/tools/assimp_view/Display.cpp index 041ab34c5..ab29c1d3e 100644 --- a/tools/assimp_view/Display.cpp +++ b/tools/assimp_view/Display.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -102,17 +102,16 @@ void GetNodeCount(aiNode* pcNode, unsigned int* piCnt) } //------------------------------------------------------------------------------- -int CDisplay::EnableAnimTools(BOOL hm) -{ +int CDisplay::EnableAnimTools(BOOL hm) { EnableWindow(GetDlgItem(g_hDlg,IDC_PLAY),hm); EnableWindow(GetDlgItem(g_hDlg,IDC_SLIDERANIM),hm); + return 1; } //------------------------------------------------------------------------------- // Fill animation combo box -int CDisplay::FillAnimList(void) -{ +int CDisplay::FillAnimList(void) { if (0 != g_pcAsset->pcScene->mNumAnimations) { // now fill in all animation names diff --git a/tools/assimp_view/HelpDialog.cpp b/tools/assimp_view/HelpDialog.cpp index 7b2ebf7b6..1a9f08f5f 100644 --- a/tools/assimp_view/HelpDialog.cpp +++ b/tools/assimp_view/HelpDialog.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -48,14 +48,10 @@ namespace AssimpView { //------------------------------------------------------------------------------- // Message procedure for the help dialog //------------------------------------------------------------------------------- -INT_PTR CALLBACK HelpDialogProc(HWND hwndDlg,UINT uMsg, - WPARAM wParam,LPARAM lParam) - { - (void)lParam; - switch (uMsg) - { +INT_PTR CALLBACK HelpDialogProc(HWND hwndDlg,UINT uMsg, WPARAM wParam,LPARAM ) { + switch (uMsg) { case WM_INITDIALOG: - { + { // load the help file ... HRSRC res = FindResource(NULL,MAKEINTRESOURCE(IDR_TEXT1),"TEXT"); HGLOBAL hg = LoadResource(NULL,res); @@ -70,39 +66,38 @@ INT_PTR CALLBACK HelpDialogProc(HWND hwndDlg,UINT uMsg, FreeResource(hg); return TRUE; - } + } case WM_CLOSE: EndDialog(hwndDlg,0); return TRUE; case WM_COMMAND: - - if (IDOK == LOWORD(wParam)) - { + if (IDOK == LOWORD(wParam)) { EndDialog(hwndDlg,0); return TRUE; - } + } case WM_PAINT: { - PAINTSTRUCT sPaint; - HDC hdc = BeginPaint(hwndDlg,&sPaint); + PAINTSTRUCT sPaint; + HDC hdc = BeginPaint(hwndDlg,&sPaint); - HBRUSH hBrush = CreateSolidBrush(RGB(0xFF,0xFF,0xFF)); + HBRUSH hBrush = CreateSolidBrush(RGB(0xFF,0xFF,0xFF)); - RECT sRect; - sRect.left = 0; - sRect.top = 26; - sRect.right = 1000; - sRect.bottom = 507; - FillRect(hdc, &sRect, hBrush); + RECT sRect; + sRect.left = 0; + sRect.top = 26; + sRect.right = 1000; + sRect.bottom = 507; + FillRect(hdc, &sRect, hBrush); - EndPaint(hwndDlg,&sPaint); - return TRUE; + EndPaint(hwndDlg,&sPaint); + return TRUE; } - }; - return FALSE; } -}; \ No newline at end of file + return FALSE; +} + +} diff --git a/tools/assimp_view/Input.cpp b/tools/assimp_view/Input.cpp index 7a9582fb2..88e04b437 100644 --- a/tools/assimp_view/Input.cpp +++ b/tools/assimp_view/Input.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -194,7 +194,7 @@ void HandleMouseInputSkyBox( void ) //------------------------------------------------------------------------------- //------------------------------------------------------------------------------- -void HandleMouseInputLightIntensityAndColor( void ) +void HandleMouseInputLightIntensityAndColor() { POINT mousePos; GetCursorPos( &mousePos ); diff --git a/tools/assimp_view/LogDisplay.cpp b/tools/assimp_view/LogDisplay.cpp index bf0c190b6..d24b9bf20 100644 --- a/tools/assimp_view/LogDisplay.cpp +++ b/tools/assimp_view/LogDisplay.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -46,32 +46,26 @@ namespace AssimpView { CLogDisplay CLogDisplay::s_cInstance; //------------------------------------------------------------------------------- -void CLogDisplay::AddEntry(const std::string& szText, - const D3DCOLOR clrColor) - { +void CLogDisplay::AddEntry(const std::string& szText, const D3DCOLOR clrColor) { SEntry sNew; sNew.clrColor = clrColor; sNew.szText = szText; sNew.dwStartTicks = (DWORD)GetTickCount(); this->asEntries.push_back(sNew); - } +} //------------------------------------------------------------------------------- -void CLogDisplay::ReleaseNativeResource() - { - if (this->piFont) - { +void CLogDisplay::ReleaseNativeResource() { + if (this->piFont) { this->piFont->Release(); - this->piFont = NULL; - } + this->piFont = nullptr; } +} //------------------------------------------------------------------------------- -void CLogDisplay::RecreateNativeResource() - { - if (!this->piFont) - { +void CLogDisplay::RecreateNativeResource() { + if (!this->piFont) { if (FAILED(D3DXCreateFont(g_piDevice, 16, //Font height 0, //Font width @@ -84,20 +78,17 @@ void CLogDisplay::RecreateNativeResource() 5, //Quality DEFAULT_PITCH|FF_DONTCARE, //PitchAndFamily "Verdana", //pFacename, - &this->piFont))) - { + &this->piFont))) { CLogDisplay::Instance().AddEntry("Unable to load font",D3DCOLOR_ARGB(0xFF,0xFF,0,0)); - this->piFont = NULL; + this->piFont = nullptr; return; - } } - return; } +} //------------------------------------------------------------------------------- -void CLogDisplay::OnRender() - { +void CLogDisplay::OnRender() { DWORD dwTick = (DWORD) GetTickCount(); DWORD dwLimit = dwTick - 8000; DWORD dwLimit2 = dwLimit + 3000; @@ -117,9 +108,8 @@ void CLogDisplay::OnRender() sRect.bottom = sWndRect.bottom; // if no asset is loaded draw a "no asset loaded" text in the center - if (!g_pcAsset) - { - const char* szText = "Nothing to display ... \r\nTry [Viewer | Open asset] to load an asset"; + if (!g_pcAsset) { + const char* szText = "Nothing to display ... \r\nTry [Viewer | Open asset] to load an asset"; // shadow RECT sCopy; @@ -151,38 +141,34 @@ void CLogDisplay::OnRender() // text this->piFont->DrawText(NULL,szText , -1,&sWndRect,DT_CENTER | DT_VCENTER,D3DCOLOR_ARGB(0xFF,0xFF,0xFF,0xFF)); - } + } // update all elements in the queue and render them for (std::list::iterator - i = this->asEntries.begin(); - i != this->asEntries.end();++i,++iCnt) - { - if ((*i).dwStartTicks < dwLimit) - { + i = this->asEntries.begin(); + i != this->asEntries.end();++i,++iCnt) { + if ((*i).dwStartTicks < dwLimit) { i = this->asEntries.erase(i); - if(i == this->asEntries.end())break; + if (i == this->asEntries.end()) { + break; } - else if (NULL != this->piFont) - { + } else if (nullptr != this->piFont) { float fAlpha = 1.0f; - if ((*i).dwStartTicks <= dwLimit2) - { + if ((*i).dwStartTicks <= dwLimit2) { // linearly interpolate to create the fade out effect fAlpha = 1.0f - (float)(dwLimit2 - (*i).dwStartTicks) / 3000.0f; - } + } D3DCOLOR& clrColor = (*i).clrColor; clrColor &= ~(0xFFu << 24); clrColor |= (((unsigned char)(fAlpha * 255.0f)) & 0xFFu) << 24; const char* szText = (*i).szText.c_str(); - if (sRect.top + 30 > sWndRect.bottom) - { + if (sRect.top + 30 > sWndRect.bottom) { // end of window. send a special message szText = "... too many errors"; clrColor = D3DCOLOR_ARGB(0xFF,0xFF,100,0x0); - } + } // draw the black shadow RECT sCopy; @@ -225,9 +211,11 @@ void CLogDisplay::OnRender() sRect.top += iPX; sRect.bottom += iPX; - if (szText != (*i).szText.c_str())break; + if (szText != (*i).szText.c_str()) { + break; } } - return; } -}; \ No newline at end of file +} + +} diff --git a/tools/assimp_view/LogWindow.cpp b/tools/assimp_view/LogWindow.cpp index dba70ee71..ca9b88f95 100644 --- a/tools/assimp_view/LogWindow.cpp +++ b/tools/assimp_view/LogWindow.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -101,13 +101,11 @@ INT_PTR CALLBACK LogDialogProc(HWND hwndDlg,UINT uMsg, } //------------------------------------------------------------------------------- -void CLogWindow::Init () -{ +void CLogWindow::Init () { this->hwnd = ::CreateDialog(g_hInstance,MAKEINTRESOURCE(IDD_LOGVIEW), NULL,&LogDialogProc); - if (!this->hwnd) - { + if (!this->hwnd) { CLogDisplay::Instance().AddEntry("[ERROR] Unable to create logger window", D3DCOLOR_ARGB(0xFF,0,0xFF,0)); } @@ -116,11 +114,10 @@ void CLogWindow::Init () this->szText = AI_VIEW_RTF_LOG_HEADER;; this->szPlainText = ""; } + //------------------------------------------------------------------------------- -void CLogWindow::Show() -{ - if (this->hwnd) - { +void CLogWindow::Show() { + if (this->hwnd) { ShowWindow(this->hwnd,SW_SHOW); this->bIsVisible = true; @@ -128,24 +125,23 @@ void CLogWindow::Show() this->Update(); } } + //------------------------------------------------------------------------------- -void CMyLogStream::write(const char* message) -{ +void CMyLogStream::write(const char* message) { CLogWindow::Instance().WriteLine(message); } + //------------------------------------------------------------------------------- -void CLogWindow::Clear() -{ +void CLogWindow::Clear() { this->szText = AI_VIEW_RTF_LOG_HEADER;; this->szPlainText = ""; this->Update(); } + //------------------------------------------------------------------------------- -void CLogWindow::Update() -{ - if (this->bIsVisible) - { +void CLogWindow::Update() { + if (this->bIsVisible) { SETTEXTEX sInfo; sInfo.flags = ST_DEFAULT; sInfo.codepage = CP_ACP; @@ -154,20 +150,16 @@ void CLogWindow::Update() EM_SETTEXTEX,(WPARAM)&sInfo,( LPARAM)this->szText.c_str()); } } + //------------------------------------------------------------------------------- -void CLogWindow::Save() -{ +void CLogWindow::Save() { char szFileName[MAX_PATH]; DWORD dwTemp = MAX_PATH; - if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"LogDestination",NULL,NULL, - (BYTE*)szFileName,&dwTemp)) - { + if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"LogDestination",NULL,NULL,(BYTE*)szFileName,&dwTemp)) { // Key was not found. Use C: strcpy(szFileName,""); - } - else - { + } else { // need to remove the file name char* sz = strrchr(szFileName,'\\'); if (!sz) @@ -196,14 +188,13 @@ void CLogWindow::Save() CLogDisplay::Instance().AddEntry("[INFO] The log file has been saved", D3DCOLOR_ARGB(0xFF,0xFF,0xFF,0)); } + //------------------------------------------------------------------------------- -void CLogWindow::WriteLine(const char* message) -{ +void CLogWindow::WriteLine(const char* message) { this->szPlainText.append(message); this->szPlainText.append("\r\n"); - if (0 != this->szText.length()) - { + if (0 != this->szText.length()) { this->szText.resize(this->szText.length()-1); } @@ -231,12 +222,10 @@ void CLogWindow::WriteLine(const char* message) } std::string _message = message; - for (unsigned int i = 0; i < _message.length();++i) - { + for (unsigned int i = 0; i < _message.length();++i) { if ('\\' == _message[i] || '}' == _message[i] || - '{' == _message[i]) - { + '{' == _message[i]) { _message.insert(i++,"\\"); } } @@ -244,8 +233,7 @@ void CLogWindow::WriteLine(const char* message) this->szText.append(_message); this->szText.append("\\par}}"); - if (this->bIsVisible && this->bUpdate) - { + if (this->bIsVisible && this->bUpdate) { SETTEXTEX sInfo; sInfo.flags = ST_DEFAULT; sInfo.codepage = CP_ACP; @@ -253,7 +241,6 @@ void CLogWindow::WriteLine(const char* message) SendDlgItemMessage(this->hwnd,IDC_EDIT1, EM_SETTEXTEX,(WPARAM)&sInfo,( LPARAM)this->szText.c_str()); } - return; } -}; //! AssimpView \ No newline at end of file +} //! AssimpView diff --git a/tools/assimp_view/Material.cpp b/tools/assimp_view/Material.cpp index 1fb13f5a8..2c5316d81 100644 --- a/tools/assimp_view/Material.cpp +++ b/tools/assimp_view/Material.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -136,7 +136,6 @@ extern float g_smoothAngle /*= 80.f*/; extern unsigned int ppsteps, ppstepsdefault; extern bool nopointslines; - CMaterialManager CMaterialManager::s_cInstance; //------------------------------------------------------------------------------- diff --git a/tools/assimp_view/MeshRenderer.cpp b/tools/assimp_view/MeshRenderer.cpp index 834c5a9e2..dfa249735 100644 --- a/tools/assimp_view/MeshRenderer.cpp +++ b/tools/assimp_view/MeshRenderer.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -49,8 +49,7 @@ namespace AssimpView { CMeshRenderer CMeshRenderer::s_cInstance; //------------------------------------------------------------------------------- -int CMeshRenderer::DrawUnsorted(unsigned int iIndex) -{ +int CMeshRenderer::DrawUnsorted(unsigned int iIndex) { ai_assert(iIndex < g_pcAsset->pcScene->mNumMeshes); // set vertex and index buffer @@ -77,8 +76,7 @@ int CMeshRenderer::DrawUnsorted(unsigned int iIndex) return 1; } //------------------------------------------------------------------------------- -int CMeshRenderer::DrawSorted(unsigned int iIndex,const aiMatrix4x4& mWorld) -{ +int CMeshRenderer::DrawSorted(unsigned int iIndex,const aiMatrix4x4& mWorld) { ai_assert(iIndex < g_pcAsset->pcScene->mNumMeshes); AssetHelper::MeshHelper* pcHelper = g_pcAsset->apcMeshes[iIndex]; diff --git a/tools/assimp_view/MessageProc.cpp b/tools/assimp_view/MessageProc.cpp index 5a9cfd0ed..cbd8b2f1a 100644 --- a/tools/assimp_view/MessageProc.cpp +++ b/tools/assimp_view/MessageProc.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -47,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #ifdef __MINGW32__ -#include +# include #else -#include +# include #endif namespace AssimpView { @@ -92,31 +92,29 @@ void MakeFileAssociations() { GetModuleFileName(NULL,szTemp2,MAX_PATH); sprintf(szTemp,"%s %%1",szTemp2); - HKEY g_hRegistry; + HKEY hRegistry = NULL; aiString list, tmp; aiGetExtensionList(&list); tmp = list; const char* sz = strtok(list.data,";"); - do - { + do { char buf[256]; ai_assert(sz[0] == '*'); sprintf(buf,"Software\\Classes\\%s",sz+1); - RegCreateKeyEx(HKEY_CURRENT_USER,buf,0,NULL,0,KEY_ALL_ACCESS, NULL, &g_hRegistry,NULL); - RegSetValueEx(g_hRegistry,"",0,REG_SZ,(const BYTE*)"ASSIMPVIEW_CLASS",(DWORD)strlen("ASSIMPVIEW_CLASS")+1); - RegCloseKey(g_hRegistry); - } - while ((sz = strtok(NULL,";"))); + RegCreateKeyEx(HKEY_CURRENT_USER,buf,0,NULL,0,KEY_ALL_ACCESS, NULL, &hRegistry,NULL); + RegSetValueEx(hRegistry,"",0,REG_SZ,(const BYTE*)"ASSIMPVIEW_CLASS",(DWORD)strlen("ASSIMPVIEW_CLASS")+1); + RegCloseKey(hRegistry); + } while ((sz = strtok(NULL,";"))); - RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\Classes\\ASSIMPVIEW_CLASS",0,NULL,0,KEY_ALL_ACCESS, NULL, &g_hRegistry,NULL); - RegCloseKey(g_hRegistry); + RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\Classes\\ASSIMPVIEW_CLASS",0,NULL,0,KEY_ALL_ACCESS, NULL, &hRegistry,NULL); + RegCloseKey(hRegistry); - RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\Classes\\ASSIMPVIEW_CLASS\\shell\\open\\command",0,NULL,0,KEY_ALL_ACCESS, NULL, &g_hRegistry,NULL); - RegSetValueEx(g_hRegistry,"",0,REG_SZ,(const BYTE*)szTemp,(DWORD)strlen(szTemp)+1); - RegCloseKey(g_hRegistry); + RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\Classes\\ASSIMPVIEW_CLASS\\shell\\open\\command",0,NULL,0,KEY_ALL_ACCESS, NULL, &hRegistry,NULL); + RegSetValueEx(hRegistry,"",0,REG_SZ,(const BYTE*)szTemp,(DWORD)strlen(szTemp)+1); + RegCloseKey(hRegistry); CLogDisplay::Instance().AddEntry("[OK] File assocations have been registered", D3DCOLOR_ARGB(0xFF,0,0xFF,0)); @@ -124,19 +122,19 @@ void MakeFileAssociations() { CLogDisplay::Instance().AddEntry(tmp.data,D3DCOLOR_ARGB(0xFF,0,0xFF,0)); } - //------------------------------------------------------------------------------- // Handle command line parameters // // The function loads an asset specified on the command line as first argument // Other command line parameters are not handled //------------------------------------------------------------------------------- -void HandleCommandLine(char* p_szCommand) -{ +void HandleCommandLine(char* p_szCommand) { char* sz = p_szCommand; //bool bQuak = false; - if (strlen(sz) < 2)return; + if (strlen(sz) < 2) { + return; + } if (*sz == '\"') { char* sz2 = strrchr(sz,'\"'); @@ -157,8 +155,7 @@ void HandleCommandLine(char* p_szCommand) //------------------------------------------------------------------------------- // Load the light colors from the registry //------------------------------------------------------------------------------- -void LoadLightColors() -{ +void LoadLightColors() { DWORD dwTemp = 4; RegQueryValueEx(g_hRegistry,"LightColor0",NULL,NULL, (BYTE*)&g_avLightColors[0],&dwTemp); RegQueryValueEx(g_hRegistry,"LightColor1",NULL,NULL, (BYTE*)&g_avLightColors[1],&dwTemp); @@ -168,8 +165,7 @@ void LoadLightColors() //------------------------------------------------------------------------------- // Save the light colors to the registry //------------------------------------------------------------------------------- -void SaveLightColors() -{ +void SaveLightColors() { RegSetValueExA(g_hRegistry,"LightColor0",0,REG_DWORD,(const BYTE*)&g_avLightColors[0],4); RegSetValueExA(g_hRegistry,"LightColor1",0,REG_DWORD,(const BYTE*)&g_avLightColors[1],4); RegSetValueExA(g_hRegistry,"LightColor2",0,REG_DWORD,(const BYTE*)&g_avLightColors[2],4); @@ -178,8 +174,7 @@ void SaveLightColors() //------------------------------------------------------------------------------- // Save the checker pattern colors to the registry //------------------------------------------------------------------------------- -void SaveCheckerPatternColors() -{ +void SaveCheckerPatternColors() { // we have it as float4. save it as binary value --. RegSetValueExA(g_hRegistry,"CheckerPattern0",0,REG_BINARY, (const BYTE*)CDisplay::Instance().GetFirstCheckerColor(), @@ -193,8 +188,7 @@ void SaveCheckerPatternColors() //------------------------------------------------------------------------------- // Load the checker pattern colors from the registry //------------------------------------------------------------------------------- -void LoadCheckerPatternColors() -{ +void LoadCheckerPatternColors() { DWORD dwTemp = sizeof(D3DXVECTOR3); RegQueryValueEx(g_hRegistry,"CheckerPattern0",NULL,NULL, (BYTE*) /* jep, this is evil */ CDisplay::Instance().GetFirstCheckerColor(),&dwTemp); @@ -206,8 +200,7 @@ void LoadCheckerPatternColors() //------------------------------------------------------------------------------- // Changed pp setup //------------------------------------------------------------------------------- -void UpdatePPSettings() -{ +void UpdatePPSettings() { DWORD dwValue = ppsteps; RegSetValueExA(g_hRegistry,"PostProcessing",0,REG_DWORD,(const BYTE*)&dwValue,4); UpdateWindow(g_hDlg); @@ -216,8 +209,7 @@ void UpdatePPSettings() //------------------------------------------------------------------------------- // Toggle the "Display Normals" state //------------------------------------------------------------------------------- -void ToggleNormals() -{ +void ToggleNormals() { g_sOptions.bRenderNormals = !g_sOptions.bRenderNormals; // store this in the registry, too @@ -226,97 +218,72 @@ void ToggleNormals() RegSetValueExA(g_hRegistry,"RenderNormals",0,REG_DWORD,(const BYTE*)&dwValue,4); } +static void storeRegKey(bool option, LPCSTR name) { + // store this in the registry, too + DWORD dwValue = 0; + if (option) { + dwValue = 1; + } + RegSetValueExA(g_hRegistry, name, 0, REG_DWORD, (const BYTE*)&dwValue, 4); + +} //------------------------------------------------------------------------------- // Toggle the "AutoRotate" state //------------------------------------------------------------------------------- -void ToggleAutoRotate() -{ +void ToggleAutoRotate() { g_sOptions.bRotate = !g_sOptions.bRotate; - - // store this in the registry, too - DWORD dwValue = 0; - if (g_sOptions.bRotate)dwValue = 1; - RegSetValueExA(g_hRegistry,"AutoRotate",0,REG_DWORD,(const BYTE*)&dwValue,4); + storeRegKey(g_sOptions.bRotate, "AutoRotate"); UpdateWindow(g_hDlg); } //------------------------------------------------------------------------------- // Toggle the "FPS" state //------------------------------------------------------------------------------- -void ToggleFPSView() -{ +void ToggleFPSView() { g_bFPSView = !g_bFPSView; SetupFPSView(); - - // store this in the registry, too - DWORD dwValue = 0; - if (g_bFPSView)dwValue = 1; - RegSetValueExA(g_hRegistry,"FPSView",0,REG_DWORD,(const BYTE*)&dwValue,4); + storeRegKey(g_bFPSView, "FPSView"); } //------------------------------------------------------------------------------- // Toggle the "2 Light sources" state //------------------------------------------------------------------------------- -void ToggleMultipleLights() -{ +void ToggleMultipleLights() { g_sOptions.b3Lights = !g_sOptions.b3Lights; - - // store this in the registry, too - DWORD dwValue = 0; - if (g_sOptions.b3Lights)dwValue = 1; - RegSetValueExA(g_hRegistry,"MultipleLights",0,REG_DWORD,(const BYTE*)&dwValue,4); + storeRegKey(g_sOptions.b3Lights, "MultipleLights"); } //------------------------------------------------------------------------------- // Toggle the "LightRotate" state //------------------------------------------------------------------------------- -void ToggleLightRotate() -{ +void ToggleLightRotate() { g_sOptions.bLightRotate = !g_sOptions.bLightRotate; - - // store this in the registry, too - DWORD dwValue = 0; - if (g_sOptions.bLightRotate)dwValue = 1; - RegSetValueExA(g_hRegistry,"LightRotate",0,REG_DWORD,(const BYTE*)&dwValue,4); + storeRegKey(g_sOptions.bLightRotate, "LightRotate"); } //------------------------------------------------------------------------------- // Toggle the "NoTransparency" state //------------------------------------------------------------------------------- -void ToggleTransparency() -{ +void ToggleTransparency() { g_sOptions.bNoAlphaBlending = !g_sOptions.bNoAlphaBlending; - - // store this in the registry, too - DWORD dwValue = 0; - if (g_sOptions.bNoAlphaBlending)dwValue = 1; - RegSetValueExA(g_hRegistry,"NoTransparency",0,REG_DWORD,(const BYTE*)&dwValue,4); + storeRegKey(g_sOptions.bNoAlphaBlending, "NoTransparency"); } //------------------------------------------------------------------------------- // Toggle the "LowQuality" state //------------------------------------------------------------------------------- -void ToggleLowQuality() -{ +void ToggleLowQuality() { g_sOptions.bLowQuality = !g_sOptions.bLowQuality; - - // store this in the registry, too - DWORD dwValue = 0; - if (g_sOptions.bLowQuality)dwValue = 1; - RegSetValueExA(g_hRegistry,"LowQuality",0,REG_DWORD,(const BYTE*)&dwValue,4); + storeRegKey(g_sOptions.bLowQuality, "LowQuality"); } //------------------------------------------------------------------------------- // Toggle the "Specular" state //------------------------------------------------------------------------------- -void ToggleSpecular() -{ +void ToggleSpecular() { g_sOptions.bNoSpecular = !g_sOptions.bNoSpecular; - // store this in the registry, too - DWORD dwValue = 0; - if (g_sOptions.bNoSpecular)dwValue = 1; - RegSetValueExA(g_hRegistry,"NoSpecular",0,REG_DWORD,(const BYTE*)&dwValue,4); + storeRegKey(g_sOptions.bNoSpecular, "NoSpecular"); // update all specular materials CMaterialManager::Instance().UpdateSpecularMaterials(); @@ -325,14 +292,10 @@ void ToggleSpecular() //------------------------------------------------------------------------------- // Toggle the "RenderMats" state //------------------------------------------------------------------------------- -void ToggleMats() -{ +void ToggleMats() { g_sOptions.bRenderMats = !g_sOptions.bRenderMats; - // store this in the registry, too - DWORD dwValue = 0; - if (g_sOptions.bRenderMats)dwValue = 1; - RegSetValueExA(g_hRegistry,"RenderMats",0,REG_DWORD,(const BYTE*)&dwValue,4); + storeRegKey(g_sOptions.bRenderMats, "RenderMats"); // update all specular materials CMaterialManager::Instance().UpdateSpecularMaterials(); @@ -341,55 +304,40 @@ void ToggleMats() //------------------------------------------------------------------------------- // Toggle the "Culling" state //------------------------------------------------------------------------------- -void ToggleCulling() -{ +void ToggleCulling() { g_sOptions.bCulling = !g_sOptions.bCulling; - - // store this in the registry, too - DWORD dwValue = 0; - if (g_sOptions.bCulling)dwValue = 1; - RegSetValueExA(g_hRegistry,"Culling",0,REG_DWORD,(const BYTE*)&dwValue,4); + storeRegKey(g_sOptions.bCulling, "Culling"); } //------------------------------------------------------------------------------- // Toggle the "Skeleton" state //------------------------------------------------------------------------------- -void ToggleSkeleton() -{ +void ToggleSkeleton() { g_sOptions.bSkeleton = !g_sOptions.bSkeleton; - - // store this in the registry, too - DWORD dwValue = 0; - if (g_sOptions.bCulling)dwValue = 1; - RegSetValueExA(g_hRegistry,"Skeleton",0,REG_DWORD,(const BYTE*)&dwValue,4); + storeRegKey(g_sOptions.bSkeleton, "Skeleton"); } //------------------------------------------------------------------------------- // Toggle the "WireFrame" state //------------------------------------------------------------------------------- -void ToggleWireFrame() -{ - if (g_sOptions.eDrawMode == RenderOptions::WIREFRAME) +void ToggleWireFrame() { + if (g_sOptions.eDrawMode == RenderOptions::WIREFRAME) { g_sOptions.eDrawMode = RenderOptions::NORMAL; - else g_sOptions.eDrawMode = RenderOptions::WIREFRAME; + } else { + g_sOptions.eDrawMode = RenderOptions::WIREFRAME; + } - // store this in the registry, too - DWORD dwValue = 0; - if (RenderOptions::WIREFRAME == g_sOptions.eDrawMode)dwValue = 1; - RegSetValueExA(g_hRegistry,"Wireframe",0,REG_DWORD,(const BYTE*)&dwValue,4); + storeRegKey(RenderOptions::WIREFRAME == g_sOptions.eDrawMode, "Wireframe"); } - //------------------------------------------------------------------------------- // Toggle the "MultiSample" state //------------------------------------------------------------------------------- -void ToggleMS() -{ +void ToggleMS() { g_sOptions.bMultiSample = !g_sOptions.bMultiSample; DeleteAssetData(); ShutdownDevice(); - if (0 == CreateDevice()) - { + if (0 == CreateDevice()) { CLogDisplay::Instance().AddEntry( "[ERROR] Failed to toggle MultiSampling mode"); g_sOptions.bMultiSample = !g_sOptions.bMultiSample; @@ -397,28 +345,21 @@ void ToggleMS() } CreateAssetData(); - if (g_sOptions.bMultiSample) - { + if (g_sOptions.bMultiSample) { CLogDisplay::Instance().AddEntry( "[OK] Changed MultiSampling mode to the maximum value for this device"); - } - else - { + } else { CLogDisplay::Instance().AddEntry( "[OK] MultiSampling has been disabled"); } - // store this in the registry, too - DWORD dwValue = 0; - if (g_sOptions.bMultiSample)dwValue = 1; - RegSetValueExA(g_hRegistry,"MultiSampling",0,REG_DWORD,(const BYTE*)&dwValue,4); + storeRegKey(g_sOptions.bMultiSample, "MultiSampling"); } //------------------------------------------------------------------------------- // Expand or collapse the UI //------------------------------------------------------------------------------- -void ToggleUIState() -{ +void ToggleUIState() { // adjust the size RECT sRect; GetWindowRect(g_hDlg,&sRect); @@ -430,46 +371,33 @@ void ToggleUIState() sRect2.left -= sRect.left; sRect2.top -= sRect.top; - DWORD dwValue; - if (BST_UNCHECKED == IsDlgButtonChecked(g_hDlg,IDC_BLUBB)) - { + if (BST_UNCHECKED == IsDlgButtonChecked(g_hDlg,IDC_BLUBB)) { SetWindowPos(g_hDlg,NULL,0,0,sRect.right-214,sRect.bottom, SWP_NOMOVE | SWP_NOZORDER); - dwValue = 0; SetWindowText(GetDlgItem(g_hDlg,IDC_BLUBB),">>"); - RegSetValueExA(g_hRegistry,"LastUIState",0,REG_DWORD,(const BYTE*)&dwValue,4); - } - else - { + storeRegKey(false, "MultiSampling"); + } else { SetWindowPos(g_hDlg,NULL,0,0,sRect.right+214,sRect.bottom, SWP_NOMOVE | SWP_NOZORDER); - dwValue = 1; + storeRegKey(true, "LastUIState"); SetWindowText(GetDlgItem(g_hDlg,IDC_BLUBB),"<<"); - RegSetValueExA(g_hRegistry,"LastUIState",0,REG_DWORD,(const BYTE*)&dwValue,4); } UpdateWindow(g_hDlg); - return; } - //------------------------------------------------------------------------------- -// Load the background texture for the cviewer +// Load the background texture for the viewer //------------------------------------------------------------------------------- -void LoadBGTexture() -{ +void LoadBGTexture() { char szFileName[MAX_PATH]; DWORD dwTemp = MAX_PATH; - if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"TextureSrc",NULL,NULL, - (BYTE*)szFileName,&dwTemp)) - { + if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"TextureSrc",NULL,NULL, (BYTE*)szFileName,&dwTemp)) { // Key was not found. Use C: strcpy(szFileName,""); - } - else - { + } else { // need to remove the file name char* sz = strrchr(szFileName,'\\'); if (!sz) @@ -495,14 +423,12 @@ void LoadBGTexture() RegSetValueExA(g_hRegistry,"LastSkyBoxSrc",0,REG_SZ,(const BYTE*)"",MAX_PATH); CBackgroundPainter::Instance().SetTextureBG(szFileName); - return; } //------------------------------------------------------------------------------- // Reset the background color to a smart and nice grey //------------------------------------------------------------------------------- -void ClearBG() -{ +void ClearBG() { D3DCOLOR clrColor = D3DCOLOR_ARGB(0xFF,100,100,100); CBackgroundPainter::Instance().SetColor(clrColor); @@ -510,14 +436,12 @@ void ClearBG() RegSetValueExA(g_hRegistry,"LastTextureSrc",0,REG_SZ,(const BYTE*)"",MAX_PATH); RegSetValueExA(g_hRegistry,"Color",0,REG_DWORD,(const BYTE*)&clrColor,4); - return; } //------------------------------------------------------------------------------- // Let the user choose a color in a windows standard color dialog //------------------------------------------------------------------------------- -void DisplayColorDialog(D3DCOLOR* pclrResult) -{ +void DisplayColorDialog(D3DCOLOR* pclrResult) { CHOOSECOLOR clr; clr.lStructSize = sizeof(CHOOSECOLOR); clr.hwndOwner = g_hDlg; @@ -534,15 +458,12 @@ void DisplayColorDialog(D3DCOLOR* pclrResult) GetRValue(clr.rgbResult), GetGValue(clr.rgbResult), GetBValue(clr.rgbResult)); - return; } - //------------------------------------------------------------------------------- // Let the user choose a color in a windows standard color dialog //------------------------------------------------------------------------------- -void DisplayColorDialog(D3DXVECTOR4* pclrResult) -{ +void DisplayColorDialog(D3DXVECTOR4* pclrResult) { CHOOSECOLOR clr; clr.lStructSize = sizeof(CHOOSECOLOR); clr.hwndOwner = g_hDlg; @@ -560,14 +481,12 @@ void DisplayColorDialog(D3DXVECTOR4* pclrResult) pclrResult->x = GetRValue(clr.rgbResult) / 255.0f; pclrResult->y = GetGValue(clr.rgbResult) / 255.0f; pclrResult->z = GetBValue(clr.rgbResult) / 255.0f; - return; } //------------------------------------------------------------------------------- -// Let the user choose the baclground color for the viewer +// Let the user choose the background color for the viewer //------------------------------------------------------------------------------- -void ChooseBGColor() -{ +void ChooseBGColor() { RegSetValueExA(g_hRegistry,"LastSkyBoxSrc",0,REG_SZ,(const BYTE*)"",MAX_PATH); RegSetValueExA(g_hRegistry,"LastTextureSrc",0,REG_SZ,(const BYTE*)"",MAX_PATH); @@ -576,14 +495,12 @@ void ChooseBGColor() CBackgroundPainter::Instance().SetColor(clrColor); RegSetValueExA(g_hRegistry,"Color",0,REG_DWORD,(const BYTE*)&clrColor,4); - return; } //------------------------------------------------------------------------------- // Display the OpenFile dialog and let the user choose a new slybox as bg //------------------------------------------------------------------------------- -void LoadSkybox() -{ +void LoadSkybox() { char szFileName[MAX_PATH]; DWORD dwTemp = MAX_PATH; @@ -622,23 +539,26 @@ void LoadSkybox() return; } +template +inline +void SaveRelease(T **iface ) { + if (nullptr != iface) { + (*iface)->Release(); + *iface = nullptr; + } +} //------------------------------------------------------------------------------- -// Sace a screenshot to an user-defined file +// Save a screenshot to an user-defined file //------------------------------------------------------------------------------- -void SaveScreenshot() -{ +void SaveScreenshot() { char szFileName[MAX_PATH]; DWORD dwTemp = MAX_PATH; - if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"ScreenShot",NULL,NULL, - (BYTE*)szFileName,&dwTemp)) - { + if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"ScreenShot",NULL,NULL, (BYTE*)szFileName,&dwTemp)) { // Key was not found. Use C: strcpy(szFileName,""); - } - else - { + } else { // need to remove the file name char* sz = strrchr(szFileName,'\\'); if (!sz) @@ -662,49 +582,42 @@ void SaveScreenshot() IDirect3DSurface9* pi = NULL; g_piDevice->GetRenderTarget(0,&pi); - if(!pi || FAILED(D3DXSaveSurfaceToFile(szFileName,D3DXIFF_PNG,pi,NULL,NULL))) - { + if(!pi || FAILED(D3DXSaveSurfaceToFile(szFileName,D3DXIFF_PNG,pi,NULL,NULL))) { CLogDisplay::Instance().AddEntry("[ERROR] Unable to save screenshot", D3DCOLOR_ARGB(0xFF,0xFF,0,0)); - } - else - { + } else { CLogDisplay::Instance().AddEntry("[INFO] The screenshot has been saved", D3DCOLOR_ARGB(0xFF,0xFF,0xFF,0)); } - if(pi)pi->Release(); - return; + SaveRelease(&pi); } //------------------------------------------------------------------------------- // Get the amount of memory required for textures //------------------------------------------------------------------------------- -void AddTextureMem(IDirect3DTexture9* pcTex, unsigned int& out) -{ - if (!pcTex)return; +void AddTextureMem(IDirect3DTexture9* pcTex, unsigned int& out) { + if (!pcTex) { + return; + } D3DSURFACE_DESC sDesc; pcTex->GetLevelDesc(0,&sDesc); out += (sDesc.Width * sDesc.Height) << 2; - return; } //------------------------------------------------------------------------------- // Display memory statistics //------------------------------------------------------------------------------- -void DisplayMemoryConsumption() -{ +void DisplayMemoryConsumption() { // first get the memory consumption for the aiScene - if (! g_pcAsset ||!g_pcAsset->pcScene) - { + if (! g_pcAsset ||!g_pcAsset->pcScene) { MessageBox(g_hDlg,"No asset is loaded. Can you guess how much memory I need to store nothing?", "Memory consumption",MB_OK); return; } unsigned int iScene = sizeof(aiScene); - for (unsigned int i = 0; i < g_pcAsset->pcScene->mNumMeshes;++i) - { + for (unsigned int i = 0; i < g_pcAsset->pcScene->mNumMeshes;++i) { iScene += sizeof(aiMesh); if (g_pcAsset->pcScene->mMeshes[i]->HasPositions()) iScene += sizeof(aiVector3D) * g_pcAsset->pcScene->mMeshes[i]->mNumVertices; @@ -715,22 +628,20 @@ void DisplayMemoryConsumption() if (g_pcAsset->pcScene->mMeshes[i]->HasTangentsAndBitangents()) iScene += sizeof(aiVector3D) * g_pcAsset->pcScene->mMeshes[i]->mNumVertices * 2; - for (unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS;++a) - { - if (g_pcAsset->pcScene->mMeshes[i]->HasVertexColors(a)) + for (unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS;++a) { + if (g_pcAsset->pcScene->mMeshes[i]->HasVertexColors(a)) { iScene += sizeof(aiColor4D) * g_pcAsset->pcScene->mMeshes[i]->mNumVertices; - else break; + } else { + break; + } } - for (unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS;++a) - { + for (unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS;++a) { if (g_pcAsset->pcScene->mMeshes[i]->HasTextureCoords(a)) iScene += sizeof(aiVector3D) * g_pcAsset->pcScene->mMeshes[i]->mNumVertices; else break; } - if (g_pcAsset->pcScene->mMeshes[i]->HasBones()) - { - for (unsigned int p = 0; p < g_pcAsset->pcScene->mMeshes[i]->mNumBones;++p) - { + if (g_pcAsset->pcScene->mMeshes[i]->HasBones()) { + for (unsigned int p = 0; p < g_pcAsset->pcScene->mMeshes[i]->mNumBones;++p) { iScene += sizeof(aiBone); iScene += g_pcAsset->pcScene->mMeshes[i]->mBones[p]->mNumWeights * sizeof(aiVertexWeight); } @@ -738,22 +649,20 @@ void DisplayMemoryConsumption() iScene += (sizeof(aiFace) + 3 * sizeof(unsigned int))*g_pcAsset->pcScene->mMeshes[i]->mNumFaces; } // add all embedded textures - for (unsigned int i = 0; i < g_pcAsset->pcScene->mNumTextures;++i) - { + for (unsigned int i = 0; i < g_pcAsset->pcScene->mNumTextures;++i) { const aiTexture* pc = g_pcAsset->pcScene->mTextures[i]; - if (0 != pc->mHeight) - { + if (0 != pc->mHeight) { iScene += 4 * pc->mHeight * pc->mWidth; + } else { + iScene += pc->mWidth; } - else iScene += pc->mWidth; } // add 30k for each material ... a string has 4k for example iScene += g_pcAsset->pcScene->mNumMaterials * 30 * 1024; // now get the memory consumption required by D3D, first all textures unsigned int iTexture = 0; - for (unsigned int i = 0; i < g_pcAsset->pcScene->mNumMeshes;++i) - { + for (unsigned int i = 0; i < g_pcAsset->pcScene->mNumMeshes;++i) { AssetHelper::MeshHelper* pc = g_pcAsset->apcMeshes[i]; AddTextureMem(pc->piDiffuseTexture,iTexture); @@ -767,15 +676,13 @@ void DisplayMemoryConsumption() unsigned int iVRAM = iTexture; // now get the memory consumption of all vertex/index buffers - unsigned int iVB = 0; - unsigned int iIB = 0; - for (unsigned int i = 0; i < g_pcAsset->pcScene->mNumMeshes;++i) - { + unsigned int iVB( 0 ), iIB(0); + for (unsigned int i = 0; i < g_pcAsset->pcScene->mNumMeshes;++i) { AssetHelper:: MeshHelper* pc = g_pcAsset->apcMeshes[i]; union{ - D3DVERTEXBUFFER_DESC sDesc; - D3DINDEXBUFFER_DESC sDesc2; + D3DVERTEXBUFFER_DESC sDesc; + D3DINDEXBUFFER_DESC sDesc2; }; if (pc->piVB) @@ -814,36 +721,30 @@ void DisplayMemoryConsumption() iScene / 1024,iTexture / 1024,iVB / 1024,iIB / 1024,iVRAM / 1024, (iScene + iTexture + iVB + iIB + iVRAM) / 1024); MessageBox(g_hDlg,szOut,"Memory consumption",MB_OK); - return; } //------------------------------------------------------------------------------- // Save the list of recent files to the registry //------------------------------------------------------------------------------- -void SaveHistory() -{ - for (unsigned int i = 0; i < AI_VIEW_NUM_RECENT_FILES;++i) - { +void SaveHistory() { + for (unsigned int i = 0; i < AI_VIEW_NUM_RECENT_FILES;++i) { char szName[66]; sprintf(szName,"Recent%i",i+1); RegSetValueEx(g_hRegistry,szName,0,REG_SZ, (const BYTE*)g_aPreviousFiles[i].c_str(),(DWORD)g_aPreviousFiles[i].length()); } - return; } //------------------------------------------------------------------------------- // Recover the file history //------------------------------------------------------------------------------- -void LoadHistory() -{ +void LoadHistory() { g_aPreviousFiles.resize(AI_VIEW_NUM_RECENT_FILES); char szFileName[MAX_PATH]; - for (unsigned int i = 0; i < AI_VIEW_NUM_RECENT_FILES;++i) - { + for (unsigned int i = 0; i < AI_VIEW_NUM_RECENT_FILES;++i) { char szName[66]; sprintf(szName,"Recent%i",i+1); @@ -851,20 +752,17 @@ void LoadHistory() szFileName[0] ='\0'; if(ERROR_SUCCESS == RegQueryValueEx(g_hRegistry,szName,NULL,NULL, - (BYTE*)szFileName,&dwTemp)) - { + (BYTE*)szFileName,&dwTemp)) { g_aPreviousFiles[i] = std::string(szFileName); } } // add sub items for all recent files g_hHistoryMenu = CreateMenu(); - for (int i = AI_VIEW_NUM_RECENT_FILES-1; i >= 0;--i) - { + for (int i = AI_VIEW_NUM_RECENT_FILES-1; i >= 0;--i) { const char* szText = g_aPreviousFiles[i].c_str(); UINT iFlags = 0; - if ('\0' == *szText) - { + if ('\0' == *szText) { szText = ""; iFlags = MF_GRAYED | MF_DISABLED; } @@ -873,19 +771,17 @@ void LoadHistory() ModifyMenu(GetMenu(g_hDlg),ID_VIEWER_RECENTFILES,MF_BYCOMMAND | MF_POPUP, (UINT_PTR)g_hHistoryMenu,"Recent files"); - return; } //------------------------------------------------------------------------------- // Clear the file history //------------------------------------------------------------------------------- -void ClearHistory() -{ - for(unsigned int i = 0; i < AI_VIEW_NUM_RECENT_FILES;++i) +void ClearHistory() { + for (unsigned int i = 0; i < AI_VIEW_NUM_RECENT_FILES; ++i) { g_aPreviousFiles[i] = std::string(""); + } - for (int i = AI_VIEW_NUM_RECENT_FILES-1; i >= 0;--i) - { + for (int i = AI_VIEW_NUM_RECENT_FILES-1; i >= 0;--i) { ModifyMenu(g_hHistoryMenu,AI_VIEW_RECENT_FILE_ID(i), MF_STRING | MF_BYCOMMAND | MF_GRAYED | MF_DISABLED,AI_VIEW_RECENT_FILE_ID(i),""); } @@ -896,50 +792,44 @@ void ClearHistory() //------------------------------------------------------------------------------- // Update the file history //------------------------------------------------------------------------------- -void UpdateHistory() -{ - if(!g_hHistoryMenu)return; +void UpdateHistory() { + if (!g_hHistoryMenu) { + return; + } std::string sz = std::string(g_szFileName); - if (g_aPreviousFiles[AI_VIEW_NUM_RECENT_FILES-1] == sz)return; + if (g_aPreviousFiles[AI_VIEW_NUM_RECENT_FILES - 1] == sz) { + return; + } // add the new asset to the list of recent files - for (unsigned int i = 0; i < AI_VIEW_NUM_RECENT_FILES-1;++i) - { + for (unsigned int i = 0; i < AI_VIEW_NUM_RECENT_FILES-1;++i) { g_aPreviousFiles[i] = g_aPreviousFiles[i+1]; } g_aPreviousFiles[AI_VIEW_NUM_RECENT_FILES-1] = sz; - for (int i = AI_VIEW_NUM_RECENT_FILES-1; i >= 0;--i) - { + for (int i = AI_VIEW_NUM_RECENT_FILES-1; i >= 0;--i) { const char* szText = g_aPreviousFiles[i].c_str(); UINT iFlags = 0; - if ('\0' == *szText) - { + if ('\0' == *szText) { szText = ""; iFlags = MF_GRAYED | MF_DISABLED; } ModifyMenu(g_hHistoryMenu,AI_VIEW_RECENT_FILE_ID(i), MF_STRING | MF_BYCOMMAND | iFlags,AI_VIEW_RECENT_FILE_ID(i),szText); } - return; } //------------------------------------------------------------------------------- // Open a new asset //------------------------------------------------------------------------------- -void OpenAsset() -{ +void OpenAsset() { char szFileName[MAX_PATH]; DWORD dwTemp = MAX_PATH; - if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"CurrentApp",NULL,NULL, - (BYTE*)szFileName,&dwTemp)) - { + if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"CurrentApp",NULL,NULL, (BYTE*)szFileName,&dwTemp)) { // Key was not found. Use C: strcpy(szFileName,""); - } - else - { + } else { // need to remove the file name char* sz = strrchr(szFileName,'\\'); if (!sz) @@ -962,21 +852,28 @@ void OpenAsset() strcpy(szCur,"*.*"); szCur[4] = 0; - OPENFILENAME sFilename1 = { - sizeof(OPENFILENAME), - g_hDlg,GetModuleHandle(NULL), szList, NULL, 0, 1, - szFileName, MAX_PATH, NULL, 0, NULL, - "Import Asset into ASSIMP", - OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_NOCHANGEDIR, - 0, 1, ".x", 0, NULL, NULL - }; - if(GetOpenFileName(&sFilename1) == 0) return; + OPENFILENAME sFilename1; + ZeroMemory(&sFilename1, sizeof(sFilename1)); + sFilename1.lStructSize = sizeof(sFilename1); + sFilename1.hwndOwner = g_hDlg; + sFilename1.hInstance = GetModuleHandle(NULL); + sFilename1.lpstrFile = szFileName; + sFilename1.lpstrFile[0] = '\0'; + sFilename1.nMaxFile = sizeof(szList); + sFilename1.lpstrFilter = szList; + sFilename1.nFilterIndex = 1; + sFilename1.lpstrFileTitle = NULL; + sFilename1.nMaxFileTitle = 0; + sFilename1.lpstrInitialDir = NULL; + sFilename1.Flags = OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + if (GetOpenFileName(&sFilename1) == 0) { + return; + } // Now store the file in the registry RegSetValueExA(g_hRegistry,"CurrentApp",0,REG_SZ,(const BYTE*)szFileName,MAX_PATH); - if (0 != strcmp(g_szFileName,szFileName)) - { + if (0 != strcmp(g_szFileName,szFileName)) { strcpy(g_szFileName, szFileName); DeleteAssetData(); DeleteAsset(); @@ -988,13 +885,10 @@ void OpenAsset() // Save the list of previous files to the registry SaveHistory(); } - return; } //------------------------------------------------------------------------------- -void SetupPPUIState() -{ - +void SetupPPUIState() { // that's ugly. anyone willing to rewrite me from scratch? HMENU hMenu = GetMenu(g_hDlg); CheckMenuItem(hMenu,ID_VIEWER_PP_JIV,ppsteps & aiProcess_JoinIdenticalVertices ? MF_CHECKED : MF_UNCHECKED); @@ -1018,13 +912,11 @@ void SetupPPUIState() //------------------------------------------------------------------------------- // Fill the 'export' top level menu with a list of all supported export formats //------------------------------------------------------------------------------- -void PopulateExportMenu() -{ +void PopulateExportMenu() { // add sub items for all recent files Exporter exp; HMENU hm = ::CreateMenu(); - for(size_t i = 0; i < exp.GetExportFormatCount(); ++i) - { + for(size_t i = 0; i < exp.GetExportFormatCount(); ++i) { const aiExportFormatDesc* const e = exp.GetExportFormatDescription(i); char tmp[256]; sprintf(tmp,"%s (%s)",e->description,e->id); @@ -1037,9 +929,9 @@ void PopulateExportMenu() } //------------------------------------------------------------------------------- +// Export function //------------------------------------------------------------------------------- -void DoExport(size_t formatId) -{ +void DoExport(size_t formatId) { if (!g_szFileName[0]) { MessageBox(g_hDlg, "No model loaded", "Export", MB_ICONERROR); return; @@ -1122,8 +1014,7 @@ void DoExport(size_t formatId) //------------------------------------------------------------------------------- // Initialize the user interface //------------------------------------------------------------------------------- -void InitUI() -{ +void InitUI() { SetDlgItemText(g_hDlg,IDC_EVERT,"0"); SetDlgItemText(g_hDlg,IDC_EFACE,"0"); SetDlgItemText(g_hDlg,IDC_EMAT,"0"); @@ -1147,13 +1038,10 @@ void InitUI() RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\ASSIMP\\Viewer", 0,NULL,0,KEY_ALL_ACCESS, NULL, &g_hRegistry,NULL); - if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"LastUIState",NULL,NULL, - (BYTE*)&dwValue,&dwTemp)) - { + if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"LastUIState",NULL,NULL, (BYTE*)&dwValue,&dwTemp)) { dwValue = 1; } - if (0 == dwValue) - { + if (0 == dwValue) { // collapse the viewer // adjust the size RECT sRect; @@ -1169,22 +1057,17 @@ void InitUI() SetWindowPos(g_hDlg,NULL,0,0,sRect.right-214,sRect.bottom, SWP_NOMOVE | SWP_NOZORDER); SetWindowText(GetDlgItem(g_hDlg,IDC_BLUBB),">>"); - } - else - { + } else { CheckDlgButton(g_hDlg,IDC_BLUBB,BST_CHECKED); } // AutoRotate if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"AutoRotate",NULL,NULL, (BYTE*)&dwValue,&dwTemp))dwValue = 0; - if (0 == dwValue) - { + if (0 == dwValue) { g_sOptions.bRotate = false; CheckDlgButton(g_hDlg,IDC_AUTOROTATE,BST_UNCHECKED); - } - else - { + } else { g_sOptions.bRotate = true; CheckDlgButton(g_hDlg,IDC_AUTOROTATE,BST_CHECKED); } @@ -1192,13 +1075,10 @@ void InitUI() // MultipleLights if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"MultipleLights",NULL,NULL, (BYTE*)&dwValue,&dwTemp))dwValue = 0; - if (0 == dwValue) - { + if (0 == dwValue) { g_sOptions.b3Lights = false; CheckDlgButton(g_hDlg,IDC_3LIGHTS,BST_UNCHECKED); - } - else - { + } else { g_sOptions.b3Lights = true; CheckDlgButton(g_hDlg,IDC_3LIGHTS,BST_CHECKED); } @@ -1206,27 +1086,22 @@ void InitUI() // Light rotate if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"LightRotate",NULL,NULL, (BYTE*)&dwValue,&dwTemp))dwValue = 0; - if (0 == dwValue) - { + if (0 == dwValue) { g_sOptions.bLightRotate = false; CheckDlgButton(g_hDlg,IDC_LIGHTROTATE,BST_UNCHECKED); - } - else - { + } else { g_sOptions.bLightRotate = true; CheckDlgButton(g_hDlg,IDC_LIGHTROTATE,BST_CHECKED); } // NoSpecular - if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"NoSpecular",NULL,NULL, - (BYTE*)&dwValue,&dwTemp))dwValue = 0; - if (0 == dwValue) - { + if (ERROR_SUCCESS != RegQueryValueEx(g_hRegistry, "NoSpecular", NULL, NULL, (BYTE*)&dwValue, &dwTemp)) { + dwValue = 0; + } + if (0 == dwValue) { g_sOptions.bNoSpecular = false; CheckDlgButton(g_hDlg,IDC_NOSPECULAR,BST_UNCHECKED); - } - else - { + } else { g_sOptions.bNoSpecular = true; CheckDlgButton(g_hDlg,IDC_NOSPECULAR,BST_CHECKED); } @@ -1234,13 +1109,10 @@ void InitUI() // LowQuality if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"LowQuality",NULL,NULL, (BYTE*)&dwValue,&dwTemp))dwValue = 0; - if (0 == dwValue) - { + if (0 == dwValue) { g_sOptions.bLowQuality = false; CheckDlgButton(g_hDlg,IDC_LOWQUALITY,BST_UNCHECKED); - } - else - { + } else { g_sOptions.bLowQuality = true; CheckDlgButton(g_hDlg,IDC_LOWQUALITY,BST_CHECKED); } @@ -1248,13 +1120,10 @@ void InitUI() // LowQuality if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"NoTransparency",NULL,NULL, (BYTE*)&dwValue,&dwTemp))dwValue = 0; - if (0 == dwValue) - { + if (0 == dwValue) { g_sOptions.bNoAlphaBlending = false; CheckDlgButton(g_hDlg,IDC_NOAB,BST_UNCHECKED); - } - else - { + } else { g_sOptions.bNoAlphaBlending = true; CheckDlgButton(g_hDlg,IDC_NOAB,BST_CHECKED); } @@ -1262,27 +1131,23 @@ void InitUI() // DisplayNormals if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"RenderNormals",NULL,NULL, (BYTE*)&dwValue,&dwTemp))dwValue = 0; - if (0 == dwValue) - { + if (0 == dwValue) { g_sOptions.bRenderNormals = false; CheckDlgButton(g_hDlg,IDC_TOGGLENORMALS,BST_UNCHECKED); - } - else - { + } else { g_sOptions.bRenderNormals = true; CheckDlgButton(g_hDlg,IDC_TOGGLENORMALS,BST_CHECKED); } // NoMaterials - if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"RenderMats",NULL,NULL, - (BYTE*)&dwValue,&dwTemp))dwValue = 1; - if (0 == dwValue) - { + if (ERROR_SUCCESS != RegQueryValueEx(g_hRegistry, "RenderMats", NULL, NULL, + (BYTE*)&dwValue, &dwTemp)) { + dwValue = 1; + } + if (0 == dwValue) { g_sOptions.bRenderMats = false; CheckDlgButton(g_hDlg,IDC_TOGGLEMAT,BST_CHECKED); - } - else - { + } else { g_sOptions.bRenderMats = true; CheckDlgButton(g_hDlg,IDC_TOGGLEMAT,BST_UNCHECKED); } @@ -1294,9 +1159,7 @@ void InitUI() { g_sOptions.bMultiSample = false; CheckDlgButton(g_hDlg,IDC_TOGGLEMS,BST_UNCHECKED); - } - else - { + } else { g_sOptions.bMultiSample = true; CheckDlgButton(g_hDlg,IDC_TOGGLEMS,BST_CHECKED); } @@ -1304,13 +1167,10 @@ void InitUI() // FPS Mode if(ERROR_SUCCESS != RegQueryValueEx(g_hRegistry,"FPSView",NULL,NULL, (BYTE*)&dwValue,&dwTemp))dwValue = 0; - if (0 == dwValue) - { + if (0 == dwValue) { g_bFPSView = false; CheckDlgButton(g_hDlg,IDC_ZOOM,BST_CHECKED); - } - else - { + } else { g_bFPSView = true; CheckDlgButton(g_hDlg,IDC_ZOOM,BST_UNCHECKED); } @@ -1338,22 +1198,20 @@ void InitUI() SendDlgItemMessage(g_hDlg,IDC_SLIDERANIM,TBM_SETRANGEMIN,TRUE,0); SendDlgItemMessage(g_hDlg,IDC_SLIDERANIM,TBM_SETRANGEMAX,TRUE,10000); - return; } //------------------------------------------------------------------------------- -// Message prcoedure for the smooth normals dialog +// Message procedure for the smooth normals dialog //------------------------------------------------------------------------------- -INT_PTR CALLBACK SMMessageProc(HWND hwndDlg,UINT uMsg, - WPARAM wParam,LPARAM lParam) -{ +INT_PTR CALLBACK SMMessageProc(HWND hwndDlg,UINT uMsg, WPARAM wParam,LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); - switch (uMsg) - { + switch (uMsg) { case WM_INITDIALOG: - char s[30]; - ::sprintf(s,"%.2f",g_smoothAngle); - SetDlgItemText(hwndDlg,IDC_EDITSM,s); + { + char s[30]; + ::sprintf(s, "%.2f", g_smoothAngle); + SetDlgItemText(hwndDlg, IDC_EDITSM, s); + } return TRUE; case WM_CLOSE: @@ -1361,16 +1219,16 @@ INT_PTR CALLBACK SMMessageProc(HWND hwndDlg,UINT uMsg, return TRUE; case WM_COMMAND: + { + if (IDOK == LOWORD(wParam)) { + char s[30]; + GetDlgItemText(hwndDlg, IDC_EDITSM, s, 30); + g_smoothAngle = (float)atof(s); - if (IDOK == LOWORD(wParam)) { - char s[30]; - GetDlgItemText(hwndDlg,IDC_EDITSM,s,30); - g_smoothAngle = (float)atof(s); - - EndDialog(hwndDlg,0); - } - else if (IDCANCEL == LOWORD(wParam)) { - EndDialog(hwndDlg,1); + EndDialog(hwndDlg, 0); + } else if (IDCANCEL == LOWORD(wParam)) { + EndDialog(hwndDlg, 1); + } } return TRUE; } @@ -1385,9 +1243,7 @@ INT_PTR CALLBACK SMMessageProc(HWND hwndDlg,UINT uMsg, // NOTE: Due to the impossibility to process WM_CHAR messages in dialogs // properly the code for all hotkeys has been moved to the WndMain //------------------------------------------------------------------------------- -INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg, - WPARAM wParam,LPARAM lParam) - { +INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg, WPARAM wParam,LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(wParam); @@ -1747,21 +1603,17 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg, case WM_DROPFILES: { HDROP hDrop = (HDROP)wParam; - char szFile[MAX_PATH]; DragQueryFile(hDrop,0,szFile,sizeof(szFile)); - const char* sz = strrchr(szFile,'.'); - if (!sz) + if (!sz) { sz = szFile; + } - if (CDisplay::VIEWMODE_TEXTURE == CDisplay::Instance().GetViewMode()) - { + if (CDisplay::VIEWMODE_TEXTURE == CDisplay::Instance().GetViewMode()) { // replace the selected texture with the new one ... CDisplay::Instance().ReplaceCurrentTexture(szFile); - } - else - { + } else { // check whether it is a typical texture file format ... ++sz; if (0 == ASSIMP_stricmp(sz,"png") || @@ -1803,19 +1655,17 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg, fseek(pFile,112,SEEK_SET); fread(&dwCaps,4,1,pFile); - if (dwCaps & 0x00000400L /* DDSCAPS2_CUBEMAP_POSITIVEX */) - { + if (dwCaps & 0x00000400L /* DDSCAPS2_CUBEMAP_POSITIVEX */) { CLogDisplay::Instance().AddEntry( "[INFO] Assuming this dds file is a skybox ...", D3DCOLOR_ARGB(0xFF,0xFF,0xFF,0)); CBackgroundPainter::Instance().SetCubeMapBG(szFile); + } else { + CBackgroundPainter::Instance().SetTextureBG(szFile); } - else CBackgroundPainter::Instance().SetTextureBG(szFile); fclose(pFile); - } - else - { + } else { strcpy(g_szFileName,szFile); DeleteAsset(); @@ -1830,13 +1680,10 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg, case WM_COMMAND: HMENU hMenu = GetMenu(g_hDlg); - if (ID_VIEWER_QUIT == LOWORD(wParam)) - { + if (ID_VIEWER_QUIT == LOWORD(wParam)) { PostQuitMessage(0); DestroyWindow(hwndDlg); - } - else if (IDC_COMBO1 == LOWORD(wParam)) - { + } else if (IDC_COMBO1 == LOWORD(wParam)) { if(HIWORD(wParam) == CBN_SELCHANGE) { const size_t sel = static_cast(ComboBox_GetCurSel(GetDlgItem(hwndDlg,IDC_COMBO1))); if(g_pcAsset) { @@ -1844,9 +1691,7 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg, SendDlgItemMessage(hwndDlg,IDC_SLIDERANIM,TBM_SETPOS,TRUE,0); } } - } - else if (ID_VIEWER_RESETVIEW == LOWORD(wParam)) - { + } else if (ID_VIEWER_RESETVIEW == LOWORD(wParam)) { g_sCamera.vPos = aiVector3D(0.0f,0.0f,-10.0f); g_sCamera.vLookAt = aiVector3D(0.0f,0.0f,1.0f); g_sCamera.vUp = aiVector3D(0.0f,1.0f,0.0f); @@ -1856,102 +1701,61 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg, // don't forget to reset the st CBackgroundPainter::Instance().ResetSB(); - } - else if (ID__HELP == LOWORD(wParam)) - { + } else if (ID__HELP == LOWORD(wParam)) { DialogBox(g_hInstance,MAKEINTRESOURCE(IDD_AVHELP), hwndDlg,&HelpDialogProc); - } - else if (ID__ABOUT == LOWORD(wParam)) - { + } else if (ID__ABOUT == LOWORD(wParam)) { DialogBox(g_hInstance,MAKEINTRESOURCE(IDD_ABOUTBOX), hwndDlg,&AboutMessageProc); - } - else if (ID_TOOLS_LOGWINDOW == LOWORD(wParam)) - { - CLogWindow::Instance().Show(); - } - else if (ID__WEBSITE == LOWORD(wParam)) - { - ShellExecute(NULL,"open","http://assimp.sourceforge.net","","",SW_SHOW); - } - else if (ID__WEBSITESF == LOWORD(wParam)) - { - ShellExecute(NULL,"open","https://sourceforge.net/projects/assimp","","",SW_SHOW); - } - else if (ID_REPORTBUG == LOWORD(wParam)) - { - ShellExecute(NULL,"open","https://sourceforge.net/tracker/?func=add&group_id=226462&atid=1067632","","",SW_SHOW); - } - else if (ID_FR == LOWORD(wParam)) - { - ShellExecute(NULL,"open","https://sourceforge.net/forum/forum.php?forum_id=817653","","",SW_SHOW); - } - else if (ID_TOOLS_CLEARLOG == LOWORD(wParam)) - { - CLogWindow::Instance().Clear(); - } - else if (ID_TOOLS_SAVELOGTOFILE == LOWORD(wParam)) - { - CLogWindow::Instance().Save(); - } - else if (ID_VIEWER_MEMORYCONSUMATION == LOWORD(wParam)) - { - DisplayMemoryConsumption(); - } - else if (ID_VIEWER_H == LOWORD(wParam)) - { + } else if (ID_TOOLS_LOGWINDOW == LOWORD(wParam)) { + CLogWindow::Instance().Show(); + } else if (ID__WEBSITE == LOWORD(wParam)) { + ShellExecute(NULL,"open","http://assimp.sourceforge.net","","",SW_SHOW); + } else if (ID__WEBSITESF == LOWORD(wParam)) { + ShellExecute(NULL,"open","https://sourceforge.net/projects/assimp","","",SW_SHOW); + } else if (ID_REPORTBUG == LOWORD(wParam)) { + ShellExecute(NULL,"open","https://sourceforge.net/tracker/?func=add&group_id=226462&atid=1067632","","",SW_SHOW); + } else if (ID_FR == LOWORD(wParam)) { + ShellExecute(NULL,"open","https://sourceforge.net/forum/forum.php?forum_id=817653","","",SW_SHOW); + } else if (ID_TOOLS_CLEARLOG == LOWORD(wParam)) { + CLogWindow::Instance().Clear(); + } else if (ID_TOOLS_SAVELOGTOFILE == LOWORD(wParam)) { + CLogWindow::Instance().Save(); + } else if (ID_VIEWER_MEMORYCONSUMATION == LOWORD(wParam)) { + DisplayMemoryConsumption(); + } else if (ID_VIEWER_H == LOWORD(wParam)) { MakeFileAssociations(); - } - else if (ID_BACKGROUND_CLEAR == LOWORD(wParam)) - { + } else if (ID_BACKGROUND_CLEAR == LOWORD(wParam)) { ClearBG(); - } - else if (ID_BACKGROUND_SETCOLOR == LOWORD(wParam)) - { + } else if (ID_BACKGROUND_SETCOLOR == LOWORD(wParam)) { ChooseBGColor(); - } - else if (ID_BACKGROUND_LOADTEXTURE == LOWORD(wParam)) - { + } else if (ID_BACKGROUND_LOADTEXTURE == LOWORD(wParam)) { LoadBGTexture(); - } - else if (ID_BACKGROUND_LOADSKYBOX == LOWORD(wParam)) - { + } else if (ID_BACKGROUND_LOADSKYBOX == LOWORD(wParam)) { LoadSkybox(); - } - else if (ID_VIEWER_SAVESCREENSHOTTOFILE == LOWORD(wParam)) - { + } else if (ID_VIEWER_SAVESCREENSHOTTOFILE == LOWORD(wParam)) { SaveScreenshot(); - } - else if (ID_VIEWER_OPEN == LOWORD(wParam)) - { + } else if (ID_VIEWER_OPEN == LOWORD(wParam)) { OpenAsset(); - } - else if (ID_TOOLS_FLIPNORMALS == LOWORD(wParam)) - { - if (g_pcAsset && g_pcAsset->pcScene) - { + } else if (ID_TOOLS_FLIPNORMALS == LOWORD(wParam)) { + if (g_pcAsset && g_pcAsset->pcScene) { g_pcAsset->FlipNormals(); - } } - + } // this is ugly. anyone willing to rewrite it from scratch using wxwidgets or similar? else if (ID_VIEWER_PP_JIV == LOWORD(wParam)) { ppsteps ^= aiProcess_JoinIdenticalVertices; CheckMenuItem(hMenu,ID_VIEWER_PP_JIV,ppsteps & aiProcess_JoinIdenticalVertices ? MF_CHECKED : MF_UNCHECKED); UpdatePPSettings(); - } - else if (ID_VIEWER_PP_CTS == LOWORD(wParam)) { + } else if (ID_VIEWER_PP_CTS == LOWORD(wParam)) { ppsteps ^= aiProcess_CalcTangentSpace; CheckMenuItem(hMenu,ID_VIEWER_PP_CTS,ppsteps & aiProcess_CalcTangentSpace ? MF_CHECKED : MF_UNCHECKED); UpdatePPSettings(); - } - else if (ID_VIEWER_PP_FD == LOWORD(wParam)) { + } else if (ID_VIEWER_PP_FD == LOWORD(wParam)) { ppsteps ^= aiProcess_FindDegenerates; CheckMenuItem(hMenu,ID_VIEWER_PP_FD,ppsteps & aiProcess_FindDegenerates ? MF_CHECKED : MF_UNCHECKED); UpdatePPSettings(); - } - else if (ID_VIEWER_PP_FID == LOWORD(wParam)) { + } else if (ID_VIEWER_PP_FID == LOWORD(wParam)) { ppsteps ^= aiProcess_FindInvalidData; CheckMenuItem(hMenu,ID_VIEWER_PP_FID,ppsteps & aiProcess_FindInvalidData ? MF_CHECKED : MF_UNCHECKED); UpdatePPSettings(); @@ -2071,34 +1875,25 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg, { g_sOptions.bStereoView =! g_sOptions.bStereoView; - HMENU hMenu = GetMenu(g_hDlg); - if (g_sOptions.bStereoView) - { - ModifyMenu(hMenu,ID_TOOLS_STEREOVIEW, + HMENU menu = ::GetMenu(g_hDlg); + if (g_sOptions.bStereoView) { + ::ModifyMenu(menu,ID_TOOLS_STEREOVIEW, MF_BYCOMMAND | MF_CHECKED | MF_STRING,ID_TOOLS_STEREOVIEW,"Stereo view"); CLogDisplay::Instance().AddEntry("[INFO] Switched to stereo mode", D3DCOLOR_ARGB(0xFF,0xFF,0xFF,0)); - } - else - { - ModifyMenu(hMenu,ID_TOOLS_STEREOVIEW, + } else { + ModifyMenu(menu,ID_TOOLS_STEREOVIEW, MF_BYCOMMAND | MF_UNCHECKED | MF_STRING,ID_TOOLS_STEREOVIEW,"Stereo view"); CLogDisplay::Instance().AddEntry("[INFO] Switched to mono mode", D3DCOLOR_ARGB(0xFF,0xFF,0xFF,0)); } - } - else if (ID_TOOLS_SETANGLELIMIT == LOWORD(wParam)) - { + } else if (ID_TOOLS_SETANGLELIMIT == LOWORD(wParam)) { DialogBox(g_hInstance,MAKEINTRESOURCE(IDD_DIALOGSMOOTH),g_hDlg,&SMMessageProc); - } - else if (ID_VIEWER_CLEARHISTORY == LOWORD(wParam)) - { + } else if (ID_VIEWER_CLEARHISTORY == LOWORD(wParam)) { ClearHistory(); - } - else if (ID_VIEWER_CLOSEASSET == LOWORD(wParam)) - { + } else if (ID_VIEWER_CLOSEASSET == LOWORD(wParam)) { DeleteAssetData(); DeleteAsset(); } @@ -2420,36 +2215,34 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, SetFocus(g_hDlg); // recover background skyboxes/textures from the last session - HKEY g_hRegistry; - union - { + HKEY hRegistry; + union { char szFileName[MAX_PATH]; D3DCOLOR clrColor; - }; + }; DWORD dwTemp = MAX_PATH; RegCreateKeyEx(HKEY_CURRENT_USER, - "Software\\ASSIMP\\Viewer",0,NULL,0,KEY_ALL_ACCESS, NULL, &g_hRegistry,NULL); - if(ERROR_SUCCESS == RegQueryValueEx(g_hRegistry,"LastSkyBoxSrc",NULL,NULL, + "Software\\ASSIMP\\Viewer",0,NULL,0,KEY_ALL_ACCESS, NULL, &hRegistry,NULL); + if(ERROR_SUCCESS == RegQueryValueEx(hRegistry,"LastSkyBoxSrc",NULL,NULL, (BYTE*)szFileName,&dwTemp) && '\0' != szFileName[0]) { CBackgroundPainter::Instance().SetCubeMapBG(szFileName); } - else if(ERROR_SUCCESS == RegQueryValueEx(g_hRegistry,"LastTextureSrc",NULL,NULL, + else if(ERROR_SUCCESS == RegQueryValueEx(hRegistry,"LastTextureSrc",NULL,NULL, (BYTE*)szFileName,&dwTemp) && '\0' != szFileName[0]) { CBackgroundPainter::Instance().SetTextureBG(szFileName); } - else if(ERROR_SUCCESS == RegQueryValueEx(g_hRegistry,"Color",NULL,NULL, + else if(ERROR_SUCCESS == RegQueryValueEx(hRegistry,"Color",NULL,NULL, (BYTE*)&clrColor,&dwTemp)) { CBackgroundPainter::Instance().SetColor(clrColor); } - RegCloseKey(g_hRegistry); + RegCloseKey(hRegistry); // now handle command line arguments HandleCommandLine(lpCmdLine); - double adLast[30]; for (int i = 0; i < 30;++i)adLast[i] = 0.0f; int iCurrent = 0; @@ -2608,7 +2401,6 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // render the scene CDisplay::Instance().OnRender(); - // measure FPS, average it out g_dCurTime = timeGetTime(); g_fElpasedTime = (float)((g_dCurTime - g_dLastTime) * 0.001); @@ -2617,26 +2409,26 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, adLast[iCurrent++] = 1.0f / g_fElpasedTime; double dFPS = 0.0; - for (int i = 0;i < 30;++i) - dFPS += adLast[i]; + for (int i = 0; i < 30; ++i) { + dFPS += adLast[ i ]; + } dFPS /= 30.0; - if (30 == iCurrent) - { + if (30 == iCurrent) { iCurrent = 0; - if (dFPS != g_fFPS) - { + if (dFPS != g_fFPS) { g_fFPS = dFPS; char szOut[256]; sprintf(szOut,"%i",(int)floorf((float)dFPS+0.5f)); SetDlgItemText(g_hDlg,IDC_EFPS,szOut); - } } } + } DeleteAsset(); Assimp::DefaultLogger::kill(); ShutdownDevice(); ShutdownD3D(); + return 0; - } \ No newline at end of file +} diff --git a/tools/assimp_view/Normals.cpp b/tools/assimp_view/Normals.cpp index 240825905..4ce706c6a 100644 --- a/tools/assimp_view/Normals.cpp +++ b/tools/assimp_view/Normals.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -39,11 +39,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------- */ - #include "assimp_view.h" -// note: these are no longer part of the public API, but they are -// exported on Windows to keep AssimpView alive. #include "GenFaceNormalsProcess.h" #include "GenVertexNormalsProcess.h" #include "JoinVerticesProcess.h" @@ -60,15 +57,14 @@ float g_smoothAngle = 80.f; //------------------------------------------------------------------------------- // Flip all normal vectors //------------------------------------------------------------------------------- -void AssetHelper::FlipNormalsInt() -{ +void AssetHelper::FlipNormalsInt() { // invert all normal vectors - for (unsigned int i = 0; i < this->pcScene->mNumMeshes;++i) - { + for (unsigned int i = 0; i < this->pcScene->mNumMeshes;++i) { aiMesh* pcMesh = this->pcScene->mMeshes[i]; - if (!pcMesh->mNormals) + if (!pcMesh->mNormals) { continue; + } for (unsigned int a = 0; a < pcMesh->mNumVertices;++a){ pcMesh->mNormals[a] *= -1.0f; @@ -77,8 +73,7 @@ void AssetHelper::FlipNormalsInt() } //------------------------------------------------------------------------------- -void AssetHelper::FlipNormals() -{ +void AssetHelper::FlipNormals() { FlipNormalsInt(); // recreate native data @@ -90,53 +85,42 @@ void AssetHelper::FlipNormals() //------------------------------------------------------------------------------- // Set the normal set of the scene //------------------------------------------------------------------------------- -void AssetHelper::SetNormalSet(unsigned int iSet) -{ +void AssetHelper::SetNormalSet(unsigned int iSet) { // we need to build an unique set of vertices for this ... { MakeVerboseFormatProcess* pcProcess = new MakeVerboseFormatProcess(); pcProcess->Execute(pcScene); delete pcProcess; - for (unsigned int i = 0; i < pcScene->mNumMeshes;++i) - { - if (!apcMeshes[i]->pvOriginalNormals) - { + for (unsigned int i = 0; i < pcScene->mNumMeshes;++i) { + if (!apcMeshes[i]->pvOriginalNormals) { apcMeshes[i]->pvOriginalNormals = new aiVector3D[pcScene->mMeshes[i]->mNumVertices]; memcpy( apcMeshes[i]->pvOriginalNormals,pcScene->mMeshes[i]->mNormals, pcScene->mMeshes[i]->mNumVertices * sizeof(aiVector3D)); } delete[] pcScene->mMeshes[i]->mNormals; - pcScene->mMeshes[i]->mNormals = NULL; + pcScene->mMeshes[i]->mNormals = nullptr; } } - // now we can start to calculate a new set of normals - if (HARD == iSet) - { + if (HARD == iSet) { GenFaceNormalsProcess* pcProcess = new GenFaceNormalsProcess(); pcProcess->Execute(pcScene); FlipNormalsInt(); delete pcProcess; - } - else if (SMOOTH == iSet) - { + } else if (SMOOTH == iSet) { GenVertexNormalsProcess* pcProcess = new GenVertexNormalsProcess(); pcProcess->SetMaxSmoothAngle((float)AI_DEG_TO_RAD(g_smoothAngle)); pcProcess->Execute(pcScene); FlipNormalsInt(); delete pcProcess; - } - else if (ORIGINAL == iSet) - { - for (unsigned int i = 0; i < pcScene->mNumMeshes;++i) - { - if (apcMeshes[i]->pvOriginalNormals) - { + } else if (ORIGINAL == iSet) { + for (unsigned int i = 0; i < pcScene->mNumMeshes;++i) { + if (apcMeshes[i]->pvOriginalNormals) { delete[] pcScene->mMeshes[i]->mNormals; pcScene->mMeshes[i]->mNormals = apcMeshes[i]->pvOriginalNormals; - apcMeshes[i]->pvOriginalNormals = NULL; + apcMeshes[i]->pvOriginalNormals = nullptr; } } } @@ -153,14 +137,11 @@ void AssetHelper::SetNormalSet(unsigned int iSet) iNormalSet = iSet; - if (g_bWasFlipped) - { + if (g_bWasFlipped) { // invert all normal vectors - for (unsigned int i = 0; i < pcScene->mNumMeshes;++i) - { + for (unsigned int i = 0; i < pcScene->mNumMeshes;++i) { aiMesh* pcMesh = pcScene->mMeshes[i]; - for (unsigned int a = 0; a < pcMesh->mNumVertices;++a) - { + for (unsigned int a = 0; a < pcMesh->mNumVertices;++a) { pcMesh->mNormals[a] *= -1.0f; } } @@ -169,7 +150,6 @@ void AssetHelper::SetNormalSet(unsigned int iSet) // recreate native data DeleteAssetData(true); CreateAssetData(); - return; } -}; \ No newline at end of file +} diff --git a/tools/assimp_view/SceneAnimator.cpp b/tools/assimp_view/SceneAnimator.cpp index 6e507cb41..c2ebeacb3 100644 --- a/tools/assimp_view/SceneAnimator.cpp +++ b/tools/assimp_view/SceneAnimator.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -47,21 +47,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using namespace AssimpView; +const aiMatrix4x4 IdentityMatrix; + // ------------------------------------------------------------------------------------------------ // Constructor for a given scene. SceneAnimator::SceneAnimator( const aiScene* pScene, size_t pAnimIndex) -{ - mScene = pScene; - mCurrentAnimIndex = -1; - mAnimEvaluator = NULL; - mRootNode = NULL; - +: mScene( pScene ) +, mCurrentAnimIndex( -1 ) +, mAnimEvaluator( nullptr ) +, mRootNode( nullptr ) { // build the nodes-for-bones table - for (unsigned int i = 0; i < pScene->mNumMeshes;++i) - { + for (unsigned int i = 0; i < pScene->mNumMeshes;++i) { const aiMesh* mesh = pScene->mMeshes[i]; - for (unsigned int n = 0; n < mesh->mNumBones;++n) - { + for (unsigned int n = 0; n < mesh->mNumBones;++n) { const aiBone* bone = mesh->mBones[n]; mBoneNodesByName[bone->mName.data] = pScene->mRootNode->FindNode(bone->mName); @@ -74,34 +72,34 @@ SceneAnimator::SceneAnimator( const aiScene* pScene, size_t pAnimIndex) // ------------------------------------------------------------------------------------------------ // Destructor -SceneAnimator::~SceneAnimator() -{ +SceneAnimator::~SceneAnimator() { delete mRootNode; delete mAnimEvaluator; } // ------------------------------------------------------------------------------------------------ // Sets the animation to use for playback. -void SceneAnimator::SetAnimIndex( size_t pAnimIndex) -{ +void SceneAnimator::SetAnimIndex( size_t pAnimIndex) { // no change - if( pAnimIndex == mCurrentAnimIndex) + if (pAnimIndex == static_cast( mCurrentAnimIndex ) ) { return; + } // kill data of the previous anim - delete mRootNode; mRootNode = NULL; - delete mAnimEvaluator; mAnimEvaluator = NULL; + delete mRootNode; mRootNode = nullptr; + delete mAnimEvaluator; mAnimEvaluator = nullptr; mNodesByName.clear(); mCurrentAnimIndex = pAnimIndex; // create the internal node tree. Do this even in case of invalid animation index // so that the transformation matrices are properly set up to mimic the current scene - mRootNode = CreateNodeTree( mScene->mRootNode, NULL); + mRootNode = CreateNodeTree( mScene->mRootNode, nullptr); // invalid anim index - if( mCurrentAnimIndex >= mScene->mNumAnimations) + if (static_cast( mCurrentAnimIndex )>= mScene->mNumAnimations) { return; + } // create an evaluator for this animation mAnimEvaluator = new AnimEvaluator( mScene->mAnimations[mCurrentAnimIndex]); @@ -109,11 +107,11 @@ void SceneAnimator::SetAnimIndex( size_t pAnimIndex) // ------------------------------------------------------------------------------------------------ // Calculates the node transformations for the scene. -void SceneAnimator::Calculate( double pTime) -{ +void SceneAnimator::Calculate( double pTime) { // invalid anim - if( !mAnimEvaluator) + if (!mAnimEvaluator) { return; + } // calculate current local transformations mAnimEvaluator->Evaluate( pTime); @@ -124,36 +122,35 @@ void SceneAnimator::Calculate( double pTime) // ------------------------------------------------------------------------------------------------ // Retrieves the most recent local transformation matrix for the given node. -const aiMatrix4x4& SceneAnimator::GetLocalTransform( const aiNode* node) const -{ +const aiMatrix4x4& SceneAnimator::GetLocalTransform( const aiNode* node) const { NodeMap::const_iterator it = mNodesByName.find( node); - if( it == mNodesByName.end()) - return mIdentityMatrix; + if (it == mNodesByName.end()) { + return IdentityMatrix; + } return it->second->mLocalTransform; } // ------------------------------------------------------------------------------------------------ // Retrieves the most recent global transformation matrix for the given node. -const aiMatrix4x4& SceneAnimator::GetGlobalTransform( const aiNode* node) const -{ +const aiMatrix4x4& SceneAnimator::GetGlobalTransform( const aiNode* node) const { NodeMap::const_iterator it = mNodesByName.find( node); - if( it == mNodesByName.end()) - return mIdentityMatrix; + if (it == mNodesByName.end()) { + return IdentityMatrix; + } return it->second->mGlobalTransform; } // ------------------------------------------------------------------------------------------------ // Calculates the bone matrices for the given mesh. -const std::vector& SceneAnimator::GetBoneMatrices( const aiNode* pNode, size_t pMeshIndex /* = 0 */) -{ +const std::vector& SceneAnimator::GetBoneMatrices( const aiNode* pNode, size_t pMeshIndex /* = 0 */) { ai_assert( pMeshIndex < pNode->mNumMeshes); size_t meshIndex = pNode->mMeshes[pMeshIndex]; ai_assert( meshIndex < mScene->mNumMeshes); const aiMesh* mesh = mScene->mMeshes[meshIndex]; - // resize array and initialise it with identity matrices + // resize array and initialize it with identity matrices mTransforms.resize( mesh->mNumBones, aiMatrix4x4()); // calculate the mesh's inverse global transform @@ -162,8 +159,7 @@ const std::vector& SceneAnimator::GetBoneMatrices( const aiNode* pN // Bone matrices transform from mesh coordinates in bind pose to mesh coordinates in skinned pose // Therefore the formula is offsetMatrix * currentGlobalTransform * inverseCurrentMeshTransform - for( size_t a = 0; a < mesh->mNumBones; ++a) - { + for( size_t a = 0; a < mesh->mNumBones; ++a) { const aiBone* bone = mesh->mBones[a]; const aiMatrix4x4& currentGlobalTransform = GetGlobalTransform( mBoneNodesByName[ bone->mName.data ]); mTransforms[a] = globalInverseMeshTransform * currentGlobalTransform * bone->mOffsetMatrix; @@ -175,8 +171,7 @@ const std::vector& SceneAnimator::GetBoneMatrices( const aiNode* pN // ------------------------------------------------------------------------------------------------ // Recursively creates an internal node structure matching the current scene and animation. -SceneAnimNode* SceneAnimator::CreateNodeTree( aiNode* pNode, SceneAnimNode* pParent) -{ +SceneAnimNode* SceneAnimator::CreateNodeTree( aiNode* pNode, SceneAnimNode* pParent) { // create a node SceneAnimNode* internalNode = new SceneAnimNode( pNode->mName.data); internalNode->mParent = pParent; @@ -187,14 +182,11 @@ SceneAnimNode* SceneAnimator::CreateNodeTree( aiNode* pNode, SceneAnimNode* pPar CalculateGlobalTransform( internalNode); // find the index of the animation track affecting this node, if any - if( mCurrentAnimIndex < mScene->mNumAnimations) - { + if(static_cast( mCurrentAnimIndex ) < mScene->mNumAnimations) { internalNode->mChannelIndex = -1; const aiAnimation* currentAnim = mScene->mAnimations[mCurrentAnimIndex]; - for( unsigned int a = 0; a < currentAnim->mNumChannels; a++) - { - if( currentAnim->mChannels[a]->mNodeName.data == internalNode->mName) - { + for( unsigned int a = 0; a < currentAnim->mNumChannels; a++) { + if( currentAnim->mChannels[a]->mNodeName.data == internalNode->mName) { internalNode->mChannelIndex = a; break; } @@ -202,8 +194,7 @@ SceneAnimNode* SceneAnimator::CreateNodeTree( aiNode* pNode, SceneAnimNode* pPar } // continue for all child nodes and assign the created internal nodes as our children - for( unsigned int a = 0; a < pNode->mNumChildren; a++) - { + for( unsigned int a = 0; a < pNode->mNumChildren; ++a ) { SceneAnimNode* childNode = CreateNodeTree( pNode->mChildren[a], internalNode); internalNode->mChildren.push_back( childNode); } @@ -213,12 +204,10 @@ SceneAnimNode* SceneAnimator::CreateNodeTree( aiNode* pNode, SceneAnimNode* pPar // ------------------------------------------------------------------------------------------------ // Recursively updates the internal node transformations from the given matrix array -void SceneAnimator::UpdateTransforms( SceneAnimNode* pNode, const std::vector& pTransforms) -{ +void SceneAnimator::UpdateTransforms( SceneAnimNode* pNode, const std::vector& pTransforms) { // update node local transform - if( pNode->mChannelIndex != -1) - { - ai_assert( pNode->mChannelIndex < pTransforms.size()); + if( pNode->mChannelIndex != -1) { + ai_assert(static_cast( pNode->mChannelIndex ) < pTransforms.size()); pNode->mLocalTransform = pTransforms[pNode->mChannelIndex]; } @@ -226,19 +215,18 @@ void SceneAnimator::UpdateTransforms( SceneAnimNode* pNode, const std::vector::iterator it = pNode->mChildren.begin(); it != pNode->mChildren.end(); ++it) - UpdateTransforms( *it, pTransforms); + for (std::vector::iterator it = pNode->mChildren.begin(); it != pNode->mChildren.end(); ++it) { + UpdateTransforms(*it, pTransforms); + } } // ------------------------------------------------------------------------------------------------ // Calculates the global transformation matrix for the given internal node -void SceneAnimator::CalculateGlobalTransform( SceneAnimNode* pInternalNode) -{ +void SceneAnimator::CalculateGlobalTransform( SceneAnimNode* pInternalNode) { // concatenate all parent transforms to get the global transform for this node pInternalNode->mGlobalTransform = pInternalNode->mLocalTransform; SceneAnimNode* node = pInternalNode->mParent; - while( node) - { + while( node) { pInternalNode->mGlobalTransform = node->mLocalTransform * pInternalNode->mGlobalTransform; node = node->mParent; } diff --git a/tools/assimp_view/SceneAnimator.h b/tools/assimp_view/SceneAnimator.h index afcbac925..00d9832b6 100644 --- a/tools/assimp_view/SceneAnimator.h +++ b/tools/assimp_view/SceneAnimator.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2012, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. @@ -49,15 +49,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -namespace AssimpView { +namespace AssimpView { // --------------------------------------------------------------------------------- /** A little tree structure to match the scene's node structure, but holding * additional data. Needs to be public to allow using it in templates at * certain compilers. */ -struct SceneAnimNode -{ +struct SceneAnimNode { std::string mName; SceneAnimNode* mParent; std::vector mChildren; @@ -69,12 +68,15 @@ struct SceneAnimNode aiMatrix4x4 mGlobalTransform; //! index in the current animation's channel array. -1 if not animated. - size_t mChannelIndex; + int mChannelIndex; //! Default construction SceneAnimNode() : mName() - , mParent(NULL) + , mParent(nullptr) + , mChildren() + , mLocalTransform() + , mGlobalTransform() , mChannelIndex(-1) { // empty } @@ -82,8 +84,11 @@ struct SceneAnimNode //! Construction from a given name SceneAnimNode( const std::string& pName) : mName( pName) - , mParent(NULL) - , mChannelIndex( -1 ) { + , mParent(nullptr) + , mChildren() + , mLocalTransform() + , mGlobalTransform() + , mChannelIndex(-1) { // empty } @@ -105,8 +110,7 @@ struct SceneAnimNode * GetGlobalTransform(). A full set of bone matrices can be retrieved by * GetBoneMatrices() for a given mesh. */ -class SceneAnimator -{ +class SceneAnimator { public: // ---------------------------------------------------------------------------- @@ -186,7 +190,6 @@ public: const std::vector& GetBoneMatrices( const aiNode* pNode, size_t pMeshIndex = 0); - // ---------------------------------------------------------------------------- /** @brief Get the current animation index */ @@ -198,7 +201,7 @@ public: /** @brief Get the current animation or NULL */ aiAnimation* CurrentAnim() const { - return mCurrentAnimIndex < mScene->mNumAnimations ? mScene->mAnimations[ mCurrentAnimIndex ] : NULL; + return static_cast( mCurrentAnimIndex ) < mScene->mNumAnimations ? mScene->mAnimations[ mCurrentAnimIndex ] : NULL; } protected: @@ -221,7 +224,7 @@ protected: const aiScene* mScene; /** Current animation index */ - size_t mCurrentAnimIndex; + int mCurrentAnimIndex; /** The AnimEvaluator we use to calculate the current pose for the current animation */ AnimEvaluator* mAnimEvaluator; @@ -239,9 +242,6 @@ protected: /** Array to return transformations results inside. */ std::vector mTransforms; - - /** Identity matrix to return a reference to in case of error */ - aiMatrix4x4 mIdentityMatrix; }; } // end of namespace AssimpView diff --git a/tools/assimp_view/Shaders.cpp b/tools/assimp_view/Shaders.cpp index 1b6f3dc88..49ec5320d 100644 --- a/tools/assimp_view/Shaders.cpp +++ b/tools/assimp_view/Shaders.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2015, assimp team +Copyright (c) 2006-2019, assimp team All rights reserved. diff --git a/tools/assimp_view/assimp_view.cpp b/tools/assimp_view/assimp_view.cpp index 746a4836f..355287e0d 100644 --- a/tools/assimp_view/assimp_view.cpp +++ b/tools/assimp_view/assimp_view.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team @@ -47,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #ifdef __MINGW32__ -#include +# include #else -#include +# include #endif using namespace std; @@ -310,9 +310,10 @@ int LoadAsset() // Delete the loaded asset // The function does nothing is no asset is loaded //------------------------------------------------------------------------------- -int DeleteAsset(void) -{ - if (!g_pcAsset)return 0; +int DeleteAsset(void) { + if (!g_pcAsset) { + return 0; + } // don't anymore know why this was necessary ... CDisplay::Instance().OnRender(); @@ -349,9 +350,7 @@ int DeleteAsset(void) // p_avOut Receives the min/max boundaries. Must point to 2 vec3s // piMatrix Transformation matrix of the graph at this position //------------------------------------------------------------------------------- -int CalculateBounds(aiNode* piNode, aiVector3D* p_avOut, - const aiMatrix4x4& piMatrix) -{ +int CalculateBounds(aiNode* piNode, aiVector3D* p_avOut, const aiMatrix4x4& piMatrix) { ai_assert(NULL != piNode); ai_assert(NULL != p_avOut); @@ -739,7 +738,7 @@ int DeleteAssetData(bool bNoMaterials) //------------------------------------------------------------------------------- -// Switch beetween zoom/rotate view and the standatd FPS view +// Switch between zoom/rotate view and the standard FPS view // g_bFPSView specifies the view mode to setup //------------------------------------------------------------------------------- int SetupFPSView() @@ -982,7 +981,7 @@ int CreateDevice (bool p_bMultiSample,bool p_bSuperSample,bool bHW /*= true*/) sParams.MultiSampleType = sMSOut; } - // preget the device capabilities. If the hardware vertex shader is too old, we prefer software vertex processing + // get the device capabilities. If the hardware vertex shader is too old, we prefer software vertex processing g_piD3D->GetDeviceCaps( 0, D3DDEVTYPE_HAL, &g_sCaps); DWORD creationFlags = D3DCREATE_MULTITHREADED; if( g_sCaps.VertexShaderVersion >= D3DVS_VERSION( 2, 0)) @@ -1099,17 +1098,13 @@ int CreateDevice (bool p_bMultiSample,bool p_bSuperSample,bool bHW /*= true*/) return 1; } - //------------------------------------------------------------------------------- -//------------------------------------------------------------------------------- -int CreateDevice (void) +int CreateDevice() { return CreateDevice(g_sOptions.bMultiSample, g_sOptions.bSuperSample); } - -//------------------------------------------------------------------------------- //------------------------------------------------------------------------------- int GetProjectionMatrix (aiMatrix4x4& p_mOut) { diff --git a/tools/assimp_view/assimp_view.h b/tools/assimp_view/assimp_view.h index 9317495c1..bed4c64c3 100644 --- a/tools/assimp_view/assimp_view.h +++ b/tools/assimp_view/assimp_view.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2018, assimp team +Copyright (c) 2006-2019, assimp team