mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-04-22 05:59:55 +08:00
28 lines
663 B
C++
28 lines
663 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <tiny_gltf.h>
|
|
|
|
namespace gltfutil {
|
|
class texture_dumper {
|
|
public:
|
|
enum class texture_output_format { png, bmp, tga, not_specified };
|
|
|
|
private:
|
|
const tinygltf::Model& model;
|
|
texture_output_format configured_format;
|
|
bool use_exr = false; // Use EXR for 16bit image?
|
|
|
|
public:
|
|
texture_dumper(const tinygltf::Model& inputModel);
|
|
void dump_to_folder(const std::string& path = "./");
|
|
void set_output_format(texture_output_format format);
|
|
void set_use_exr(const bool value) {
|
|
use_exr = value;
|
|
}
|
|
|
|
static texture_output_format get_fromat_from_string(const std::string& str);
|
|
};
|
|
} // namespace gltfutil
|