diff --git a/src/asset.cpp b/src/asset.cpp index d9abb55..9926872 100644 --- a/src/asset.cpp +++ b/src/asset.cpp @@ -2,9 +2,6 @@ #include #include -#define TINYGLTF_IMPLEMENTATION -//#define STB_IMAGE_IMPLEMENTATION -#define STB_IMAGE_WRITE_IMPLEMENTATION #include "tiny_gltf.h" #include "asset.h" diff --git a/src/libs.cpp b/src/libs.cpp new file mode 100644 index 0000000..e04c0b5 --- /dev/null +++ b/src/libs.cpp @@ -0,0 +1,12 @@ + +// NOTE: put all the header-only libs in a separate compilation unit to save on +// compile times + +#define TINYGLTF_IMPLEMENTATION +#include "tiny_gltf.h" + +#define STB_IMAGE_IMPLEMENTATION +#define STB_IMAGE_WRITE_IMPLEMENTATION +#include "stb_image.h" +#include "stb_image_write.h" + diff --git a/src/util_image.cpp b/src/util_image.cpp index 64c2e57..ed44be5 100644 --- a/src/util_image.cpp +++ b/src/util_image.cpp @@ -1,7 +1,6 @@ #include -#define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" #include "dumbLog.h"