13 entt::meta_factory<alpha_mode>{}
14 .type(
"alpha_mode"_hs)
19 .data<alpha_mode::opaque>(
"opaque"_hs)
24 .data<alpha_mode::mask>(
"mask"_hs)
29 .data<alpha_mode::blend>(
"blend"_hs)
35 entt::meta_factory<cull_type>{}
41 .data<cull_type::none>(
"none"_hs)
46 .data<cull_type::clockwise>(
"clockwise"_hs)
51 .data<cull_type::counter_clockwise>(
"counter_clockwise"_hs)
58 entt::meta_factory<material>{}
64 .data<&material::set_cull_type, &material::get_cull_type>(
"cull_type"_hs)
69 .func<&material::get_meta_type>(
"get_meta_type"_hs)
71 .func<&material::as_derived>(
"as_derived"_hs)
77 try_save(ar, ser20::make_nvp(
"cull_type", obj.cull_type_));
86 try_load(ar, ser20::make_nvp(
"cull_type", obj.cull_type_));
93void save_to_file(
const std::string& absolute_path,
const std::shared_ptr<material>& obj)
95 std::ofstream stream(absolute_path);
99 try_save(ar, ser20::make_nvp(
"material", obj));
103void save_to_file_bin(
const std::string& absolute_path,
const std::shared_ptr<material>& obj)
105 std::ofstream stream(absolute_path, std::ios::binary);
109 try_save(ar, ser20::make_nvp(
"material", obj));
113void load_from_file(
const std::string& absolute_path, std::shared_ptr<material>& obj)
121 try_load(ar, ser20::make_nvp(
"material", obj));
132 try_load(ar, ser20::make_nvp(
"material", obj));
stdio-backed input stream. Accepts std::ios open flags (e.g. std::ios::binary) when opening a
Base class for materials used in rendering.
attributes::value_type attribute
std::map< std::string, meta_any > attributes
auto create_oarchive_associative(std::ostream &stream)
BinaryInputArchive iarchive_binary_t
auto create_iarchive_associative(std::istream &stream)
simd::JSONOutputArchive oarchive_associative_t
BinaryOutputArchive oarchive_binary_t
simd::JSONInputArchive iarchive_associative_t
void save_to_file_bin(const std::string &absolute_path, const animation_clip &obj)
void load_from_file(const std::string &absolute_path, animation_clip &obj)
void save_to_file(const std::string &absolute_path, const animation_clip &obj)
void load_from_file_bin(const std::string &absolute_path, animation_clip &obj)
#define SAVE_INSTANTIATE(cls, Archive)
auto try_save(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
#define LOAD_INSTANTIATE(cls, Archive)
auto try_load(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool