[OpenGL] Import glXQueryDrawable just in case

pull/131/head
jackun 4 years ago
parent accac3a015
commit c3e50db2f4
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -16,6 +16,7 @@ void* glXGetCurrentContext();
void* glXGetProcAddress(const unsigned char*);
void* glXGetProcAddressARB(const unsigned char*);
int glXQueryDrawable(void *dpy, void* glxdraw, int attr, unsigned int * value);
unsigned int eglSwapBuffers( void*, void* );

@ -86,6 +86,10 @@ bool gl_loader::Load(void *handle, bool egl_only) {
reinterpret_cast<decltype(this->glXGetSwapIntervalMESA)>(
glXGetProcAddress((const unsigned char *)"glXGetSwapIntervalMESA"));
glXQueryDrawable =
reinterpret_cast<decltype(this->glXQueryDrawable)>(
glXGetProcAddress((const unsigned char *)"glXQueryDrawable"));
glXMakeCurrent =
reinterpret_cast<decltype(this->glXMakeCurrent)>(
glXGetProcAddress((const unsigned char *)"glXMakeCurrent"));
@ -108,6 +112,7 @@ void gl_loader::CleanUp(bool unload) {
glXSwapIntervalEXT = nullptr;
glXSwapIntervalSGI = nullptr;
glXSwapIntervalMESA = nullptr;
glXQueryDrawable = nullptr;
glXMakeCurrent = nullptr;
}

@ -23,6 +23,7 @@ class gl_loader {
decltype(&::glXGetSwapIntervalMESA) glXGetSwapIntervalMESA;
decltype(&::glXMakeCurrent) glXMakeCurrent;
decltype(&::glXGetCurrentContext) glXGetCurrentContext;
decltype(&::glXQueryDrawable) glXQueryDrawable;
decltype(&::eglSwapBuffers) eglSwapBuffers;

Loading…
Cancel
Save