From 2b0d3f02ba6c58f8c4c2a394bc24d1a0905d181e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Mon, 8 May 2017 21:20:36 +0200 Subject: [PATCH] load opengl buffer-functions only if USE_BUFFERS is set --- libsrc/visualization/vssolution.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libsrc/visualization/vssolution.cpp b/libsrc/visualization/vssolution.cpp index a61036e6..06a2b2bb 100644 --- a/libsrc/visualization/vssolution.cpp +++ b/libsrc/visualization/vssolution.cpp @@ -4836,12 +4836,14 @@ void (*glGenBuffers) (GLsizei a, GLuint *b); void (*glBufferData) (GLenum a, GLsizeiptr b, const GLvoid *c, GLenum d); void (*glBufferSubData) (GLenum a, GLintptr b, GLsizeiptr c, const GLvoid *d); DLL_HEADER void LoadOpenGLFunctionPointers() { +#ifdef USE_BUFFERS glBindBuffer = (decltype(glBindBuffer)) wglGetProcAddress("glBindBuffer"); glBufferSubData = (decltype(glBufferSubData)) wglGetProcAddress("glBufferSubData"); glBufferData = (decltype(glBufferData)) wglGetProcAddress("glBufferData"); glDeleteBuffers = (decltype(glDeleteBuffers)) wglGetProcAddress("glDeleteBuffers"); glGenBuffers = (decltype(glGenBuffers)) wglGetProcAddress("glGenBuffers"); if(!glBindBuffer) throw std::runtime_error("Could not load OpenGL functions!"); +#endif } #else // WIN32 DLL_HEADER void LoadOpenGLFunctionPointers() { }