From 807516a991deef0eae23980b9a829721028ab8c8 Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 2 Nov 2023 18:13:37 +0100 Subject: 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. --- src/platforms/rcore_web.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/platforms') 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 functionality for C #include // 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); -- cgit v1.2.3