From 68ee5d09cd799afe7cdcfb6df00c4eebe388e79f Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Wed, 2 Apr 2025 16:55:12 +0700 Subject: [PATCH] Fix[renderer]: add more OpenGL aliases for tinygl4angle Hope to fix 1.21.5 crashing issue --- Natives/external/gl4es/tinygl4angle.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Natives/external/gl4es/tinygl4angle.c b/Natives/external/gl4es/tinygl4angle.c index 0883b3d2..f83f9e83 100644 --- a/Natives/external/gl4es/tinygl4angle.c +++ b/Natives/external/gl4es/tinygl4angle.c @@ -19,6 +19,9 @@ #define AliasDecl(NAME, EXT) \ asm(".global _"# NAME "\n_" #NAME ": b _" #NAME #EXT); +#define AliasDeclPriv(NAME) \ + asm(".global _gl"# NAME "\n_gl" #NAME ": b _GL_" #NAME); + // Core OpenGL 2.0 AliasDecl(glGetTexImage, ANGLE) AliasDecl(glMapBuffer, OES) @@ -37,6 +40,10 @@ AliasDecl(glPushDebugGroup, KHR) AliasDecl(glBindFragDataLocation, EXT) AliasDecl(glBindFragDataLocationIndexed, EXT) +// Hidden functions +AliasDeclPriv(DrawBuffer) +AliasDeclPriv(PolygonMode) + int proxy_width, proxy_height, proxy_intformat, maxTextureSize; void(*gles_glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);