diff options
| author | Andre Weissflog <floooh@gmail.com> | 2019-07-28 18:17:42 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2019-07-28 18:17:42 +0200 |
| commit | e734ef4021ef77f1e687e8a5c50f5fe3f5b89b50 (patch) | |
| tree | f618919ac0b9ca471d0bd378e32ee829868acbcd /sokol_gfx.h | |
| parent | 4a8054f47157a9c3ee59689ba30d743b2c3fc1af (diff) | |
sokol_gfx: fix S3TC detection in browser
Diffstat (limited to 'sokol_gfx.h')
| -rw-r--r-- | sokol_gfx.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h index 272e8460..a7e3cc5e 100644 --- a/sokol_gfx.h +++ b/sokol_gfx.h @@ -4448,6 +4448,9 @@ _SOKOL_PRIVATE void _sg_gl_init_caps_gles3(void) { if (strstr(ext, "_texture_compression_s3tc")) { has_s3tc = true; } + else if (strstr(ext, "_compressed_texture_s3tc")) { + has_s3tc = true; + } else if (strstr(ext, "_texture_compression_rgtc")) { has_rgtc = true; } @@ -4521,7 +4524,7 @@ _SOKOL_PRIVATE void _sg_gl_init_caps_gles2(void) { bool has_instancing = false; const char* ext = (const char*) glGetString(GL_EXTENSIONS); if (ext) { - has_s3tc = strstr(ext, "_texture_compression_s3tc"); + has_s3tc = strstr(ext, "_texture_compression_s3tc") || strstr(ext, "_compressed_texture_s3tc"); has_rgtc = strstr(ext, "_texture_compression_rgtc"); has_bptc = strstr(ext, "_texture_compression_bptc"); has_pvrtc = strstr(ext, "_texture_compression_pvrtc"); |