Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <fstream>
- #include <vector>
- #include "Converter.h"
- #include "tiny_gltf.h"
- #define TINYGLTF_IMPLEMENTATION
- #define STB_IMAGE_IMPLEMENTATION
- #define STB_IMAGE_WRITE_IMPLEMENTATION
- #define STBI_MSC_SECURE_CRT
- using namespace std;
- using namespace tinygltf;
- int main(int argc, char **argv)
- {
- Model model;
- TinyGLTF loader;
- std::string err;
- bool ret = loader.LoadASCIIFromFile(&model, &err, argv[1]);
- //bool ret = loader.LoadBinaryFromFile(&model, &err, argv[1]); // for binary glTF(.glb)
- if (!err.empty())
- cout << "Err: %s\n";
- if (!ret)
- {
- cout << "Failed to parse glTF\n";
- return -1;
- }
- cin.get();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement