unit-GLTFLoader.cpp 884 B

123456789101112131415161718192021222324252627282930313233343536
  1. #include <catch2/catch.hpp>
  2. #include <iostream>
  3. #include <gul/GLTFLoader.h>
  4. #if 0
  5. SCENARIO("Stride Copy")
  6. {
  7. auto filepath = gul::fs::path("/home/globo/Home-Projects/glTF-Sample-Models/2.0/Suzanne/glTF/Suzanne.gltf");
  8. std::ifstream in(filepath);
  9. REQUIRE(in);
  10. auto G = gul::loadGLTF(in, filepath.parent_path().native());
  11. // /home/globo/Home-Projects/glTF-Sample-Models/2.0/CesiumMan/glTF-Binary/CesiumMan.glb
  12. }
  13. SCENARIO("Binary loading")
  14. {
  15. auto filepath = gul::fs::path("/home/globo/Home-Projects/glTF-Sample-Models/2.0/CesiumMan/glTF-Binary/CesiumMan.glb");
  16. //auto filepath = "/home/globo/Home-Projects/glTF-Sample-Models/2.0/CesiumMan/glTF-Binary/CesiumMan.glb";
  17. std::ifstream in(filepath);
  18. REQUIRE(in);
  19. auto G = gul::loadGLTF(in, filepath.parent_path().native());
  20. //
  21. }
  22. #endif
  23. #define STB_IMAGE_IMPLEMENTATION
  24. #include <stb_image.h>