15 #include "loaderOptions.h"
16 #include "config_util.h"
25 LoaderOptions(
int flags) :
28 _texture_num_views(0),
29 _auto_texture_scale(ATS_unspecified)
35 if (preload_textures == NULL) {
38 if (preload_simple_textures == NULL) {
42 if (*preload_textures) {
43 _texture_flags |= TF_preload;
45 if (*preload_simple_textures) {
46 _texture_flags |= TF_preload_simple;
56 output(ostream &out)
const {
57 out <<
"LoaderOptions(";
60 write_flag(out, sep,
"LF_search", LF_search);
61 write_flag(out, sep,
"LF_report_errors", LF_report_errors);
62 if ((_flags & LF_convert_anim) == LF_convert_anim) {
63 write_flag(out, sep,
"LF_convert_anim", LF_convert_anim);
65 write_flag(out, sep,
"LF_convert_skeleton", LF_convert_skeleton);
66 write_flag(out, sep,
"LF_convert_channels", LF_convert_channels);
68 if ((_flags & LF_no_cache) == LF_no_cache) {
69 write_flag(out, sep,
"LF_no_cache", LF_no_cache);
71 write_flag(out, sep,
"LF_no_disk_cache", LF_no_disk_cache);
72 write_flag(out, sep,
"LF_no_ram_cache", LF_no_ram_cache);
74 write_flag(out, sep,
"LF_allow_instance", LF_allow_instance);
82 write_texture_flag(out, sep,
"TF_preload", TF_preload);
83 write_texture_flag(out, sep,
"TF_preload_simple", TF_preload_simple);
84 write_texture_flag(out, sep,
"TF_allow_1d", TF_allow_1d);
85 write_texture_flag(out, sep,
"TF_generate_mipmaps", TF_generate_mipmaps);
90 if (_auto_texture_scale != ATS_unspecified) {
91 out <<
", ATS_" << _auto_texture_scale;
103 write_flag(ostream &out,
string &sep,
104 const string &flag_name,
int flag)
const {
105 if ((_flags & flag) == flag) {
106 out << sep << flag_name;
117 write_texture_flag(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.