kwin: Resolve more functions from ARB_vertex_buffer_object
This patch resolves: glMapBuffer() glUnmapBuffer() glBufferSubData() glGetBufferSubData()
This commit is contained in:
parent
b7f1856a35
commit
08d3b6cc3a
2 changed files with 23 additions and 0 deletions
|
@ -134,9 +134,13 @@ glGenBuffers_func glGenBuffers;
|
|||
glDeleteBuffers_func glDeleteBuffers;
|
||||
glBindBuffer_func glBindBuffer;
|
||||
glBufferData_func glBufferData;
|
||||
glBufferSubData_func glBufferSubData;
|
||||
glGetBufferSubData_func glGetBufferSubData;
|
||||
glEnableVertexAttribArray_func glEnableVertexAttribArray;
|
||||
glDisableVertexAttribArray_func glDisableVertexAttribArray;
|
||||
glVertexAttribPointer_func glVertexAttribPointer;
|
||||
glMapBuffer_func glMapBuffer;
|
||||
glUnmapBuffer_func glUnmapBuffer;
|
||||
|
||||
|
||||
// GL_ARB_vertex_array_object
|
||||
|
@ -500,16 +504,27 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
|||
GL_RESOLVE(glDeleteBuffers);
|
||||
GL_RESOLVE(glBindBuffer);
|
||||
GL_RESOLVE(glBufferData);
|
||||
GL_RESOLVE(glBufferSubData);
|
||||
GL_RESOLVE(glMapBuffer);
|
||||
GL_RESOLVE(glUnmapBuffer);
|
||||
} else if (hasGLExtension("GL_ARB_vertex_buffer_object")) {
|
||||
GL_RESOLVE_WITH_EXT(glGenBuffers, glGenBuffersARB);
|
||||
GL_RESOLVE_WITH_EXT(glDeleteBuffers, glDeleteBuffersARB);
|
||||
GL_RESOLVE_WITH_EXT(glBindBuffer, glBindBufferARB);
|
||||
GL_RESOLVE_WITH_EXT(glBufferData, glBufferDataARB);
|
||||
GL_RESOLVE_WITH_EXT(glBufferSubData, glBufferSubDataARB);
|
||||
GL_RESOLVE_WITH_EXT(glGetBufferSubData, glGetBufferSubDataARB);
|
||||
GL_RESOLVE_WITH_EXT(glMapBuffer, glMapBufferARB);
|
||||
GL_RESOLVE_WITH_EXT(glUnmapBuffer, glUnmapBufferARB);
|
||||
} else {
|
||||
glGenBuffers = NULL;
|
||||
glDeleteBuffers = NULL;
|
||||
glBindBuffer = NULL;
|
||||
glBufferData = NULL;
|
||||
glBufferSubData = NULL;
|
||||
glGetBufferSubData = NULL;
|
||||
glMapBuffer = NULL;
|
||||
glUnmapBuffer = NULL;
|
||||
}
|
||||
|
||||
if (hasGLVersion(3, 0) || hasGLExtension("GL_ARB_vertex_array_object")) {
|
||||
|
|
|
@ -342,12 +342,20 @@ typedef void (*glBindBuffer_func)(GLenum, GLuint);
|
|||
extern KWIN_EXPORT glBindBuffer_func glBindBuffer;
|
||||
typedef void (*glBufferData_func)(GLenum, GLsizeiptr, const GLvoid*, GLenum);
|
||||
extern KWIN_EXPORT glBufferData_func glBufferData;
|
||||
typedef void (*glBufferSubData_func)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
|
||||
extern KWIN_EXPORT glBufferSubData_func glBufferSubData;
|
||||
typedef void (*glGetBufferSubData_func)(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
|
||||
extern KWIN_EXPORT glGetBufferSubData_func glGetBufferSubData;
|
||||
typedef void (*glEnableVertexAttribArray_func)(GLuint);
|
||||
extern KWIN_EXPORT glEnableVertexAttribArray_func glEnableVertexAttribArray;
|
||||
typedef void (*glDisableVertexAttribArray_func)(GLuint);
|
||||
extern KWIN_EXPORT glDisableVertexAttribArray_func glDisableVertexAttribArray;
|
||||
typedef void (*glVertexAttribPointer_func)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid*);
|
||||
extern KWIN_EXPORT glVertexAttribPointer_func glVertexAttribPointer;
|
||||
typedef GLvoid *(*glMapBuffer_func)(GLenum target, GLenum access);
|
||||
extern KWIN_EXPORT glMapBuffer_func glMapBuffer;
|
||||
typedef GLboolean (*glUnmapBuffer_func)(GLenum target);
|
||||
extern KWIN_EXPORT glUnmapBuffer_func glUnmapBuffer;
|
||||
|
||||
// GL_ARB_vertex_array_object
|
||||
typedef void (*glBindVertexArray_func)(GLuint array);
|
||||
|
|
Loading…
Reference in a new issue