diff options
author | clayjohn <claynjohn@gmail.com> | 2019-03-02 15:45:14 -0800 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2019-03-03 11:26:08 -0800 |
commit | d566c5b75e62eee687bedf3ca095862b11866f47 (patch) | |
tree | ee56013eddbcdfef55afb16adcbb653fb5d5a6eb /scene/3d | |
parent | 8d117b214f2bcd14015532fdfbed9b3f059da0e6 (diff) |
add warning to GIProbe when using GLES2
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/gi_probe.cpp | 10 | ||||
-rw-r--r-- | scene/3d/gi_probe.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 5b08ea7790..c491275f00 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -30,6 +30,8 @@ #include "gi_probe.h" +#include "core/os/os.h" + #include "mesh_instance.h" #include "voxel_light_baker.h" @@ -490,6 +492,14 @@ PoolVector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const { return PoolVector<Face3>(); } +String GIProbe::get_configuration_warning() const { + + if (OS::get_singleton()->get_current_video_driver() == OS::VIDEO_DRIVER_GLES2) { + return TTR("GIProbes are not supported by the GLES2 video driver.\nUse a BakedLightmap instead."); + } + return String(); +} + void GIProbe::_bind_methods() { ClassDB::bind_method(D_METHOD("set_probe_data", "data"), &GIProbe::set_probe_data); diff --git a/scene/3d/gi_probe.h b/scene/3d/gi_probe.h index 87664e06b8..4badabbadf 100644 --- a/scene/3d/gi_probe.h +++ b/scene/3d/gi_probe.h @@ -168,6 +168,8 @@ public: virtual AABB get_aabb() const; virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual String get_configuration_warning() const; + GIProbe(); ~GIProbe(); }; |