kwin: Resolve functions for GL_ARB_draw_elements_base_vertex
This commit is contained in:
parent
7c4b736cec
commit
5e7b2a34a8
2 changed files with 20 additions and 0 deletions
|
@ -198,6 +198,10 @@ glGetGraphicsResetStatus_func glGetGraphicsResetStatus;
|
||||||
glReadnPixels_func glReadnPixels;
|
glReadnPixels_func glReadnPixels;
|
||||||
glGetnUniformfv_func glGetnUniformfv;
|
glGetnUniformfv_func glGetnUniformfv;
|
||||||
|
|
||||||
|
// GL_ARB_draw_elements_base_vertex
|
||||||
|
glDrawElementsBaseVertex_func glDrawElementsBaseVertex;
|
||||||
|
glDrawElementsInstancedBaseVertex_func glDrawElementsInstancedBaseVertex;
|
||||||
|
|
||||||
|
|
||||||
static glXFuncPtr getProcAddress(const char* name)
|
static glXFuncPtr getProcAddress(const char* name)
|
||||||
{
|
{
|
||||||
|
@ -695,6 +699,15 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
glGetnUniformfv = KWin::GetnUniformfv;
|
glGetnUniformfv = KWin::GetnUniformfv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hasGLVersion(3, 2) || hasGLExtension("GL_ARB_draw_elements_base_vertex")) {
|
||||||
|
// See http://www.opengl.org/registry/specs/ARB/draw_elements_base_vertex.txt
|
||||||
|
GL_RESOLVE(glDrawElementsBaseVertex);
|
||||||
|
GL_RESOLVE(glDrawElementsInstancedBaseVertex);
|
||||||
|
} else {
|
||||||
|
glDrawElementsBaseVertex = NULL;
|
||||||
|
glDrawElementsInstancedBaseVertex = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
if (hasGLExtension("GL_OES_mapbuffer")) {
|
if (hasGLExtension("GL_OES_mapbuffer")) {
|
||||||
|
|
|
@ -453,6 +453,13 @@ extern KWIN_EXPORT glGetGraphicsResetStatus_func glGetGraphicsResetStatus;
|
||||||
extern KWIN_EXPORT glReadnPixels_func glReadnPixels;
|
extern KWIN_EXPORT glReadnPixels_func glReadnPixels;
|
||||||
extern KWIN_EXPORT glGetnUniformfv_func glGetnUniformfv;
|
extern KWIN_EXPORT glGetnUniformfv_func glGetnUniformfv;
|
||||||
|
|
||||||
|
// GL_ARB_draw_elements_base_vertex
|
||||||
|
typedef void (*glDrawElementsBaseVertex_func)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
|
||||||
|
typedef void (*glDrawElementsInstancedBaseVertex_func)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount, GLint basevertex);
|
||||||
|
|
||||||
|
extern KWIN_EXPORT glDrawElementsBaseVertex_func glDrawElementsBaseVertex;
|
||||||
|
extern KWIN_EXPORT glDrawElementsInstancedBaseVertex_func glDrawElementsInstancedBaseVertex;
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#endif // not KWIN_HAVE_OPENGLES
|
#endif // not KWIN_HAVE_OPENGLES
|
||||||
|
|
Loading…
Reference in a new issue