Don't crash when sending touch events.
[profile/ivi/qtwayland.git] / examples / qwindow-compositor / textureblitter.h
1 #ifndef TEXTUREBLITTER_H
2 #define TEXTUREBLITTER_H
3
4 #include <QtGui/QMatrix4x4>
5
6 class QOpenGLShaderProgram;
7 class TextureBlitter
8 {
9 public:
10     TextureBlitter();
11     void bind();
12     void release();
13     void drawTexture(int textureId, const QRectF &sourceGeometry,
14                      const QSize &targetRect, int depth,
15                      bool targethasInvertedY, bool sourceHasInvertedY);
16
17 private:
18     QOpenGLShaderProgram *m_shaderProgram;
19     QMatrix4x4 m_transformMatrix;
20
21     int m_matrixLocation;
22     int m_vertexCoordEntry;
23     int m_textureCoordEntry;
24 };
25
26 #endif // TEXTUREBLITTER_H