From 90c54a489b6430c4ae2a123a1ccf1b442923d185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 21 Jun 2018 15:39:32 +0200 Subject: [PATCH] GL: don't create (and leak) VAOs when VAOs are disabled. Ugh. Discovered by looking at a code coverage report and seeing the non-VAO creation function never used. --- src/Magnum/GL/Implementation/MeshState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/GL/Implementation/MeshState.cpp b/src/Magnum/GL/Implementation/MeshState.cpp index 9bef6fa6b..f93090ade 100644 --- a/src/Magnum/GL/Implementation/MeshState.cpp +++ b/src/Magnum/GL/Implementation/MeshState.cpp @@ -92,7 +92,7 @@ MeshState::MeshState(Context& context, ContextState& contextState, std::vector()) { + if(context.isExtensionSupported() && context.isExtensionSupported()) { extensions.emplace_back(Extensions::ARB::direct_state_access::string()); createImplementation = &Mesh::createImplementationVAODSA; }