summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-06-16 21:47:28 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-06-16 21:49:37 -0300
commitb19225bfce3dab39f8ce6b1ecf610ea0ba650f99 (patch)
tree7946e6eabae1c679a404a9146343fe2b6f2672b7 /servers
parent8a03a29233d5ef4cf5be3aeebd76cb77c82bc983 (diff)
-Fix freezes caused by etccomp2, closes #9183
-Normalmaps are now detected and imported as RGTC, both in S3TC and ETC2, this improves their quality.
Diffstat (limited to 'servers')
-rw-r--r--servers/visual/rasterizer.h1
-rw-r--r--servers/visual/visual_server_raster.h1
-rw-r--r--servers/visual/visual_server_wrap_mt.h1
-rw-r--r--servers/visual_server.cpp4
-rw-r--r--servers/visual_server.h1
5 files changed, 8 insertions, 0 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 35b9d0284d..44cfbf74ce 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -189,6 +189,7 @@ public:
virtual void texture_set_detect_3d_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata) = 0;
virtual void texture_set_detect_srgb_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata) = 0;
+ virtual void texture_set_detect_normal_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata) = 0;
virtual void textures_keep_original(bool p_enable) = 0;
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index 887933f7fc..ee08c74a71 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -646,6 +646,7 @@ public:
BIND3(texture_set_detect_3d_callback, RID, TextureDetectCallback, void *)
BIND3(texture_set_detect_srgb_callback, RID, TextureDetectCallback, void *)
+ BIND3(texture_set_detect_normal_callback, RID, TextureDetectCallback, void *)
BIND2(texture_set_path, RID, const String &)
BIND1RC(String, texture_get_path, RID)
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index 8df46b6bab..7df9c39eb2 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -92,6 +92,7 @@ public:
FUNC3(texture_set_detect_3d_callback, RID, TextureDetectCallback, void *)
FUNC3(texture_set_detect_srgb_callback, RID, TextureDetectCallback, void *)
+ FUNC3(texture_set_detect_normal_callback, RID, TextureDetectCallback, void *)
FUNC2(texture_set_path, RID, const String &)
FUNC1RC(String, texture_get_path, RID)
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index b2dda455e9..caaef46d24 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -1564,6 +1564,10 @@ VisualServer::VisualServer() {
//ERR_FAIL_COND(singleton);
singleton = this;
+ GLOBAL_DEF("rendering/vram_formats/use_s3tc", true);
+ GLOBAL_DEF("rendering/vram_formats/use_etc", false);
+ GLOBAL_DEF("rendering/vram_formats/use_etc2", true);
+ GLOBAL_DEF("rendering/vram_formats/use_pvrtc", false);
}
VisualServer::~VisualServer() {
diff --git a/servers/visual_server.h b/servers/visual_server.h
index c41f134bcc..4940438daf 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -128,6 +128,7 @@ public:
virtual void texture_set_detect_3d_callback(RID p_texture, TextureDetectCallback p_callback, void *p_userdata) = 0;
virtual void texture_set_detect_srgb_callback(RID p_texture, TextureDetectCallback p_callback, void *p_userdata) = 0;
+ virtual void texture_set_detect_normal_callback(RID p_texture, TextureDetectCallback p_callback, void *p_userdata) = 0;
struct TextureInfo {
RID texture;