aboutsummaryrefslogtreecommitdiff
path: root/src/Platform/OpenGL/OpenGLRendererAPI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Platform/OpenGL/OpenGLRendererAPI.cpp')
-rw-r--r--src/Platform/OpenGL/OpenGLRendererAPI.cpp5
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);
}