forgot to add mirroredrepeat flag to flags file. fixed.

This commit is contained in:
romulox_x 2015-06-25 15:41:12 -07:00
parent 85e49d4e75
commit acb5cdb574
3 changed files with 9 additions and 1 deletions

View File

@ -75,6 +75,9 @@ Error ResourceSaverPNG::save(const String &p_path,const RES& p_resource,uint32_t
if (bool(texture->get_flags()&Texture::FLAG_CONVERT_TO_LINEAR)) {
text+="tolinear=true\n";
}
if (bool(texture->get_flags()&Texture::FLAG_MIRRORED_REPEAT)) {
text+="mirroredrepeat=true\n";
}
if (text!="" || FileAccess::exists(p_path+".flags")) {

View File

@ -181,6 +181,11 @@ RES ResourceFormatLoaderImage::load(const String &p_path,const String& p_origina
flags|=Texture::FLAG_CONVERT_TO_LINEAR;
}
if (flags_found.has("mirroredrepeat")) {
if (flags_found["mirroredrepeat"])
flags|=Texture::FLAG_MIRRORED_REPEAT;
}
if (debug_load_times)
begtime=OS::get_singleton()->get_ticks_usec();

View File

@ -51,12 +51,12 @@ public:
enum Flags {
FLAG_MIPMAPS=VisualServer::TEXTURE_FLAG_MIPMAPS,
FLAG_REPEAT=VisualServer::TEXTURE_FLAG_REPEAT,
FLAG_MIRRORED_REPEAT=VisualServer::TEXTURE_FLAG_MIRRORED_REPEAT,
FLAG_FILTER=VisualServer::TEXTURE_FLAG_FILTER,
FLAG_ANISOTROPIC_FILTER=VisualServer::TEXTURE_FLAG_ANISOTROPIC_FILTER,
FLAG_CONVERT_TO_LINEAR=VisualServer::TEXTURE_FLAG_CONVERT_TO_LINEAR,
FLAG_VIDEO_SURFACE=VisualServer::TEXTURE_FLAG_VIDEO_SURFACE,
FLAGS_DEFAULT=FLAG_MIPMAPS|FLAG_REPEAT|FLAG_FILTER,
FLAG_MIRRORED_REPEAT=VisualServer::TEXTURE_FLAG_MIRRORED_REPEAT
};