mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 04:50:34 +05:00
load opengl buffer-functions only if USE_BUFFERS is set
This commit is contained in:
parent
74fa8d1888
commit
2b0d3f02ba
@ -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() { }
|
||||
|
Loading…
Reference in New Issue
Block a user