kwin: Resolve functions for GL_ARB_vertex_array_object
This commit is contained in:
parent
2b00beecd2
commit
2bcad53bbb
2 changed files with 30 additions and 0 deletions
|
@ -139,6 +139,12 @@ glDisableVertexAttribArray_func glDisableVertexAttribArray;
|
|||
glVertexAttribPointer_func glVertexAttribPointer;
|
||||
|
||||
|
||||
// GL_ARB_vertex_array_object
|
||||
glBindVertexArray_func glBindVertexArray;
|
||||
glDeleteVertexArrays_func glDeleteVertexArrays;
|
||||
glGenVertexArrays_func glGenVertexArrays;
|
||||
glIsVertexArray_func glIsVertexArray;
|
||||
|
||||
static glXFuncPtr getProcAddress(const char* name)
|
||||
{
|
||||
glXFuncPtr ret = NULL;
|
||||
|
@ -468,6 +474,19 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
|||
glBindBuffer = NULL;
|
||||
glBufferData = NULL;
|
||||
}
|
||||
|
||||
if (hasGLVersion(3, 0) || hasGLExtension("GL_ARB_vertex_array_object")) {
|
||||
// see http://www.opengl.org/registry/specs/ARB/vertex_array_object.txt
|
||||
GL_RESOLVE(glBindVertexArray);
|
||||
GL_RESOLVE(glDeleteVertexArrays);
|
||||
GL_RESOLVE(glGenVertexArrays);
|
||||
GL_RESOLVE(glIsVertexArray);
|
||||
} else {
|
||||
glBindVertexArray = NULL;
|
||||
glDeleteVertexArrays = NULL;
|
||||
glGenVertexArrays = NULL;
|
||||
glIsVertexArray = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef KWIN_HAVE_EGL
|
||||
|
|
|
@ -349,6 +349,17 @@ extern KWIN_EXPORT glDisableVertexAttribArray_func glDisableVertexAttribArray;
|
|||
typedef void (*glVertexAttribPointer_func)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid*);
|
||||
extern KWIN_EXPORT glVertexAttribPointer_func glVertexAttribPointer;
|
||||
|
||||
// GL_ARB_vertex_array_object
|
||||
typedef void (*glBindVertexArray_func)(GLuint array);
|
||||
typedef void (*glDeleteVertexArrays_func)(GLsizei n, const GLuint *arrays);
|
||||
typedef void (*glGenVertexArrays_func)(GLsizei n, GLuint *arrays);
|
||||
typedef GLboolean (*glIsVertexArray_func)(GLuint array);
|
||||
|
||||
extern KWIN_EXPORT glBindVertexArray_func glBindVertexArray;
|
||||
extern KWIN_EXPORT glDeleteVertexArrays_func glDeleteVertexArrays;
|
||||
extern KWIN_EXPORT glGenVertexArrays_func glGenVertexArrays;
|
||||
extern KWIN_EXPORT glIsVertexArray_func glIsVertexArray;
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif // not KWIN_HAVE_OPENGLES
|
||||
|
|
Loading…
Reference in a new issue