summaryrefslogtreecommitdiffstats
path: root/platform/web/platform_gl.h
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2024-06-22 15:55:48 -0500
committerDavid Snopek <dsnopek@gmail.com>2024-06-24 10:57:22 -0500
commit8e242fe7c11cb1a6853c0658290b27678558e400 (patch)
tree9d708bc70b58667fb529e7a87fbbdccea3d93ecc /platform/web/platform_gl.h
parent8a6c1e8f5232ff3b3a5eac024d590e7479b29e90 (diff)
downloadredot-engine-8e242fe7c11cb1a6853c0658290b27678558e400.tar.gz
Disable `*glGetProcAddress()` on the web
Diffstat (limited to 'platform/web/platform_gl.h')
-rw-r--r--platform/web/platform_gl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/web/platform_gl.h b/platform/web/platform_gl.h
index be6e1462a7..8aadab81de 100644
--- a/platform/web/platform_gl.h
+++ b/platform/web/platform_gl.h
@@ -35,6 +35,10 @@
#define GLES_API_ENABLED // Allow using GLES.
#endif
+// Make using *glGetProcAddress() an error on the web.
+#define glGetProcAddress(n) static_assert(false, "Usage of glGetProcessAddress() on the web is a bug.")
+#define eglGetProcAddress(n) static_assert(false, "Usage of eglGetProcessAddress() on the web is a bug.")
+
#include "platform/web/godot_webgl2.h"
#endif // PLATFORM_GL_H