1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-06 19:41:11 +00:00

Merge pull request #26511 from clayjohn/giprobe_gles2_warning

Add warning to GIProbe when using GLES2
This commit is contained in:
Rémi Verschelde
2019-03-04 09:40:20 +01:00
committed by GitHub
2 changed files with 12 additions and 0 deletions

View File

@@ -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);

View File

@@ -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();
};