summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfscursor.h
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-05-21 15:41:55 -0700
committerQt by Nokia <qt-info@nokia.com>2012-05-25 17:23:20 +0200
commitb8420c9fc246428cf26ace2970f252ca7580aef5 (patch)
tree4320d492663bf32b22419adb066ceadaf470b16b /src/plugins/platforms/eglfs/qeglfscursor.h
parent113620d6f788486f118c19f19475cb6cb716ec32 (diff)
eglfs: use GL API directly in QEglFSCursor
The upcoming hardware cursor support for pi requires the cursor code to render with it's own context. This is because the cursor rendering happens in the input event (gui) thread which may be different from the the scenegraph thread. Currently, Qt can be informed about the current opengl context by using QOpenGLContext::makeCurrent(). All of Qt's helper OpenGL classes complain if that function has not been called. Usage of makeCurrent API requires a QSurface. A big rewrite of EGLFS is needed to make such a QSurface (QEglFSWindow) available to the cursor code. There is no other way around this since Qt has no other API to inform it that an opengl context is active. The solution is not use Qt's OpenGL helper classes and use GL API directly. Change-Id: If47030d9a289686ebf2e758f90445323d1733dc0 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfscursor.h')
-rw-r--r--src/plugins/platforms/eglfs/qeglfscursor.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfscursor.h b/src/plugins/platforms/eglfs/qeglfscursor.h
index 43f6b681a8..1fdb648fc6 100644
--- a/src/plugins/platforms/eglfs/qeglfscursor.h
+++ b/src/plugins/platforms/eglfs/qeglfscursor.h
@@ -44,6 +44,7 @@
#include <qpa/qplatformcursor.h>
#include "qeglfsscreen.h"
+#include <GLES2/gl2.h>
QT_BEGIN_NAMESPACE
@@ -94,7 +95,7 @@ private:
QPoint m_pos;
- QOpenGLShaderProgram *m_program;
+ GLuint m_program;
int m_vertexCoordEntry;
int m_textureCoordEntry;
int m_textureEntry;