diff options
Diffstat (limited to 'examples/quick/scenegraph')
13 files changed, 677 insertions, 0 deletions
diff --git a/examples/quick/scenegraph/CMakeLists.txt b/examples/quick/scenegraph/CMakeLists.txt new file mode 100644 index 0000000000..c18f77b937 --- /dev/null +++ b/examples/quick/scenegraph/CMakeLists.txt @@ -0,0 +1,20 @@ +# Generated from scenegraph.pro. + +add_subdirectory(customgeometry) +add_subdirectory(rendernode) +add_subdirectory(threadedanimation) +if(QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3) + add_subdirectory(graph) + add_subdirectory(simplematerial) + add_subdirectory(sgengine) + add_subdirectory(textureinsgnode) + add_subdirectory(openglunderqml) + add_subdirectory(textureinthread) + add_subdirectory(twotextureproviders) +endif() +if(APPLE_OSX) + add_subdirectory(metalunderqml) +endif() +if(WIN32) + add_subdirectory(d3d11underqml) +endif() diff --git a/examples/quick/scenegraph/customgeometry/CMakeLists.txt b/examples/quick/scenegraph/customgeometry/CMakeLists.txt new file mode 100644 index 0000000000..7d45793689 --- /dev/null +++ b/examples/quick/scenegraph/customgeometry/CMakeLists.txt @@ -0,0 +1,45 @@ +# Generated from customgeometry.pro. + +cmake_minimum_required(VERSION 3.14) +project(customgeometry LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(customgeometry + beziercurve.cpp beziercurve.h + main.cpp +) +target_link_libraries(customgeometry PUBLIC + Qt::Core + Qt::Gui + Qt::Quick +) + +# Resources: +set(customgeometry_resource_files + "main.qml" +) + +QT6_ADD_RESOURCES(customgeometry "customgeometry" + PREFIX + "/scenegraph/customgeometry" + FILES + ${customgeometry_resource_files} +) + + +install(TARGETS customgeometry + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/quick/scenegraph/d3d11underqml/CMakeLists.txt b/examples/quick/scenegraph/d3d11underqml/CMakeLists.txt new file mode 100644 index 0000000000..bf58446363 --- /dev/null +++ b/examples/quick/scenegraph/d3d11underqml/CMakeLists.txt @@ -0,0 +1,51 @@ +# Generated from d3d11underqml.pro. + +cmake_minimum_required(VERSION 3.14) +project(d3d11underqml LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(d3d11underqml + d3d11squircle.cpp d3d11squircle.h + main.cpp +) +target_link_libraries(d3d11underqml PUBLIC + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick + d3d11 + d3dcompiler +) + +# Resources: +set(d3d11underqml_resource_files + "main.qml" + "squircle.frag" + "squircle.vert" +) + +QT6_ADD_RESOURCES(d3d11underqml "d3d11underqml" + PREFIX + "/scenegraph/d3d11underqml" + FILES + ${d3d11underqml_resource_files} +) + + +install(TARGETS d3d11underqml + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/quick/scenegraph/graph/CMakeLists.txt b/examples/quick/scenegraph/graph/CMakeLists.txt new file mode 100644 index 0000000000..c1f45a2650 --- /dev/null +++ b/examples/quick/scenegraph/graph/CMakeLists.txt @@ -0,0 +1,52 @@ +# Generated from graph.pro. + +cmake_minimum_required(VERSION 3.14) +project(graph LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(graph + graph.cpp graph.h + gridnode.cpp gridnode.h + linenode.cpp linenode.h + main.cpp + noisynode.cpp noisynode.h +) +target_link_libraries(graph PUBLIC + Qt::Core + Qt::Gui + Qt::Quick +) + +# Resources: +set(graph_resource_files + "main.qml" + "shaders/line.fsh" + "shaders/line.vsh" + "shaders/noisy.fsh" + "shaders/noisy.vsh" +) + +QT6_ADD_RESOURCES(graph "graph" + PREFIX + "/scenegraph/graph" + FILES + ${graph_resource_files} +) + + +install(TARGETS graph + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/quick/scenegraph/metalunderqml/CMakeLists.txt b/examples/quick/scenegraph/metalunderqml/CMakeLists.txt new file mode 100644 index 0000000000..b40fb52ba2 --- /dev/null +++ b/examples/quick/scenegraph/metalunderqml/CMakeLists.txt @@ -0,0 +1,51 @@ +# Generated from metalunderqml.pro. + +cmake_minimum_required(VERSION 3.14) +project(metalunderqml LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(metalunderqml + main.cpp + metalsquircle.h metalsquircle.mm +) +target_link_libraries(metalunderqml PUBLIC + ${FWAppKit} + ${FWMetal} + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick +) + +# Resources: +set(metalunderqml_resource_files + "main.qml" + "squircle.frag" + "squircle.vert" +) + +QT6_ADD_RESOURCES(metalunderqml "metalunderqml" + PREFIX + "/scenegraph/metalunderqml" + FILES + ${metalunderqml_resource_files} +) + + +install(TARGETS metalunderqml + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/quick/scenegraph/openglunderqml/CMakeLists.txt b/examples/quick/scenegraph/openglunderqml/CMakeLists.txt new file mode 100644 index 0000000000..af8aa49a4d --- /dev/null +++ b/examples/quick/scenegraph/openglunderqml/CMakeLists.txt @@ -0,0 +1,47 @@ +# Generated from openglunderqml.pro. + +cmake_minimum_required(VERSION 3.14) +project(openglunderqml LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(openglunderqml + main.cpp + squircle.cpp squircle.h +) +target_link_libraries(openglunderqml PUBLIC + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick +) + +# Resources: +set(openglunderqml_resource_files + "main.qml" +) + +QT6_ADD_RESOURCES(openglunderqml "openglunderqml" + PREFIX + "/scenegraph/openglunderqml" + FILES + ${openglunderqml_resource_files} +) + + +install(TARGETS openglunderqml + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/quick/scenegraph/rendernode/CMakeLists.txt b/examples/quick/scenegraph/rendernode/CMakeLists.txt new file mode 100644 index 0000000000..e6d4281be8 --- /dev/null +++ b/examples/quick/scenegraph/rendernode/CMakeLists.txt @@ -0,0 +1,51 @@ +# Generated from rendernode.pro. + +cmake_minimum_required(VERSION 3.14) +project(rendernode LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(rendernode + customrenderitem.cpp customrenderitem.h + main.cpp + openglrenderer.cpp openglrenderer.h + softwarerenderer.cpp softwarerenderer.h +) +target_link_libraries(rendernode PUBLIC + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick +) + +# Resources: +set(rendernode_resource_files + "main.qml" + "shader_frag.cso" + "shader_vert.cso" +) + +QT6_ADD_RESOURCES(rendernode "rendernode" + PREFIX + "/scenegraph/rendernode" + FILES + ${rendernode_resource_files} +) + + +install(TARGETS rendernode + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/quick/scenegraph/sgengine/CMakeLists.txt b/examples/quick/scenegraph/sgengine/CMakeLists.txt new file mode 100644 index 0000000000..b99d8f2c7c --- /dev/null +++ b/examples/quick/scenegraph/sgengine/CMakeLists.txt @@ -0,0 +1,116 @@ +# Generated from sgengine.pro. + +cmake_minimum_required(VERSION 3.14) +project(sgengine LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(sgengine + main.cpp + window.cpp window.h +) +target_link_libraries(sgengine PUBLIC + Qt::Core + Qt::Gui + Qt::Quick +) + +# Resources: +set(sgengine_resource_files + "face-smile.png" +) + +QT6_ADD_RESOURCES(sgengine "sgengine" + PREFIX + "/scenegraph/sgengine" + FILES + ${sgengine_resource_files} +) +set_source_files_properties("../../shared/Button.qml" + PROPERTIES QT_RESOURCE_ALIAS "Button.qml" +) +set_source_files_properties("../../shared/CheckBox.qml" + PROPERTIES QT_RESOURCE_ALIAS "CheckBox.qml" +) +set_source_files_properties("../../shared/FlickrRssModel.qml" + PROPERTIES QT_RESOURCE_ALIAS "FlickrRssModel.qml" +) +set_source_files_properties("../../shared/Label.qml" + PROPERTIES QT_RESOURCE_ALIAS "Label.qml" +) +set_source_files_properties("../../shared/LauncherList.qml" + PROPERTIES QT_RESOURCE_ALIAS "LauncherList.qml" +) +set_source_files_properties("../../shared/SimpleLauncherDelegate.qml" + PROPERTIES QT_RESOURCE_ALIAS "SimpleLauncherDelegate.qml" +) +set_source_files_properties("../../shared/Slider.qml" + PROPERTIES QT_RESOURCE_ALIAS "Slider.qml" +) +set_source_files_properties("../../shared/TabSet.qml" + PROPERTIES QT_RESOURCE_ALIAS "TabSet.qml" +) +set_source_files_properties("../../shared/TextField.qml" + PROPERTIES QT_RESOURCE_ALIAS "TextField.qml" +) +set_source_files_properties("../../shared/images/back.png" + PROPERTIES QT_RESOURCE_ALIAS "images/back.png" +) +set_source_files_properties("../../shared/images/checkmark.png" + PROPERTIES QT_RESOURCE_ALIAS "images/checkmark.png" +) +set_source_files_properties("../../shared/images/next.png" + PROPERTIES QT_RESOURCE_ALIAS "images/next.png" +) +set_source_files_properties("../../shared/images/qt-logo.png" + PROPERTIES QT_RESOURCE_ALIAS "images/qt-logo.png" +) +set_source_files_properties("../../shared/images/slider_handle.png" + PROPERTIES QT_RESOURCE_ALIAS "images/slider_handle.png" +) +set_source_files_properties("../../shared/images/tab.png" + PROPERTIES QT_RESOURCE_ALIAS "images/tab.png" +) +set(shared_resource_files + "Button.qml" + "CheckBox.qml" + "FlickrRssModel.qml" + "Label.qml" + "LauncherList.qml" + "SimpleLauncherDelegate.qml" + "Slider.qml" + "TabSet.qml" + "TextField.qml" + "images/back.png" + "images/checkmark.png" + "images/next.png" + "images/qt-logo.png" + "images/slider_handle.png" + "images/tab.png" +) + +QT6_ADD_RESOURCES(sgengine "shared" + PREFIX + "/shared" + BASE + "../../shared" + FILES + ${shared_resource_files} +) + + +install(TARGETS sgengine + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/quick/scenegraph/simplematerial/CMakeLists.txt b/examples/quick/scenegraph/simplematerial/CMakeLists.txt new file mode 100644 index 0000000000..74ed71801c --- /dev/null +++ b/examples/quick/scenegraph/simplematerial/CMakeLists.txt @@ -0,0 +1,44 @@ +# Generated from simplematerial.pro. + +cmake_minimum_required(VERSION 3.14) +project(simplematerial LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(simplematerial + simplematerial.cpp +) +target_link_libraries(simplematerial PUBLIC + Qt::Core + Qt::Gui + Qt::Quick +) + +# Resources: +set(simplematerial_resource_files + "main.qml" +) + +QT6_ADD_RESOURCES(simplematerial "simplematerial" + PREFIX + "/scenegraph/simplematerial" + FILES + ${simplematerial_resource_files} +) + + +install(TARGETS simplematerial + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/quick/scenegraph/textureinsgnode/CMakeLists.txt b/examples/quick/scenegraph/textureinsgnode/CMakeLists.txt new file mode 100644 index 0000000000..4e0baea989 --- /dev/null +++ b/examples/quick/scenegraph/textureinsgnode/CMakeLists.txt @@ -0,0 +1,51 @@ +# Generated from textureinsgnode.pro. + +cmake_minimum_required(VERSION 3.14) +project(textureinsgnode LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(textureinsgnode + ../shared/logorenderer.cpp ../shared/logorenderer.h + fboinsgrenderer.cpp fboinsgrenderer.h + main.cpp +) +target_include_directories(textureinsgnode PUBLIC + ../shared +) +target_link_libraries(textureinsgnode PUBLIC + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick +) + +# Resources: +set(textureinsgnode_resource_files + "main.qml" +) + +QT6_ADD_RESOURCES(textureinsgnode "textureinsgnode" + PREFIX + "/scenegraph/textureinsgnode" + FILES + ${textureinsgnode_resource_files} +) + + +install(TARGETS textureinsgnode + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/quick/scenegraph/textureinthread/CMakeLists.txt b/examples/quick/scenegraph/textureinthread/CMakeLists.txt new file mode 100644 index 0000000000..3afe6ee20a --- /dev/null +++ b/examples/quick/scenegraph/textureinthread/CMakeLists.txt @@ -0,0 +1,54 @@ +# Generated from textureinthread.pro. + +cmake_minimum_required(VERSION 3.14) +project(textureinthread LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(textureinthread + ../shared/logorenderer.cpp ../shared/logorenderer.h + main.cpp + threadrenderer.cpp threadrenderer.h +) +target_include_directories(textureinthread PUBLIC + ../shared +) +target_link_libraries(textureinthread PRIVATE + Qt::CorePrivate + Qt::GuiPrivate +) +target_link_libraries(textureinthread PUBLIC + Qt::Core + Qt::Gui + Qt::Quick +) + +# Resources: +set(textureinthread_resource_files + "error.qml" + "main.qml" +) + +QT6_ADD_RESOURCES(textureinthread "textureinthread" + PREFIX + "/scenegraph/textureinthread" + FILES + ${textureinthread_resource_files} +) + + +install(TARGETS textureinthread + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/quick/scenegraph/threadedanimation/CMakeLists.txt b/examples/quick/scenegraph/threadedanimation/CMakeLists.txt new file mode 100644 index 0000000000..ef3ca17b93 --- /dev/null +++ b/examples/quick/scenegraph/threadedanimation/CMakeLists.txt @@ -0,0 +1,48 @@ +# Generated from threadedanimation.pro. + +cmake_minimum_required(VERSION 3.14) +project(threadedanimation LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(threadedanimation + main.cpp + spinner.cpp spinner.h +) +target_link_libraries(threadedanimation PUBLIC + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick +) + +# Resources: +set(threadedanimation_resource_files + "main.qml" + "spinner.png" +) + +QT6_ADD_RESOURCES(threadedanimation "threadedanimation" + PREFIX + "/scenegraph/threadedanimation" + FILES + ${threadedanimation_resource_files} +) + + +install(TARGETS threadedanimation + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/quick/scenegraph/twotextureproviders/CMakeLists.txt b/examples/quick/scenegraph/twotextureproviders/CMakeLists.txt new file mode 100644 index 0000000000..b07da2ba2b --- /dev/null +++ b/examples/quick/scenegraph/twotextureproviders/CMakeLists.txt @@ -0,0 +1,47 @@ +# Generated from twotextureproviders.pro. + +cmake_minimum_required(VERSION 3.14) +project(twotextureproviders LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(twotextureproviders + main.cpp + xorblender.cpp xorblender.h +) +target_link_libraries(twotextureproviders PUBLIC + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick +) + +# Resources: +set(twotextureproviders_resource_files + "main.qml" +) + +QT6_ADD_RESOURCES(twotextureproviders "twotextureproviders" + PREFIX + "/scenegraph/twotextureproviders" + FILES + ${twotextureproviders_resource_files} +) + + +install(TARGETS twotextureproviders + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |