diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-08-15 13:09:55 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-08-15 16:53:19 +0200 |
commit | c7ec7cd2a1ae9bec31113fae1f1e549b2bf98e0b (patch) | |
tree | fc81fba4e7815ea061da277cf3bcf3102866932f /examples/opengl/qopenglwindow/background_renderer.h | |
parent | 7947032e2d1d68b2c0f79874db7adcf560851f29 (diff) | |
parent | 6132260da394a9627947f0fe6a279c20863b6ad2 (diff) |
Merge branch 'wip/qt6' into wip/cmake
Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b
Diffstat (limited to 'examples/opengl/qopenglwindow/background_renderer.h')
-rw-r--r-- | examples/opengl/qopenglwindow/background_renderer.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/opengl/qopenglwindow/background_renderer.h b/examples/opengl/qopenglwindow/background_renderer.h index d99b7ddbeb..0e3caf5981 100644 --- a/examples/opengl/qopenglwindow/background_renderer.h +++ b/examples/opengl/qopenglwindow/background_renderer.h @@ -62,11 +62,14 @@ #include <QOpenGLShaderProgram> #include <QOpenGLFunctions> +#include <memory> + class FragmentToy : public QObject, protected QOpenGLFunctions { Q_OBJECT public: - FragmentToy(const QString &fragmentSource, QObject *parent = 0); + explicit FragmentToy(const QString &fragmentSource, QObject *parent = nullptr); + ~FragmentToy(); void draw(const QSize &windowSize); @@ -79,9 +82,9 @@ private: QString m_fragment_file; QDateTime m_fragment_file_last_modified; - QScopedPointer<QOpenGLShaderProgram> m_program; - QScopedPointer<QOpenGLShader> m_vertex_shader; - QScopedPointer<QOpenGLShader> m_fragment_shader; + std::unique_ptr<QOpenGLShaderProgram> m_program; + std::unique_ptr<QOpenGLShader> m_vertex_shader; + std::unique_ptr<QOpenGLShader> m_fragment_shader; QOpenGLVertexArrayObject m_vao; QOpenGLBuffer m_vertex_buffer; GLuint m_vertex_coord_pos; |