From 64b1331c23375e85f522b42cbd54314297a87824 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Tue, 10 Dec 2019 11:57:11 +0100 Subject: [PATCH] Fix build errors on Macos - Include opengl3 headers - Remove unneeded Opengl4.5 function call --- libsrc/include/incopengl.hpp | 3 ++- libsrc/visualization/mvdraw.cpp | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libsrc/include/incopengl.hpp b/libsrc/include/incopengl.hpp index d8c3bcea..c4630a09 100644 --- a/libsrc/include/incopengl.hpp +++ b/libsrc/include/incopengl.hpp @@ -6,7 +6,8 @@ # if defined(TOGL_AGL) || defined(TOGL_AGL_CLASSIC) || defined(TOGL_NSOPENGL) #define GL_SILENCE_DEPRECATION -# include +#define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED +# include # include # else # include diff --git a/libsrc/visualization/mvdraw.cpp b/libsrc/visualization/mvdraw.cpp index b9c5f4dc..6754b7de 100644 --- a/libsrc/visualization/mvdraw.cpp +++ b/libsrc/visualization/mvdraw.cpp @@ -827,7 +827,6 @@ namespace netgen std::vector buffer(w*h*3); glPixelStorei(GL_UNPACK_ALIGNMENT,1); glPixelStorei(GL_PACK_ALIGNMENT,1); - glNamedFramebufferReadBuffer( fb, GL_COLOR_ATTACHMENT0 ); glReadPixels (0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, &buffer[0]); glDeleteRenderbuffers(1, &depthrenderbuffer);