mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +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 (*glBufferData) (GLenum a, GLsizeiptr b, const GLvoid *c, GLenum d);
|
||||||
void (*glBufferSubData) (GLenum a, GLintptr b, GLsizeiptr c, const GLvoid *d);
|
void (*glBufferSubData) (GLenum a, GLintptr b, GLsizeiptr c, const GLvoid *d);
|
||||||
DLL_HEADER void LoadOpenGLFunctionPointers() {
|
DLL_HEADER void LoadOpenGLFunctionPointers() {
|
||||||
|
#ifdef USE_BUFFERS
|
||||||
glBindBuffer = (decltype(glBindBuffer)) wglGetProcAddress("glBindBuffer");
|
glBindBuffer = (decltype(glBindBuffer)) wglGetProcAddress("glBindBuffer");
|
||||||
glBufferSubData = (decltype(glBufferSubData)) wglGetProcAddress("glBufferSubData");
|
glBufferSubData = (decltype(glBufferSubData)) wglGetProcAddress("glBufferSubData");
|
||||||
glBufferData = (decltype(glBufferData)) wglGetProcAddress("glBufferData");
|
glBufferData = (decltype(glBufferData)) wglGetProcAddress("glBufferData");
|
||||||
glDeleteBuffers = (decltype(glDeleteBuffers)) wglGetProcAddress("glDeleteBuffers");
|
glDeleteBuffers = (decltype(glDeleteBuffers)) wglGetProcAddress("glDeleteBuffers");
|
||||||
glGenBuffers = (decltype(glGenBuffers)) wglGetProcAddress("glGenBuffers");
|
glGenBuffers = (decltype(glGenBuffers)) wglGetProcAddress("glGenBuffers");
|
||||||
if(!glBindBuffer) throw std::runtime_error("Could not load OpenGL functions!");
|
if(!glBindBuffer) throw std::runtime_error("Could not load OpenGL functions!");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#else // WIN32
|
#else // WIN32
|
||||||
DLL_HEADER void LoadOpenGLFunctionPointers() { }
|
DLL_HEADER void LoadOpenGLFunctionPointers() { }
|
||||||
|
Loading…
Reference in New Issue
Block a user