kwin/es: Resolve functions for GL_OES_mapbuffer
This commit is contained in:
parent
11b9323f3d
commit
b6585c2d8b
2 changed files with 36 additions and 2 deletions
|
@ -243,9 +243,15 @@ void glxResolveFunctions()
|
|||
else
|
||||
glXCreateContextAttribsARB = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
// GL_OES_mapbuffer
|
||||
glMapBuffer_func glMapBuffer;
|
||||
glUnmapBuffer_func glUnmapBuffer;
|
||||
glGetBufferPointerv_func glGetBufferPointerv;
|
||||
|
||||
#endif // KWIN_HAVE_OPENGLES
|
||||
|
||||
#ifdef KWIN_HAVE_EGL
|
||||
|
||||
|
@ -656,7 +662,21 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
|||
glMapBufferRange = NULL;
|
||||
glFlushMappedBufferRange = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
if (hasGLExtension("GL_OES_mapbuffer")) {
|
||||
// See http://www.khronos.org/registry/gles/extensions/OES/OES_mapbuffer.txt
|
||||
glMapBuffer = (glMapBuffer_func) eglGetProcAddress("glMapBufferOES");
|
||||
glUnmapBuffer = (glUnmapBuffer_func) eglGetProcAddress("glUnmapBufferOES");
|
||||
glGetBufferPointerv = (glGetBufferPointerv_func) eglGetProcAddress("glGetBufferPointervOES");
|
||||
} else {
|
||||
glMapBuffer = NULL;
|
||||
glUnmapBuffer = NULL;
|
||||
glGetBufferPointerv = NULL;
|
||||
}
|
||||
|
||||
#endif // KWIN_HAVE_OPENGLES
|
||||
|
||||
#ifdef KWIN_HAVE_EGL
|
||||
if (platformInterface == EglPlatformInterface) {
|
||||
|
|
|
@ -509,6 +509,20 @@ extern KWIN_EXPORT eglPostSubBufferNV_func eglPostSubBufferNV;
|
|||
typedef GLvoid(*glEGLImageTargetTexture2DOES_func)(GLenum, GLeglImageOES);
|
||||
extern KWIN_EXPORT glEGLImageTargetTexture2DOES_func glEGLImageTargetTexture2DOES;
|
||||
|
||||
|
||||
#ifdef KWIN_HAVE_OPENGLES
|
||||
|
||||
// GL_OES_mapbuffer
|
||||
typedef GLvoid *(*glMapBuffer_func)(GLenum target, GLenum access);
|
||||
typedef GLboolean (*glUnmapBuffer_func)(GLenum target);
|
||||
typedef void (*glGetBufferPointerv_func)(GLenum target, GLenum pname, GLvoid **params);
|
||||
|
||||
extern KWIN_EXPORT glMapBuffer_func glMapBuffer;
|
||||
extern KWIN_EXPORT glUnmapBuffer_func glUnmapBuffer;
|
||||
extern KWIN_EXPORT glGetBufferPointerv_func glGetBufferPointerv;
|
||||
|
||||
#endif // KWIN_HAVE_OPENGLES
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif // KWIN_HAVE_EGL
|
||||
|
|
Loading…
Reference in a new issue