summaryrefslogtreecommitdiffhomepage
path: root/src/platforms
diff options
context:
space:
mode:
authorRay <[email protected]>2023-11-02 18:13:37 +0100
committerRay <[email protected]>2023-11-02 18:13:37 +0100
commit807516a991deef0eae23980b9a829721028ab8c8 (patch)
treebe17f3ecbb778df572e6f56d0d7a5b94703eae1a /src/platforms
parentb40f93b9e35ca8b2aa2e897eadb90187c2f93d4a (diff)
downloadraylib-807516a991deef0eae23980b9a829721028ab8c8.tar.gz
raylib-807516a991deef0eae23980b9a829721028ab8c8.zip
Support OpenGL ES 3.0 building on Web
For some reason, the equivalent requested context (WebGL 2.0) is not provided, despite being properly requested.
Diffstat (limited to 'src/platforms')
-rw-r--r--src/platforms/rcore_web.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c
index c5bd5536..23361618 100644
--- a/src/platforms/rcore_web.c
+++ b/src/platforms/rcore_web.c
@@ -45,7 +45,9 @@
*
**********************************************************************************************/
-#include "GLFW/glfw3.h" // GLFW3: Windows, OpenGL context and Input management
+#define GLFW_INCLUDE_NONE // Disable the standard OpenGL header inclusion on GLFW3
+ // NOTE: Already provided by rlgl implementation (on glad.h)
+#include "GLFW/glfw3.h" // GLFW3: Windows, OpenGL context and Input management
#include <emscripten/emscripten.h> // Emscripten functionality for C
#include <emscripten/html5.h> // Emscripten HTML5 library
@@ -759,6 +761,7 @@ int InitPlatform(void)
}
else if (rlGetVersion() == RL_OPENGL_ES_30) // Request OpenGL ES 3.0 context
{
+ // TODO: It seems WebGL 2.0 context is not set despite being requested
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);