diff options
| author | hachem <im@hachem.wtf> | 2026-08-18 15:00:34 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-18 15:00:34 +0200 |
| commit | dfe9da43dab6c933bc1024f992383f08e01386de (patch) | |
| tree | 8f52e80e0b2a65eaacdbf5fa056721e7fa4e9fa5 /src/Platform/OpenGL/OpenGLRendererAPI.cpp | |
| parent | 86df8b19063f73b7803daaa1e5b21da33ac976ed (diff) | |
[fix]: macos compatibility
Diffstat (limited to 'src/Platform/OpenGL/OpenGLRendererAPI.cpp')
| -rw-r--r-- | src/Platform/OpenGL/OpenGLRendererAPI.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Platform/OpenGL/OpenGLRendererAPI.cpp b/src/Platform/OpenGL/OpenGLRendererAPI.cpp index 230b19b..fd3c491 100644 --- a/src/Platform/OpenGL/OpenGLRendererAPI.cpp +++ b/src/Platform/OpenGL/OpenGLRendererAPI.cpp @@ -103,7 +103,10 @@ namespace Donut void OpenGLRendererAPI::BindImageTexture(uint32_t textureID, uint32_t slot, bool readOnly) { - glBindImageTexture(slot, textureID, 0, GL_FALSE, 0, + // Image load/store is OpenGL 4.2; the pointer is null on macOS (4.1). + if (glBindImageTexture == nullptr) + return; + glBindImageTexture(slot, textureID, 0, GL_FALSE, 0, readOnly ? GL_READ_ONLY : GL_WRITE_ONLY, GL_RGBA8); } |
