mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
[HTML5] Implement WebGL fallback.
According to project settings and when WebGL2 is not available.
This commit is contained in:
parent
ea5b3dda93
commit
00f3807a24
3 changed files with 14 additions and 2 deletions
|
|
@ -811,7 +811,7 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
|
|||
|
||||
while (true) {
|
||||
if (gles3) {
|
||||
if (RasterizerGLES3::is_viable() == OK) {
|
||||
if (godot_js_display_has_webgl(2) && RasterizerGLES3::is_viable() == OK) {
|
||||
attributes.majorVersion = 2;
|
||||
RasterizerGLES3::register_config();
|
||||
RasterizerGLES3::make_current();
|
||||
|
|
@ -827,7 +827,7 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (RasterizerGLES2::is_viable() == OK) {
|
||||
if (godot_js_display_has_webgl(1) && RasterizerGLES2::is_viable() == OK) {
|
||||
attributes.majorVersion = 1;
|
||||
RasterizerGLES2::register_config();
|
||||
RasterizerGLES2::make_current();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue