Fix feature test for `GL_CAPS_ARGB8` in Emscripten builds

This commit is contained in:
刘皓 2025-04-26 19:11:19 -04:00
parent 3036fecc7c
commit ebd79bfa72
No known key found for this signature in database
GPG Key ID: 7901753DB465B711
1 changed files with 5 additions and 1 deletions

View File

@ -190,11 +190,15 @@ bool gl_check_capability(enum gl_capability_enum enum_idx)
break;
#endif
case GL_CAPS_ARGB8:
#ifdef HAVE_OPENGLES
#if defined(HAVE_OPENGLES) && !defined(EMSCRIPTEN)
if (gl_query_extension("OES_rgb8_rgba8")
|| gl_query_extension("ARM_rgba8")
|| major >= 3)
return true;
#elif defined(HAVE_OPENGLES) && defined(EMSCRIPTEN)
if (gl_query_extension("EXT_sRGB")
|| major >= 3)
return true;
#else
/* TODO/FIXME - implement this for non-GLES? */
#endif