- remove assumption that embedded texture names start with "*0", etc.
- rename ModelLoader::getTextureFromModel() to loadEmbeddedTexture()
- support loading uncompressed embedded textures
Fixes display of bullsquid.mdl from Half-Life (which has an
embdedded texture named "bottommap.bmp")
- Reverted stb_image.h changes to prevent future merge conflicts.
- Added #pragma warning before and after stb_image header to disable and enable 'unreferenced formal parameter' warning.
- Fixed condition preventing ASSIMP_BUILD_ASSIMP_VIEW showing up on first time
- Set ASSIMP_BUILD_ASSIMP_VIEW to off by default.
- Removed unnecessary reference to DirectX 9 library.
- Removed OpenGL/Glut references in SimpleTexturedDirectX11 CMakeFile
- Moved UTFConverter from SimpleTexturedOpenGL to its own file to be able to reuse it.
- Added compile definition SHADER_PATH to allow to locate the shader files in CMakeFile
- Fixed compile warnings
- Made global pointers null to help prevent dangling references.
- Added missing members initialization in class constructors.
- Removed references to missing model "Models/mymodel.fbx"
- Fixed error when extracting model file directory
- Added missing device context assignment in ModelLoader Load method
- Fixed memory leak caused by variable 'ourModel' not deleted.
- Removed call to dev->Release() in ModelLoader.cpp
- Adjusted Release() calls in reverse order when cleaning up D3D
- Made Throwanerror implementation throw an error instead of displaying a message box
- Fixed leaking D3D resources
- Added a pointer to an ID3D11Debug to dump live objects.
The following changes were tested against building with a master copy.
For a more detailed report, please read the followings below:
The flags that were checked were the ones checked by default + the following:
ASSIMP_BUILD_ASSIMP_VIEW
ASSIMP_BUILD_SAMPLES
The list of compilable projects in Visual Studio were the following:
- assimp
- assimp_cmd
- assimp_simpleogl
- assimp_simpletextureddirectx11
- assimp_simpletexturedogl
- assimp_viewer
- INSTALL
- IrrXML
- uninstall
- unit
- UpdateAssimpLibsDebugSymbolsAndDLLs
- ZERO_CHECK
- zlib
- zlibstatic
The solution that was generated with the new changes comprised the same number of projects as the one from the master, unmodified. All projects except UpdateAssimpLibsDebugSymbolsAndDLLs were built without any error. All tests were run.
UpdateAssimpLibsDebugSymbolsAndDLLs could not be built because of the reasons explained in issue #3004.
- Added function "cleanup" to centralize release of resources.
- Added function "freeTextureIds" to free textureIds memory.
- Added call to freeTextureIds in LoadGLTextures to free memory before it is allocated again.
- Made several changes in KillGLWindow to prevent certain Win32 handle/resources
from being released more than once.
Several places in the sample's code were calling Unicode versions of Win32 functions with "multibyte" strings. A few changes were required to fix it.
I added a class "UTFConverter", which handles calls to unicode/multibyte string conversions. This should help minimize the impacts on code change in case C++'s codecvt_utf8 ever changes.
In addition, seveal memory leaks have been found, but these fixes will come in another PR because it goes beyond the scope of this PR.
DevIL.lib was removed in CMakeFiles.txt, as it is unused in the sample.
Here is a list of the changes:
- Fixed MB string calls to Unicode functions.
- Added class UTFConverter to handle string conversions.
- Removed reference to DevIL.lib.
- Fixed compile warnings.
Some are doxy comments, some are just trivial source comment typos.
Found using `codespell -q 3 --skip="./contrib" -I ../assimp-whitelist.txt`
whereby whitelist contained:
```
childs
iff
lod
nto
ot
whitespaces
```