kwin: Resolve functions for GL_ARB_copy_buffer

This commit is contained in:
Fredrik Höglund 2013-03-21 21:43:00 +01:00
parent 5e7b2a34a8
commit 479ea5db61
2 changed files with 16 additions and 0 deletions

View file

@ -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")) {

View file

@ -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