Commit Graph

95 Commits (1d3f8bd871b2c6148e312c87320318c03df11718)

Author SHA1 Message Date
Marc-Antoine Lortie 11daed69d3 Fixed overwriting of CMake global output directory variables. 2020-08-07 16:04:39 -04:00
Kim Kulling b8ec93aa21
use c-styl cast in a c-file 2020-07-11 22:34:43 +02:00
Hill Ma 0b18d27042 Use strrchr() when finding the '.' that begins the file extension.
Sometimes we encounter file paths like ../foo/bar.obj; searching from the end of
the string would yield the correct result.
2020-06-28 16:02:33 -07:00
kkulling 4e16716924 Merge branch 'file-formatting' of https://github.com/aaronfranke/assimp into aaronfranke-file-formatting 2020-05-05 10:17:52 +02:00
Kim Kulling 966b5f4330
Merge branch 'master' into sample-simpletextureddirectx11-nullptr 2020-04-17 14:43:20 +02:00
Kim Kulling 20c125218d
Merge branch 'master' into sample-simpleopengl-minor-improvements 2020-04-16 08:30:30 +02:00
Kim Kulling 872001c1c9
Merge branch 'master' into sample-simpletextureddirectx11-nullptr 2020-04-10 12:29:51 +02:00
Marc-Antoine Lortie 592e71dd7e Replaced NULL with nullptr for pointers in sample SimpleTexturedOpenGL. 2020-04-07 16:43:36 -04:00
Marc-Antoine Lortie 105b2bdeaf Replaced NULL with nullptr for pointers in sample SimpleTexturedDirectx11. 2020-04-04 15:37:50 -04:00
Marc-Antoine Lortie 732dc6a5d6
Merge branch 'master' into fix-sample-simpletexturedogl-w4-compile-warnings 2020-04-03 14:15:31 -04:00
Marc-Antoine Lortie 4bae1d2596 Fixed warning C4018: '<': signed/unsigned mismatch 2020-04-03 10:07:44 -04:00
Marc-Antoine Lortie e67ddd0ca1 Fixed /W4 compile warnings in sample SimpleTexturedDirectx11. 2020-04-03 09:43:01 -04:00
Marc-Antoine Lortie fa9ccfba61 Applied review requested changes for #3125
- 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.
2020-04-03 07:50:07 -04:00
Marc-Antoine Lortie 895675535a Fixed /W4 compile warnings in sample SimpleTexturedOpenGL. 2020-04-02 15:28:06 -04:00
Marc-Antoine Lortie 56e2f2e37e Fixed /W4 compile warnings in sample SimpleOpenGL. 2020-04-02 14:19:16 -04:00
Kim Kulling f5324e23ef closes https://github.com/assimp/assimp/pull/3104: remove unused includes. 2020-03-31 19:35:19 +02:00
Kim Kulling 2e65b11e96
Merge branch 'master' into sample-simpleopengl-minor-improvements 2020-03-22 16:56:59 +01:00
Aaron Franke 1529f9518f
Make file formatting comply with POSIX and Unix standards
UTF-8, LF, no BOM, and newlines at the end of files
2020-03-21 02:34:12 -04:00
Kim Kulling 7485e530b4
Merge branch 'master' into fix-directx-in-cmakelist 2020-03-11 21:23:45 +01:00
Marc-Antoine Lortie ed62ed9e7c Minor changes in CMakeLists files.
- 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.
2020-03-10 13:47:10 -04:00
Marc-Antoine Lortie dda083fa7b Added missing std namespace prefix to std types. 2020-03-08 10:50:18 -04:00
Kim Kulling b5d65bf94e
Update ModelLoader.cpp
Apply asimp-code-style.
2020-03-07 12:22:57 +01:00
Kim Kulling 31c6f0db92
Update Mesh.h
Apply code style.
2020-03-07 12:19:55 +01:00
Marc-Antoine Lortie c620e9a2ac Fixed memory leak caused by glutMainLoop() not returning.
Fixed memory leak by allowing glutMainLoop() to return to allow for the scene and streams to be released.
2020-03-06 13:28:05 -05:00
Marc-Antoine Lortie aa8a6122ce Fixed SimpleTexturedDirectX11 sample.
- 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.
2020-03-06 10:26:51 -05:00
Marc-Antoine Lortie ed5aab9495 Fixed and changed a few things.
- Removed references to test models with relative path.
- Fixed a compile warning.
- Added usage message.
2020-02-26 12:19:06 -05:00
Marc-Antoine Lortie edfaaed56f Removed uneeded expression in else() and endif() constructs.
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.
2020-02-23 07:09:35 -05:00
Marc-Antoine Lortie 4d27fccd0b Fixed memory leaks in SimpleTexturedOpenGL sample.
- 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.
2020-02-19 13:17:45 -05:00
Marc-Antoine Lortie d9042e4609 Fixed SimpleTexturedOpenGL sample.
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.
2020-02-15 18:02:12 -05:00
Kim Kulling 4ad2368116 disable samples per default. 2019-11-15 21:46:09 +01:00
Kim Kulling 3a8cb442f3 closes https://github.com/assimp/assimp/issues/2681: add dx11-sample to cmake. 2019-11-15 20:52:13 +01:00
Fabien Péan 52d0170470
Update CMakeLists.txt 2019-09-09 23:00:04 +02:00
Fabien Péan 1899aaef6e
Update Sample_SimpleOpenGL.c 2019-09-09 22:44:58 +02:00
Kim Kulling 602b0cf0c2
Update Sample_SimpleOpenGL.c
Introduce C_STRUCT  for c-compatibility mode.
2019-09-08 21:03:08 +02:00
Fabien Péan 1b86de9d14
Fix Sample_SimpleOpenGL.c
Extra `struct` causing problems
2019-09-08 19:15:57 +02:00
Kim Kulling 54c5f3f2d0
Update README
- Update the readme for the exampes.
2019-02-07 19:22:47 +01:00
kimkulling 3f9a25df5a Devil: replace this by header-only lib. 2019-02-07 17:09:05 +01:00
BuildTools a8a1ca9894 header paths adjusted for unit tests and samples 2018-01-05 23:12:40 -08:00
Unknown 12dbbd4ce9 Misc. typos
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
```
2017-11-09 17:19:26 -05:00
Jared Mulconry 539410d033 Fixed an error when compiling samples under MSVC that was caused by assuming including windows.h would pull in shellapi.h 2017-09-24 19:31:04 +10:00
Jared Mulconry 059a32654e Addressed warnings generated on MSVC across x86 and x64. 2017-09-24 19:29:43 +10:00
Kim Kulling ff83701a6f Sample: update dx11 texture loader. 2017-06-03 09:25:20 +02:00
Ias0601 db4b959868 Update ModelLoader.cpp 2017-06-01 21:12:48 +05:30
Ias0601 4456b7ca82 Update Mesh.h 2017-06-01 21:11:48 +05:30
Ias0601 514244ffc2 Add files via upload 2017-06-01 19:29:22 +05:30
Ias0601 863ae1d80d Add files via upload 2017-06-01 19:28:25 +05:30
Ias0601 629e80ee4a Create main.cpp 2017-06-01 19:25:25 +05:30
Ias0601 4c2385b55b Delete SimpleTexturedDirectx11.sln 2017-06-01 19:24:41 +05:30
Ias0601 f02663fb5b Add files via upload 2017-06-01 19:24:08 +05:30
Ias0601 8974a4f326 Delete a.txt 2017-06-01 19:15:10 +05:30