diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-10-25 19:16:40 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-11-19 16:59:27 +0100 |
commit | 46fdba5f8b09e2c52247ab28047f578e32414f1a (patch) | |
tree | bbad8bc21370aa46c5ddc2bc584586ff4c6c9e27 /platform/javascript/display_server_javascript.h | |
parent | 42f8bfaff0dc5a94ca351b1eaadc42cb95655b87 (diff) | |
download | redot-engine-46fdba5f8b09e2c52247ab28047f578e32414f1a.tar.gz |
[HTML5] Add WebGL2 (GLES3) support using the OpenGL renderer.
Note, the editor build requires the mbedtls module to be manually
enabled, as it is currently needed as a ResourceUID dependency.
This will need to be addressed in a separate PR.
Diffstat (limited to 'platform/javascript/display_server_javascript.h')
-rw-r--r-- | platform/javascript/display_server_javascript.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/javascript/display_server_javascript.h b/platform/javascript/display_server_javascript.h index 80ce772a79..843bb61984 100644 --- a/platform/javascript/display_server_javascript.h +++ b/platform/javascript/display_server_javascript.h @@ -51,6 +51,10 @@ private: }; JSKeyEvent key_event; +#ifdef GLES3_ENABLED + EMSCRIPTEN_WEBGL_CONTEXT_HANDLE webgl_ctx = 0; +#endif + WindowMode window_mode = WINDOW_MODE_WINDOWED; ObjectID window_attached_instance_id = {}; @@ -72,8 +76,6 @@ private: bool swap_cancel_ok = false; // utilities - static void focus_canvas(); - static bool is_canvas_focused(); static void dom2godot_mod(Ref<InputEventWithModifiers> ev, int p_mod); static const char *godot2dom_cursor(DisplayServer::CursorShape p_shape); @@ -121,6 +123,7 @@ public: // mouse virtual void mouse_set_mode(MouseMode p_mode) override; virtual MouseMode mouse_get_mode() const override; + virtual Point2i mouse_get_position() const override; // touch virtual bool screen_is_touchscreen(int p_screen = SCREEN_OF_MAIN_WINDOW) const override; |