summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2019-03-02 17:12:01 -0800
committerclayjohn <claynjohn@gmail.com>2019-03-02 19:01:26 -0800
commit95837049e8ff920c6a2df5b093040a5d8e581c75 (patch)
treebb91f96372ae539143eadf89bf88bb1439caa25d
parent8d117b214f2bcd14015532fdfbed9b3f059da0e6 (diff)
hide hdr and shadow_contact in gles2
-rw-r--r--scene/3d/light.cpp7
-rw-r--r--scene/3d/light.h1
-rw-r--r--scene/main/viewport.cpp7
-rw-r--r--scene/main/viewport.h1
4 files changed, 16 insertions, 0 deletions
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index 3b514dab8c..cf1af918f7 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -210,6 +210,13 @@ bool Light::is_editor_only() const {
return editor_only;
}
+void Light::_validate_property(PropertyInfo &property) const {
+
+ if (VisualServer::get_singleton()->is_low_end() && property.name == "shadow_contact") {
+ property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
+ }
+}
+
void Light::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_editor_only", "editor_only"), &Light::set_editor_only);
diff --git a/scene/3d/light.h b/scene/3d/light.h
index 85e0ce3c24..ddd5bc6b3a 100644
--- a/scene/3d/light.h
+++ b/scene/3d/light.h
@@ -92,6 +92,7 @@ protected:
static void _bind_methods();
void _notification(int p_what);
+ virtual void _validate_property(PropertyInfo &property) const;
Light(VisualServer::LightType p_type);
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 090e6bdcb0..5bfdb5a9fd 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2923,6 +2923,13 @@ bool Viewport::is_handling_input_locally() const {
return handle_input_locally;
}
+void Viewport::_validate_property(PropertyInfo &property) const {
+
+ if (VisualServer::get_singleton()->is_low_end() && property.name == "hdr") {
+ property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
+ }
+}
+
void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_arvr", "use"), &Viewport::set_use_arvr);
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 4d0a4e8c87..b8b5bf07a7 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -390,6 +390,7 @@ private:
protected:
void _notification(int p_what);
static void _bind_methods();
+ virtual void _validate_property(PropertyInfo &property) const;
public:
Listener *get_listener() const;