diff options
| author | Andre Weissflog <floooh@gmail.com> | 2025-10-23 17:09:26 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2025-10-23 17:09:26 +0200 |
| commit | 9e4b3bf223989b9dc5ab856b8c312b6813613ae3 (patch) | |
| tree | fdcfb843a442fb8982bbd25cc2664d702a99a70b /sokol_gfx.h | |
| parent | 78d2c6db1c37f045862c79cd9040c46c405a150f (diff) | |
sokol_gfx.h gl: fix static GL feature detection defines
Diffstat (limited to 'sokol_gfx.h')
| -rw-r--r-- | sokol_gfx.h | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h index 5f2fd6f7..8f1af9f7 100644 --- a/sokol_gfx.h +++ b/sokol_gfx.h @@ -5436,11 +5436,17 @@ inline int sg_append_buffer(sg_buffer buf_id, const sg_range& data) { return sg_ // broad GL feature availability defines (DON'T merge this into the above ifdef-block!) #if defined(_WIN32) - #define _SOKOL_GL_HAS_COMPUTE (1) - #define _SOKOL_GL_HAS_TEXSTORAGE (1) - #define _SOKOL_GL_HAS_TEXVIEWS (1) - #define _SOKOL_GL_HAS_BASEVERTEX (1) - #define _SOKOL_GL_HAS_BASEINSTANCE (1) + #if defined(GL_VERSION_4_3) || defined(_SOKOL_USE_WIN32_GL_LOADER) + #define _SOKOL_GL_HAS_COMPUTE (1) + #define _SOKOL_GL_HAS_TEXVIEWS (1) + #endif + #if defined(GL_VERSION_4_2) || defined(_SOKOL_USE_WIN32_GL_LOADER) + #define _SOKOL_GL_HAS_TEXSTORAGE (1) + #define _SOKOL_GL_HAS_BASEINSTANCE (1) + #endif + #if defined(GL_VERSION_3_2) || defined(_SOKOL_USE_WIN32_GL_LOADER) + #define _SOKOL_GL_HAS_BASEVERTEX (1) + #endif #elif defined(__APPLE__) #if defined(TARGET_OS_IPHONE) && !TARGET_OS_IPHONE #define _SOKOL_GL_HAS_BASEVERTEX (1) @@ -5453,12 +5459,22 @@ inline int sg_append_buffer(sg_buffer buf_id, const sg_range& data) { return sg_ #define _SOKOL_GL_HAS_COMPUTE (1) #define _SOKOL_GL_HAS_TEXSTORAGE (1) #elif defined(__linux__) || defined(__unix__) - #define _SOKOL_GL_HAS_COMPUTE (1) - #define _SOKOL_GL_HAS_TEXSTORAGE (1) - #define _SOKOL_GL_HAS_BASEVERTEX (1) #if defined(SOKOL_GLCORE) - #define _SOKOL_GL_HAS_TEXVIEWS (1) - #define _SOKOL_GL_HAS_BASEINSTANCE (1) + #if defined(GL_VERSION_4_3) + #define _SOKOL_GL_HAS_COMPUTE (1) + #define _SOKOL_GL_HAS_TEXVIEWS (1) + #endif + #if defined(GL_VERSION_4_2) + #define _SOKOL_GL_HAS_TEXSTORAGE (1) + #define _SOKOL_GL_HAS_BASEINSTANCE (1) + #endif + #if defined(GL_VERSION_3_2) + #define _SOKOL_GL_HAS_BASEVERTEX (1) + #endif + #else + #define _SOKOL_GL_HAS_COMPUTE (1) + #define _SOKOL_GL_HAS_TEXSTORAGE (1) + #define _SOKOL_GL_HAS_BASEVERTEX (1) #endif #endif |