summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromulox_x <romulox_x@yahoo.com>2015-06-25 15:41:12 -0700
committerromulox_x <romulox_x@yahoo.com>2015-06-25 15:41:12 -0700
commitacb5cdb5744711beefc7d353aa51cb1d6b148c6a (patch)
tree74dc43652002883f15b0be3cc0b255714d7357b3
parent85e49d4e75eea3f32253704d41621b83409b7898 (diff)
forgot to add mirroredrepeat flag to flags file. fixed.
-rw-r--r--drivers/png/resource_saver_png.cpp3
-rw-r--r--scene/io/resource_format_image.cpp5
-rw-r--r--scene/resources/texture.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp
index 8524aa2121..76e0c03c46 100644
--- a/drivers/png/resource_saver_png.cpp
+++ b/drivers/png/resource_saver_png.cpp
@@ -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")) {
diff --git a/scene/io/resource_format_image.cpp b/scene/io/resource_format_image.cpp
index 2663ac0762..8527498fc2 100644
--- a/scene/io/resource_format_image.cpp
+++ b/scene/io/resource_format_image.cpp
@@ -180,6 +180,11 @@ RES ResourceFormatLoaderImage::load(const String &p_path,const String& p_origina
if (flags_found["tolinear"])
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();
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index cd0e16a12a..ad0e21093d 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -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
};