1 #ifndef SURFACERENDERER_H
2 #define SURFACERENDERER_H
4 #include <QOpenGLContext>
5 #include <QGLShaderProgram>
11 SurfaceRenderer(QOpenGLContext *context, QWindow *surface);
13 void drawImage(const QImage &image, const QRect &geometry);
14 void drawTexture(int textureId, const QRect &geometry, int depth = 0);
15 GLuint textureFromImage(const QImage &image);
19 QOpenGLContext *m_context;
21 QGLShaderProgram *m_shaderProgram;
22 QMatrix4x4 m_transformMatrix;
25 int m_vertexCoordEntry;
26 int m_textureCoordEntry;
29 #endif // SURFACERENDERER_H