Commit Graph

451 Commits

Author SHA1 Message Date
noma
13412b0898 Added real_t, defined to float or double depending on CMake option TINYOBJLOADER_USE_DOUBLE 2017-04-24 17:25:21 +02:00
noma
9912bc5023 Added double variant of lib to CMakeLists.txt 2017-04-24 17:20:20 +02:00
Syoyo Fujita
9d9e987c47 Merge pull request #123 from nikitoz/master
Add std namespace for pow, ldexp, sscanf function calls.
2017-02-23 00:35:52 +09:00
nyatsenk
345560040b Add std namespace for pow, ldexp, sscanf function calls. 2017-02-22 11:34:39 +01:00
Syoyo Fujita
9134c1d395 Add file size check. 2017-02-10 17:19:28 +09:00
Syoyo Fujita
cc9897316f Do not exit program when there is no texture coordinate in .obj. 2017-02-09 20:13:27 +09:00
Syoyo Fujita
e43580bd9a Fix build with pre-C++11 compiler 2017-02-09 16:10:19 +09:00
Syoyo Fujita
9613108cef Cosmetics. 2017-02-08 13:58:40 +09:00
Syoyo Fujita
4b29502c82 Add data layout description to README. 2017-02-08 13:57:25 +09:00
Syoyo Fujita
156b709556 Move TINYOBJLOADER_IMPLEMENTATION outside of TINY_OBJ_LOADER_H_ ifdef guard. Fixes #122. 2017-02-02 14:11:13 +09:00
Syoyo Fujita
00f51e3603 Merge pull request #121 from ForsakenHarmony/patch-1
Grammar?
2017-01-11 12:47:13 +09:00
Ashley
da5942d652 Grammar? 2017-01-11 01:10:52 +01:00
Syoyo Fujita
7c3206f919 Ignore Tr parameter when d exists in MTL(#43) v1.0.5 2016-12-31 21:05:37 +09:00
Syoyo Fujita
4886eebbf4 Merge pull request #120 from dPavelDev/master
Fixed error in getting material name in LoadObjWithCallback
2016-12-30 20:17:28 +09:00
dPavelDev
91c727e204 Fixed error in getting material name in LoadObjWithCallback 2016-12-29 15:45:23 +03:00
Syoyo Fujita
26bdacedf6 Merge pull request #119 from jamiesnape/fix-cmake-dir
Add MIT license file, use GNUInstallDirs module, fix cmake directory location
2016-12-29 01:55:00 +09:00
Jamie Snape
7212ee47eb Use GNUInstallDirs module and fix cmake directory location 2016-12-28 11:11:59 -05:00
Jamie Snape
0fe1bb96c2 Add MIT license file 2016-12-28 11:10:07 -05:00
Syoyo Fujita
4bd75baaae Merge pull request #118 from jamiesnape/cleanup
Fix some formatting inconsistencies, fix typo, update minimum CMake
2016-12-21 01:00:16 +09:00
Jamie Snape
bbcfe59c0f Update minimum required version of CMake 2016-12-20 09:44:47 -05:00
Jamie Snape
38c07d34c4 Fix typo in destination of CMake export file 2016-12-20 09:44:26 -05:00
Jamie Snape
2019ace3b7 Remove excess padding around some parentheses in CMake files 2016-12-20 09:32:41 -05:00
Jamie Snape
ad96ff0769 Consistently use spaces instead of tabs in CMake files 2016-12-20 09:32:41 -05:00
Syoyo Fujita
d7f83f29f0 Fix for Windows platform. 2016-12-20 15:42:15 +09:00
Syoyo Fujita
98fad65028 Merge pull request #117 from jamiesnape/cmake-pkg-config
Write and install CMake package config and pkg-config files
2016-12-20 13:56:36 +09:00
Jamie Snape
e88016c63f Write and install pkg-config file 2016-12-19 11:45:00 -05:00
Jamie Snape
edabf19461 Write and install CMake package config files
This allows find_package(tinyobjloader) to be called.
2016-12-19 11:44:39 -05:00
Syoyo Fujita
8bed734a18 Merge branch 'master' of github.com:syoyo/tinyobjloader 2016-12-09 01:51:33 +09:00
Syoyo Fujita
60ffb3ca9a Add missing files. Fixes #115. 2016-12-09 01:51:03 +09:00
Syoyo Fujita
6507e70236 Merge pull request #113 from ReinierMaas/patch-1
Update README.md
2016-12-07 00:55:28 +09:00
Syoyo Fujita
2daec8be53 Search .mtl and texture from .obj's base dir.
Fix bad memory access.
v1.0.4
2016-12-07 00:54:12 +09:00
Syoyo Fujita
c2ff3f12fc Support multiple filenames for mtllib line. Fixes #112. 2016-12-06 23:44:55 +09:00
Reinier Maas
a6a134a60e Update README.md
Basedline -> baseline
2016-12-06 15:38:26 +01:00
Syoyo Fujita
e0b39341fc Merge pull request #111 from longjon/python2
Support Python 2.7
2016-12-06 14:37:05 +09:00
Syoyo Fujita
947582b592 Merge pull request #110 from longjon/python-attribs
(Re-)expose attributes to Python
2016-12-06 14:36:14 +09:00
Jonathan L Long
c207ff3561 Support Python 2.7. 2016-12-05 15:24:22 -08:00
Jonathan L Long
41dd7c806e (Re-)expose attribs to Python. 2016-12-05 15:12:28 -08:00
Syoyo Fujita
aa4dabe64f Describe default behavior of mtl_basedir. 2016-11-23 17:17:35 +09:00
Syoyo Fujita
9868630d0e Fix windows build of loader_example. 2016-11-04 12:36:15 +09:00
Syoyo Fujita
f2397573f3 Merge pull request #107 from Warezovvv/master
Little intuitive improvements
2016-11-03 17:39:16 +09:00
Nikita Krupitskas
7d5699118e Little intuitive improvements 2016-11-03 11:23:21 +03:00
Syoyo Fujita
0948ca0417 Add more support for parsing texture options.
Add more unit testing for texture options.
2016-11-03 02:58:44 +09:00
Syoyo Fujita
582eb2b818 Initial support of texture options. 2016-11-02 02:11:17 +09:00
Syoyo Fujita
c2474e27ab Fix seg fault when no material assigned to object in viewer example.
Bump version v1.0.2.
v1.0.2
2016-10-24 23:58:33 +09:00
Syoyo Fujita
6c6390f034 Fix typo. 2016-10-24 23:58:23 +09:00
Syoyo Fujita
4d6649cc6d Suppress compiler warnings. 2016-10-24 23:54:20 +09:00
Syoyo Fujita
d543b1447f Merge pull request #105 from dotdash/speedup
Improve parsing speed by about a factor of 2 for large files
2016-10-24 23:37:34 +09:00
Björn Steinbrink
d6eeb14216 Avoid unnecessary ldexp() and pow() calls
Parse times for some large .obj files (without asan):

         File A  File B  File C
Before   1239ms   294ms   271ms
After    1037ms   203ms   190ms
2016-10-24 14:47:59 +02:00
Björn Steinbrink
aa670fe91e Use a lookup table to speed up float parsing
The pow() function is pretty expensive, so creating a small lookup
table for the first few negative powers of ten provides a big speedup.

Parse times for some large .obj files (without asan):

        File A  File B  File C
Before  2500ms   573ms   545ms
After   1239ms   294ms   271ms
2016-10-24 12:15:42 +02:00
Björn Steinbrink
ebdbd8a231 Avoid unnecessary reallocations of the "linebuf" string
safeGetline() already clears the string buffer before writing to it, so
the same buffer can be used multiple times, but the loops calling
safeGetline() have the string scoped within the loop, so its
constructed and destructed in each loop iteration, causing lots of
unnecessary allocations.

Parse times for some large .obj files (without asan):

        File A  File B  File C
Before  2743ms   589ms   615ms
After   2500ms   573ms   545ms
2016-10-24 12:13:56 +02:00