mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
Merge pull request #71561 from akien-mga/android-displayserver-duplicate-error
Improve DisplayServer message for video card drivers failure
This commit is contained in:
commit
f0326297b3
@ -466,14 +466,15 @@ Vector<String> DisplayServerAndroid::get_rendering_drivers_func() {
|
||||
DisplayServer *DisplayServerAndroid::create_func(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, int p_screen, Error &r_error) {
|
||||
DisplayServer *ds = memnew(DisplayServerAndroid(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_position, p_resolution, p_screen, r_error));
|
||||
if (r_error != OK) {
|
||||
OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan versions.", "Unable to initialize Video driver");
|
||||
if (p_rendering_driver == "vulkan") {
|
||||
OS::get_singleton()->alert("Your video card driver does not support the selected Vulkan version.\n"
|
||||
"Please try exporting your game using the gl_compatibility renderer.",
|
||||
"Unable to initialize Video driver");
|
||||
OS::get_singleton()->alert(
|
||||
"Your device seems not to support the required Vulkan version.\n\n"
|
||||
"Please try exporting your game using the 'gl_compatibility' renderer.",
|
||||
"Unable to initialize Vulkan video driver");
|
||||
} else {
|
||||
OS::get_singleton()->alert("Your video card driver does not support OpenGL ES 3.0.",
|
||||
"Unable to initialize Video driver");
|
||||
OS::get_singleton()->alert(
|
||||
"Your device seems not to support the required OpenGL ES 3.0 version.",
|
||||
"Unable to initialize OpenGL video driver");
|
||||
}
|
||||
}
|
||||
return ds;
|
||||
|
@ -56,16 +56,9 @@ DisplayServerIOS::DisplayServerIOS(const String &p_rendering_driver, WindowMode
|
||||
tts = [[TTS_IOS alloc] init];
|
||||
|
||||
#if defined(GLES3_ENABLED)
|
||||
// FIXME: Add support for both OpenGL and Vulkan when OpenGL is implemented
|
||||
// again,
|
||||
// Note that we should be checking "opengl3" as the driver, might never enable this seeing OpenGL is deprecated on iOS
|
||||
// We are hardcoding the rendering_driver to "vulkan" down below
|
||||
|
||||
if (rendering_driver == "opengl3") {
|
||||
bool gl_initialization_error = false;
|
||||
|
||||
// FIXME: Add Vulkan support via MoltenVK. Add fallback code back?
|
||||
|
||||
if (RasterizerGLES3::is_viable() == OK) {
|
||||
RasterizerGLES3::register_config();
|
||||
RasterizerGLES3::make_current();
|
||||
@ -74,22 +67,10 @@ DisplayServerIOS::DisplayServerIOS(const String &p_rendering_driver, WindowMode
|
||||
}
|
||||
|
||||
if (gl_initialization_error) {
|
||||
OS::get_singleton()->alert("Your device does not support any of the supported OpenGL versions.", "Unable to initialize video driver");
|
||||
// return ERR_UNAVAILABLE;
|
||||
OS::get_singleton()->alert(
|
||||
"Your device seems not to support the required OpenGL ES 3.0 version.\n\n",
|
||||
"Unable to initialize OpenGL video driver");
|
||||
}
|
||||
|
||||
// rendering_server = memnew(RenderingServerDefault);
|
||||
// // FIXME: Reimplement threaded rendering
|
||||
// if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
|
||||
// rendering_server = memnew(RenderingServerWrapMT(rendering_server,
|
||||
// false));
|
||||
// }
|
||||
// rendering_server->init();
|
||||
// rendering_server->cursor_set_visible(false, 0);
|
||||
|
||||
// reset this to what it should be, it will have been set to 0 after
|
||||
// rendering_server->init() is called
|
||||
// RasterizerStorageGLES3system_fbo = gl_view_base_fb;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -4576,18 +4576,20 @@ DisplayServer *DisplayServerX11::create_func(const String &p_rendering_driver, W
|
||||
if (r_error != OK) {
|
||||
if (p_rendering_driver == "vulkan") {
|
||||
String executable_name = OS::get_singleton()->get_executable_path().get_file();
|
||||
OS::get_singleton()->alert("Your video card driver does not support the selected Vulkan version.\n"
|
||||
"Please try updating your GPU driver or try using the OpenGL 3 driver.\n"
|
||||
"You can enable the OpenGL 3 driver by starting the engine from the\n"
|
||||
"command line with the command:\n'./" +
|
||||
executable_name + " --rendering-driver opengl3'.\n "
|
||||
"If you have updated your graphics drivers recently, try rebooting.",
|
||||
"Unable to initialize Video driver");
|
||||
OS::get_singleton()->alert(
|
||||
vformat("Your video card drivers seem not to support the required Vulkan version.\n\n"
|
||||
"If possible, consider updating your video card drivers or using the OpenGL 3 driver.\n\n"
|
||||
"You can enable the OpenGL 3 driver by starting the engine from the\n"
|
||||
"command line with the command:\n'%s --rendering-driver opengl3'\n\n"
|
||||
"If you recently updated your video card drivers, try rebooting.",
|
||||
executable_name),
|
||||
"Unable to initialize Vulkan video driver");
|
||||
} else {
|
||||
OS::get_singleton()->alert("Your video card driver does not support the selected OpenGL version.\n"
|
||||
"Please try updating your GPU driver.\n"
|
||||
"If you have updated your graphics drivers recently, try rebooting.",
|
||||
"Unable to initialize Video driver");
|
||||
OS::get_singleton()->alert(
|
||||
"Your video card drivers seem not to support the required OpenGL 3.3 version.\n\n"
|
||||
"If possible, consider updating your video card drivers.\n\n"
|
||||
"If you recently updated your video card drivers, try rebooting.",
|
||||
"Unable to initialize OpenGL video driver");
|
||||
}
|
||||
}
|
||||
return ds;
|
||||
|
@ -3607,18 +3607,18 @@ DisplayServer *DisplayServerMacOS::create_func(const String &p_rendering_driver,
|
||||
} else {
|
||||
executable_command = vformat("open %s --args --rendering-driver opengl3", OS::get_singleton()->get_bundle_resource_dir().path_join("../..").simplify_path());
|
||||
}
|
||||
OS::get_singleton()->alert("Your video card driver does not support the selected Vulkan version.\n"
|
||||
"Please try updating your GPU driver or try using the OpenGL 3 driver.\n"
|
||||
"You can enable the OpenGL 3 driver by starting the engine from the\n"
|
||||
"command line with the command: '" +
|
||||
executable_command + "'.\n"
|
||||
"If you have updated your graphics drivers recently, try rebooting.",
|
||||
"Unable to initialize Video driver");
|
||||
OS::get_singleton()->alert(
|
||||
vformat("Your video card drivers seem not to support the required Vulkan version.\n\n"
|
||||
"If possible, consider updating your macOS version or using the OpenGL 3 driver.\n\n"
|
||||
"You can enable the OpenGL 3 driver by starting the engine from the\n"
|
||||
"command line with the command:\n'%s'",
|
||||
executable_command),
|
||||
"Unable to initialize Vulkan video driver");
|
||||
} else {
|
||||
OS::get_singleton()->alert("Your video card driver does not support the selected OpenGL version.\n"
|
||||
"Please try updating your GPU driver.\n"
|
||||
"If you have updated your graphics drivers recently, try rebooting.",
|
||||
"Unable to initialize Video driver");
|
||||
OS::get_singleton()->alert(
|
||||
"Your video card drivers seem not to support the required OpenGL 3.3 version.\n\n"
|
||||
"If possible, consider updating your macOS version.",
|
||||
"Unable to initialize OpenGL video driver");
|
||||
}
|
||||
}
|
||||
return ds;
|
||||
|
@ -787,8 +787,10 @@ DisplayServerWeb::DisplayServerWeb(const String &p_rendering_driver, WindowMode
|
||||
RasterizerGLES3::make_current();
|
||||
|
||||
} else {
|
||||
OS::get_singleton()->alert("Your browser does not seem to support WebGL2. Please update your browser version.",
|
||||
"Unable to initialize video driver");
|
||||
OS::get_singleton()->alert(
|
||||
"Your browser seems not to support WebGL 2.\n\n"
|
||||
"If possible, consider updating your browser version and video card drivers.",
|
||||
"Unable to initialize WebGL 2 video driver");
|
||||
RasterizerDummy::make_current();
|
||||
}
|
||||
#else
|
||||
|
@ -4145,18 +4145,20 @@ DisplayServer *DisplayServerWindows::create_func(const String &p_rendering_drive
|
||||
if (r_error != OK) {
|
||||
if (p_rendering_driver == "vulkan") {
|
||||
String executable_name = OS::get_singleton()->get_executable_path().get_file();
|
||||
OS::get_singleton()->alert("Your video card driver does not support the selected Vulkan version.\n"
|
||||
"Please try updating your GPU driver or try using the OpenGL 3 driver.\n"
|
||||
"You can enable the OpenGL 3 driver by starting the engine from the\n"
|
||||
"command line with the command:\n'./" +
|
||||
executable_name + " --rendering-driver opengl3'.\n "
|
||||
"If you have updated your graphics drivers recently, try rebooting.",
|
||||
"Unable to initialize Video driver");
|
||||
OS::get_singleton()->alert(
|
||||
vformat("Your video card drivers seem not to support the required Vulkan version.\n\n"
|
||||
"If possible, consider updating your video card drivers or using the OpenGL 3 driver.\n\n"
|
||||
"You can enable the OpenGL 3 driver by starting the engine from the\n"
|
||||
"command line with the command:\n'%s --rendering-driver opengl3'\n\n"
|
||||
"If you have recently updated your video card drivers, try rebooting.",
|
||||
executable_name),
|
||||
"Unable to initialize Vulkan video driver");
|
||||
} else {
|
||||
OS::get_singleton()->alert("Your video card driver does not support the selected OpenGL version.\n"
|
||||
"Please try updating your GPU driver.\n"
|
||||
"If you have updated your graphics drivers recently, try rebooting.",
|
||||
"Unable to initialize Video driver");
|
||||
OS::get_singleton()->alert(
|
||||
"Your video card drivers seem not to support the required OpenGL 3.3 version.\n\n"
|
||||
"If possible, consider updating your video card drivers.\n\n"
|
||||
"If you have recently updated your video card drivers, try rebooting.",
|
||||
"Unable to initialize OpenGL video driver");
|
||||
}
|
||||
}
|
||||
return ds;
|
||||
|
Loading…
Reference in New Issue
Block a user