diff options
Diffstat (limited to 'examples/opengl/hellogles3')
-rw-r--r-- | examples/opengl/hellogles3/CMakeLists.txt | 34 | ||||
-rw-r--r-- | examples/opengl/hellogles3/doc/images/hellogles3-example.png | bin | 61792 -> 0 bytes | |||
-rw-r--r-- | examples/opengl/hellogles3/doc/src/hellogles3.qdoc | 22 | ||||
-rw-r--r-- | examples/opengl/hellogles3/glwindow.h | 12 |
4 files changed, 23 insertions, 45 deletions
diff --git a/examples/opengl/hellogles3/CMakeLists.txt b/examples/opengl/hellogles3/CMakeLists.txt index 2e0c3069fc..07df173a47 100644 --- a/examples/opengl/hellogles3/CMakeLists.txt +++ b/examples/opengl/hellogles3/CMakeLists.txt @@ -1,16 +1,13 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + cmake_minimum_required(VERSION 3.16) project(hellogles3 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/hellogles3") - find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL) +qt_standard_project_setup() + qt_add_executable(hellogles3 ../hellogl2/logo.cpp ../hellogl2/logo.h glwindow.cpp glwindow.h @@ -22,10 +19,10 @@ set_target_properties(hellogles3 PROPERTIES MACOSX_BUNDLE TRUE ) -target_link_libraries(hellogles3 PUBLIC - Qt::Core - Qt::Gui - Qt::OpenGL +target_link_libraries(hellogles3 PRIVATE + Qt6::Core + Qt6::Gui + Qt6::OpenGL ) # Resources: @@ -41,7 +38,14 @@ qt_add_resources(hellogles3 "hellogles3" ) install(TARGETS hellogles3 - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION . + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) + +qt_generate_deploy_app_script( + TARGET hellogles3 + OUTPUT_SCRIPT deploy_script + NO_UNSUPPORTED_PLATFORM_ERROR ) +install(SCRIPT ${deploy_script}) diff --git a/examples/opengl/hellogles3/doc/images/hellogles3-example.png b/examples/opengl/hellogles3/doc/images/hellogles3-example.png Binary files differdeleted file mode 100644 index e089b9470a..0000000000 --- a/examples/opengl/hellogles3/doc/images/hellogles3-example.png +++ /dev/null diff --git a/examples/opengl/hellogles3/doc/src/hellogles3.qdoc b/examples/opengl/hellogles3/doc/src/hellogles3.qdoc deleted file mode 100644 index cae0bd8b27..0000000000 --- a/examples/opengl/hellogles3/doc/src/hellogles3.qdoc +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2018 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only - -/*! - \example hellogles3 - \title Hello GLES3 Example - \ingroup examples-widgets-opengl - - \brief The Hello GLES3 example demonstrates easy, cross-platform usage of - OpenGL ES 3.0 functions via QOpenGLExtraFunctions in an application that - works identically on desktop platforms with OpenGL 3.3 and mobile/embedded - devices with OpenGL ES 3.0. - - The code is always the same, with the exception of two places: - \list - \li The OpenGL context creation has to have a sufficiently high version - number for the features that are in use. - \li The shader code's version directive is different. - \endlist - - \image hellogles3-example.png -*/ diff --git a/examples/opengl/hellogles3/glwindow.h b/examples/opengl/hellogles3/glwindow.h index fc2a0e487e..54bc531af8 100644 --- a/examples/opengl/hellogles3/glwindow.h +++ b/examples/opengl/hellogles3/glwindow.h @@ -9,14 +9,10 @@ #include <QVector3D> #include "../hellogl2/logo.h" -QT_BEGIN_NAMESPACE - -class QOpenGLTexture; -class QOpenGLShaderProgram; -class QOpenGLBuffer; -class QOpenGLVertexArrayObject; - -QT_END_NAMESPACE +QT_FORWARD_DECLARE_CLASS(QOpenGLTexture) +QT_FORWARD_DECLARE_CLASS(QOpenGLShaderProgram) +QT_FORWARD_DECLARE_CLASS(QOpenGLBuffer) +QT_FORWARD_DECLARE_CLASS(QOpenGLVertexArrayObject) class GLWindow : public QOpenGLWindow { |