summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-03-08 01:52:11 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-03-08 03:35:13 +0100
commitaa8c8258550ad53c058ffbbeb92b5f6488f3b1df (patch)
tree26c78d11c20b14c07cf38900db8a797203cdc028
parentfd035c931df74282a9f409a8dad18b5f229fc6a2 (diff)
OS_Javascript temporarly uses dummy rasterizer.
-rw-r--r--drivers/SCsub2
-rw-r--r--platform/javascript/os_javascript.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/SCsub b/drivers/SCsub
index 932014b540..41c20d81ad 100644
--- a/drivers/SCsub
+++ b/drivers/SCsub
@@ -23,7 +23,7 @@ SConscript('coremidi/SCsub')
SConscript('winmidi/SCsub')
# Graphics drivers
-if (env["platform"] != "server"):
+if (env["platform"] != "server" and env["platform"] != "javascript"):
# SConscript('gles2/SCsub')
SConscript('vulkan/SCsub')
SConscript('gl_context/SCsub')
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index 3408995d8d..9ba0223387 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -31,7 +31,8 @@
#include "os_javascript.h"
#include "core/io/file_access_buffered_fa.h"
-#include "drivers/gles2/rasterizer_gles2.h"
+//#include "drivers/gles2/rasterizer_gles2.h"
+#include "drivers/dummy/rasterizer_dummy.h"
#include "drivers/unix/dir_access_unix.h"
#include "drivers/unix/file_access_unix.h"
#include "main/main.h"
@@ -891,6 +892,7 @@ void OS_JavaScript::initialize_core() {
Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
+#if 0
EmscriptenWebGLContextAttributes attributes;
emscripten_webgl_init_context_attributes(&attributes);
attributes.alpha = GLOBAL_GET("display/window/per_pixel_transparency/allowed");
@@ -947,6 +949,8 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
} else {
set_window_size(get_window_size());
}
+#endif
+ RasterizerDummy::make_current(); // TODO GLES2 in Godot 4.0... or webgpu?
char locale_ptr[16];
/* clang-format off */