kwin: Fix VBO function resolution for core contexts
Mesa doesn't advertise extensions that were core in 1.5 in an OpenGL context that uses the core profile.
This commit is contained in:
parent
63e0d32706
commit
1bcf95f3f9
2 changed files with 8 additions and 2 deletions
|
@ -1421,7 +1421,7 @@ void GLVertexBuffer::initStatic()
|
|||
#ifdef KWIN_HAVE_OPENGLES
|
||||
GLVertexBufferPrivate::supported = true;
|
||||
#else
|
||||
GLVertexBufferPrivate::supported = hasGLExtension("GL_ARB_vertex_buffer_object");
|
||||
GLVertexBufferPrivate::supported = hasGLVersion(1, 5) || hasGLExtension("GL_ARB_vertex_buffer_object");
|
||||
#endif
|
||||
GLVertexBufferPrivate::streamingBuffer = new GLVertexBuffer(GLVertexBuffer::Stream);
|
||||
}
|
||||
|
|
|
@ -410,8 +410,14 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
|||
glProgramLocalParameter4fARB = NULL;
|
||||
glGetProgramivARB = NULL;
|
||||
}
|
||||
if (hasGLExtension("GL_ARB_vertex_buffer_object")) {
|
||||
|
||||
if (hasGLVersion(1, 5)) {
|
||||
// see http://www.opengl.org/registry/specs/ARB/vertex_buffer_object.txt
|
||||
GL_RESOLVE(glGenBuffers);
|
||||
GL_RESOLVE(glDeleteBuffers);
|
||||
GL_RESOLVE(glBindBuffer);
|
||||
GL_RESOLVE(glBufferData);
|
||||
} 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);
|
||||
|
|
Loading…
Reference in a new issue