mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Remove obsolete GLES3 backend
Due to the port to Vulkan and complete redesign of the rendering backend, the `drivers/gles3` code is no longer usable in this state and is not planned to be ported to the new architecture. The GLES2 backend is kept (while still disabled and non-working) as it will eventually be ported to serve as the low-end renderer for Godot 4.0. Some GLES3 features might be selectively ported to the updated GLES2 backend if there's a need for them, and extensions we can use for that. So long, OpenGL driver bugs!
This commit is contained in:
parent
d661ca5357
commit
386968ea97
82 changed files with 97 additions and 27728 deletions
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include "core/io/file_access_buffered_fa.h"
|
||||
#include "drivers/gles2/rasterizer_gles2.h"
|
||||
#include "drivers/gles3/rasterizer_gles3.h"
|
||||
#include "drivers/unix/dir_access_unix.h"
|
||||
#include "drivers/unix/file_access_unix.h"
|
||||
#include "main/main.h"
|
||||
|
@ -825,8 +824,6 @@ int OS_JavaScript::get_video_driver_count() const {
|
|||
const char *OS_JavaScript::get_video_driver_name(int p_driver) const {
|
||||
|
||||
switch (p_driver) {
|
||||
case VIDEO_DRIVER_GLES3:
|
||||
return "GLES3";
|
||||
case VIDEO_DRIVER_GLES2:
|
||||
return "GLES2";
|
||||
}
|
||||
|
@ -908,41 +905,14 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
|
|||
set_window_per_pixel_transparency_enabled(true);
|
||||
}
|
||||
|
||||
bool gles3 = true;
|
||||
if (p_video_driver == VIDEO_DRIVER_GLES2) {
|
||||
gles3 = false;
|
||||
}
|
||||
|
||||
bool gl_initialization_error = false;
|
||||
|
||||
while (true) {
|
||||
if (gles3) {
|
||||
if (RasterizerGLES3::is_viable() == OK) {
|
||||
attributes.majorVersion = 2;
|
||||
RasterizerGLES3::register_config();
|
||||
RasterizerGLES3::make_current();
|
||||
break;
|
||||
} else {
|
||||
if (GLOBAL_GET("rendering/quality/driver/fallback_to_gles2")) {
|
||||
p_video_driver = VIDEO_DRIVER_GLES2;
|
||||
gles3 = false;
|
||||
continue;
|
||||
} else {
|
||||
gl_initialization_error = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (RasterizerGLES2::is_viable() == OK) {
|
||||
attributes.majorVersion = 1;
|
||||
RasterizerGLES2::register_config();
|
||||
RasterizerGLES2::make_current();
|
||||
break;
|
||||
} else {
|
||||
gl_initialization_error = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (RasterizerGLES2::is_viable() == OK) {
|
||||
attributes.majorVersion = 1;
|
||||
RasterizerGLES2::register_config();
|
||||
RasterizerGLES2::make_current();
|
||||
} else {
|
||||
gl_initialization_error = true;
|
||||
}
|
||||
|
||||
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE ctx = emscripten_webgl_create_context(GODOT_CANVAS_SELECTOR, &attributes);
|
||||
|
@ -951,9 +921,8 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
|
|||
}
|
||||
|
||||
if (gl_initialization_error) {
|
||||
OS::get_singleton()->alert("Your browser does not support any of the supported WebGL versions.\n"
|
||||
"Please update your browser version.",
|
||||
"Unable to initialize Video driver");
|
||||
OS::get_singleton()->alert("Your browser does not seem to support WebGL. Please update your browser version.",
|
||||
"Unable to initialize video driver");
|
||||
return ERR_UNAVAILABLE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue