mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
[HTML5] Editor video driver option. Replace canvas on exit.
Default is "Auto", but can be forced to a specific WebGL version if the automatic detection fails. The game and editor canvas are now replaced with a new one in the exit hooks. This helps the browser do some context cleanup, and allow us to create a new context of a different type (WebGL/WebGL2). Enable GLES3/WebGL2 in the Web Editor.
This commit is contained in:
parent
11d1b0387e
commit
3a61d0990e
2 changed files with 30 additions and 16 deletions
|
@ -702,14 +702,10 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
|
|||
set_window_per_pixel_transparency_enabled(true);
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
bool gles3 = false;
|
||||
#else
|
||||
bool gles3 = true;
|
||||
if (p_video_driver == VIDEO_DRIVER_GLES2) {
|
||||
gles3 = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool gl_initialization_error = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue