Warn when using GPU particles with GLES2

Closes #25733.
This commit is contained in:
Rémi Verschelde
2019-02-09 20:49:58 +01:00
parent 5fa5678eb7
commit 034cd62a77
3 changed files with 18 additions and 6 deletions
+6
View File
@@ -29,6 +29,8 @@
/*************************************************************************/
#include "particles.h"
#include "core/os/os.h"
#include "scene/resources/particles_material.h"
#include "servers/visual_server.h"
@@ -224,6 +226,10 @@ bool Particles::get_fractional_delta() const {
String Particles::get_configuration_warning() const {
if (OS::get_singleton()->get_current_video_driver() == OS::VIDEO_DRIVER_GLES2) {
return TTR("GPU-based particles are not supported by the GLES2 video driver.\nUse the CPUParticles node instead. You can use the \"Convert to CPUParticles\" option for this purpose.");
}
String warnings;
bool meshes_found = false;