diff --git a/libkwineffects/kwinglutils_funcs.cpp b/libkwineffects/kwinglutils_funcs.cpp index b299b814bd..da9ec2ea8d 100644 --- a/libkwineffects/kwinglutils_funcs.cpp +++ b/libkwineffects/kwinglutils_funcs.cpp @@ -202,6 +202,9 @@ glGetnUniformfv_func glGetnUniformfv; glDrawElementsBaseVertex_func glDrawElementsBaseVertex; glDrawElementsInstancedBaseVertex_func glDrawElementsInstancedBaseVertex; +// GL_ARB_copy_buffer +glCopyBufferSubData_func glCopyBufferSubData; + static glXFuncPtr getProcAddress(const char* name) { @@ -708,6 +711,13 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface) glDrawElementsInstancedBaseVertex = NULL; } + if (hasGLVersion(3, 1) || hasGLExtension("GL_ARB_copy_buffer")) { + // See http://www.opengl.org/registry/specs/ARB/copy_buffer.txt + GL_RESOLVE(glCopyBufferSubData); + } else { + glCopyBufferSubData = NULL; + } + #else if (hasGLExtension("GL_OES_mapbuffer")) { diff --git a/libkwineffects/kwinglutils_funcs.h b/libkwineffects/kwinglutils_funcs.h index faed015130..e04e8ce4fd 100644 --- a/libkwineffects/kwinglutils_funcs.h +++ b/libkwineffects/kwinglutils_funcs.h @@ -460,6 +460,12 @@ typedef void (*glDrawElementsInstancedBaseVertex_func)(GLenum mode, GLsizei coun extern KWIN_EXPORT glDrawElementsBaseVertex_func glDrawElementsBaseVertex; extern KWIN_EXPORT glDrawElementsInstancedBaseVertex_func glDrawElementsInstancedBaseVertex; +// GL_ARB_copy_buffer +typedef void (*glCopyBufferSubData_func)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, + GLintptr writeOffset, GLsizeiptr size); + +extern KWIN_EXPORT glCopyBufferSubData_func glCopyBufferSubData; + } // namespace #endif // not KWIN_HAVE_OPENGLES