24 LoaderOptions(
int flags) :
27 _texture_num_views(0),
28 _auto_texture_scale(ATS_unspecified)
34 if (preload_textures ==
nullptr) {
37 if (preload_simple_textures ==
nullptr) {
40 if (compressed_textures ==
nullptr) {
44 if (*preload_textures) {
45 _texture_flags |= TF_preload;
47 if (*preload_simple_textures) {
48 _texture_flags |= TF_preload_simple;
50 if (*compressed_textures) {
51 _texture_flags |= TF_allow_compression;
59 output(std::ostream &out)
const {
60 out <<
"LoaderOptions(";
63 write_flag(out, sep,
"LF_search", LF_search);
64 write_flag(out, sep,
"LF_report_errors", LF_report_errors);
65 if ((_flags & LF_convert_anim) == LF_convert_anim) {
66 write_flag(out, sep,
"LF_convert_anim", LF_convert_anim);
68 write_flag(out, sep,
"LF_convert_skeleton", LF_convert_skeleton);
69 write_flag(out, sep,
"LF_convert_channels", LF_convert_channels);
71 if ((_flags & LF_no_cache) == LF_no_cache) {
72 write_flag(out, sep,
"LF_no_cache", LF_no_cache);
74 write_flag(out, sep,
"LF_no_disk_cache", LF_no_disk_cache);
75 write_flag(out, sep,
"LF_no_ram_cache", LF_no_ram_cache);
77 write_flag(out, sep,
"LF_allow_instance", LF_allow_instance);
85 write_texture_flag(out, sep,
"TF_preload", TF_preload);
86 write_texture_flag(out, sep,
"TF_preload_simple", TF_preload_simple);
87 write_texture_flag(out, sep,
"TF_allow_1d", TF_allow_1d);
88 write_texture_flag(out, sep,
"TF_generate_mipmaps", TF_generate_mipmaps);
89 write_texture_flag(out, sep,
"TF_allow_compression", TF_allow_compression);
94 if (_auto_texture_scale != ATS_unspecified) {
95 out <<
", ATS_" << _auto_texture_scale;
105 write_flag(std::ostream &out,
string &sep,
106 const string &flag_name,
int flag)
const {
107 if ((_flags & flag) == flag) {
108 out << sep << flag_name;
117 write_texture_flag(std::ostream &out,
string &sep,
118 const string &flag_name,
int flag)
const {
119 if ((_texture_flags & flag) == flag) {
120 out << sep << flag_name;
This is a convenience class to specialize ConfigVariable as a boolean type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.