Fix build errors on Macos

- Include opengl3 headers
- Remove unneeded Opengl4.5 function call
This commit is contained in:
Matthias Hochsteger 2019-12-10 11:57:11 +01:00
parent 52b3e807a5
commit 64b1331c23
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,8 @@
# if defined(TOGL_AGL) || defined(TOGL_AGL_CLASSIC) || defined(TOGL_NSOPENGL)
#define GL_SILENCE_DEPRECATION
# include <OpenGL/gl.h>
#define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
# include <OpenGL/gl3.h>
# include <OpenGL/glu.h>
# else
# include <GL/gl.h>

View File

@ -827,7 +827,6 @@ namespace netgen
std::vector<unsigned char> 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);