diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-08-27 10:11:22 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-09-02 09:47:55 +0200 |
commit | b366d0d0166bbb114ccf9a8e8be7d3c6c45e313e (patch) | |
tree | 5275f65c11e963ee170d52b2651dad2277a9ee98 /src/platformsupport/eglconvenience/qeglplatformcursor.cpp | |
parent | 09754d218a9c8f19f9a8f9bf920bc52064163d7a (diff) |
Make the EGL platform cursor reset the array buffer
Otherwise bad things happen if the application leaves a buffer bound.
[ChangeLog] The eglfs mouse cursor properly resets the array buffer
to prevent rendering issues. This, just like with vertex attributes and
textures, requires applications to be aware of such state changes in
swapBuffers().
Change-Id: I8b383cc867d8d0d0572773eacfa650e7b33b9680
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglplatformcursor.cpp')
-rw-r--r-- | src/platformsupport/eglconvenience/qeglplatformcursor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/platformsupport/eglconvenience/qeglplatformcursor.cpp b/src/platformsupport/eglconvenience/qeglplatformcursor.cpp index b6293e60ec..7198d7c6fb 100644 --- a/src/platformsupport/eglconvenience/qeglplatformcursor.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformcursor.cpp @@ -343,6 +343,8 @@ void QEGLPlatformCursor::draw(const QRectF &r) { if (!m_program) { // one time initialization + initializeOpenGLFunctions(); + createShaderPrograms(); if (!m_cursorAtlas.texture) { @@ -387,6 +389,7 @@ void QEGLPlatformCursor::draw(const QRectF &r) }; glBindTexture(GL_TEXTURE_2D, m_cursor.texture); + glBindBuffer(GL_ARRAY_BUFFER, 0); m_program->enableAttributeArray(m_vertexCoordEntry); m_program->enableAttributeArray(m_textureCoordEntry); |