merge and update all copies of stb_image.h
parent
be85eac703
commit
816da9b677
|
@ -56,6 +56,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
//#define ASSIMP_USE_M3D_READFILECB
|
//#define ASSIMP_USE_M3D_READFILECB
|
||||||
//#define M3D_ASCII
|
//#define M3D_ASCII
|
||||||
|
|
||||||
|
// Share stb_image's PNG loader with other importers/exporters instead of bringing our own copy.
|
||||||
|
#define STBI_ONLY_PNG
|
||||||
|
#include <contrib/stb_image/stb_image.h>
|
||||||
|
|
||||||
#include "m3d.h"
|
#include "m3d.h"
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1251,3 +1251,36 @@ ASSIMP_API void aiQuaternionInterpolate(
|
||||||
ai_assert(nullptr != end);
|
ai_assert(nullptr != end);
|
||||||
aiQuaternion::Interpolate(*dst, *start, *end, factor);
|
aiQuaternion::Interpolate(*dst, *start, *end, factor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// stb_image is a lightweight image loader. It is shared by:
|
||||||
|
// - M3D import
|
||||||
|
// - PBRT export
|
||||||
|
// Since it's a header-only library, its implementation must be instantiated in some cpp file.
|
||||||
|
// Don't scatter this task over multiple importers/exporters. Maintain it in a central place (here!).
|
||||||
|
|
||||||
|
#define ASSIMP_HAS_PBRT_EXPORT (!ASSIMP_BUILD_NO_EXPORT && !ASSIMP_BUILD_NO_PBRT_EXPORTER)
|
||||||
|
#define ASSIMP_HAS_M3D ((!ASSIMP_BUILD_NO_EXPORT && !ASSIMP_BUILD_NO_M3D_EXPORTER) || !ASSIMP_BUILD_NO_M3D_IMPORTER)
|
||||||
|
|
||||||
|
#if ASSIMP_HAS_PBRT_EXPORT
|
||||||
|
# define ASSIMP_NEEDS_STB_IMAGE 1
|
||||||
|
#elif ASSIMP_HAS_M3D
|
||||||
|
# define ASSIMP_NEEDS_STB_IMAGE 1
|
||||||
|
# define STBI_ONLY_PNG
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ASSIMP_NEEDS_STB_IMAGE
|
||||||
|
|
||||||
|
# if _MSC_VER // "unreferenced function has been removed" (SSE2 detection routine in x64 builds)
|
||||||
|
# pragma warning(push)
|
||||||
|
# pragma warning(disable: 4505)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# define STB_IMAGE_IMPLEMENTATION
|
||||||
|
# include "../contrib/stb_image/stb_image.h"
|
||||||
|
|
||||||
|
# if _MSC_VER
|
||||||
|
# pragma warning(pop)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -83,8 +83,7 @@ Other:
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
#include "../contrib/stb_image/stb_image.h"
|
||||||
#include "stb_image.h"
|
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue