aboutsummaryrefslogtreecommitdiff
path: root/src/Platform/OpenGL/OpenGLVertexArray.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-18 15:00:34 +0200
committerhachem <im@hachem.wtf>2026-08-18 15:00:34 +0200
commitdfe9da43dab6c933bc1024f992383f08e01386de (patch)
tree8f52e80e0b2a65eaacdbf5fa056721e7fa4e9fa5 /src/Platform/OpenGL/OpenGLVertexArray.cpp
parent86df8b19063f73b7803daaa1e5b21da33ac976ed (diff)
[fix]: macos compatibility
Diffstat (limited to 'src/Platform/OpenGL/OpenGLVertexArray.cpp')
-rw-r--r--src/Platform/OpenGL/OpenGLVertexArray.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Platform/OpenGL/OpenGLVertexArray.cpp b/src/Platform/OpenGL/OpenGLVertexArray.cpp
index 6019287..afe5fe2 100644
--- a/src/Platform/OpenGL/OpenGLVertexArray.cpp
+++ b/src/Platform/OpenGL/OpenGLVertexArray.cpp
@@ -6,9 +6,11 @@
namespace Donut
{
- OpenGLVertexArray::OpenGLVertexArray()
+ OpenGLVertexArray::OpenGLVertexArray()
{
- glCreateVertexArrays(1, &m_RendererID);
+ // glCreateVertexArrays is 4.5 DSA; macOS caps at 4.1. glGenVertexArrays
+ // reserves the name and the VAO is created on first bind (done below).
+ glGenVertexArrays(1, &m_RendererID);
}
OpenGLVertexArray::~OpenGLVertexArray()