kwin: Resolve functions for GL_ARB_map_buffer_range
This commit is contained in:
parent
08d3b6cc3a
commit
11b9323f3d
2 changed files with 19 additions and 0 deletions
|
@ -142,6 +142,9 @@ glVertexAttribPointer_func glVertexAttribPointer;
|
|||
glMapBuffer_func glMapBuffer;
|
||||
glUnmapBuffer_func glUnmapBuffer;
|
||||
|
||||
// GL_ARB_map_buffer_range
|
||||
glMapBufferRange_func glMapBufferRange;
|
||||
glFlushMappedBufferRange_func glFlushMappedBufferRange;
|
||||
|
||||
// GL_ARB_vertex_array_object
|
||||
glBindVertexArray_func glBindVertexArray;
|
||||
|
@ -644,6 +647,15 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
|||
glUniform2uiv = NULL;
|
||||
glUniform3uiv = NULL;
|
||||
}
|
||||
|
||||
if (hasGLVersion(3, 0) || hasGLExtension("GL_ARB_map_buffer_range")) {
|
||||
// See http://www.opengl.org/registry/specs/ARB/map_buffer_range.txt
|
||||
GL_RESOLVE(glMapBufferRange);
|
||||
GL_RESOLVE(glFlushMappedBufferRange);
|
||||
} else {
|
||||
glMapBufferRange = NULL;
|
||||
glFlushMappedBufferRange = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef KWIN_HAVE_EGL
|
||||
|
|
|
@ -437,6 +437,13 @@ extern KWIN_EXPORT glUniform1uiv_func glUniform1uiv;
|
|||
extern KWIN_EXPORT glUniform2uiv_func glUniform2uiv;
|
||||
extern KWIN_EXPORT glUniform3uiv_func glUniform3uiv;
|
||||
|
||||
// GL_ARB_map_buffer_range
|
||||
typedef GLvoid* (*glMapBufferRange_func)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef void (*glFlushMappedBufferRange_func)(GLenum target, GLintptr offset, GLsizeiptr length);
|
||||
|
||||
extern KWIN_EXPORT glMapBufferRange_func glMapBufferRange;
|
||||
extern KWIN_EXPORT glFlushMappedBufferRange_func glFlushMappedBufferRange;
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif // not KWIN_HAVE_OPENGLES
|
||||
|
|
Loading…
Reference in a new issue