From efbb2588837e7b67b319e9eec71b7f8c5011d241 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 14 Nov 2022 10:42:09 +0000 Subject: [PATCH 1/7] Added more physical device info reporting to --select implementation to make it clearer what has been selected. --- examples/app/vsgdeviceselection/vsgdeviceselection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/app/vsgdeviceselection/vsgdeviceselection.cpp b/examples/app/vsgdeviceselection/vsgdeviceselection.cpp index a3d30f23..c66e3b49 100644 --- a/examples/app/vsgdeviceselection/vsgdeviceselection.cpp +++ b/examples/app/vsgdeviceselection/vsgdeviceselection.cpp @@ -137,8 +137,9 @@ int main(int argc, char** argv) // create a vk/vsg::PhysicalDevice, prefer discrete GPU over integrated GPUs when they area available. auto physicalDevice = physicalDevices[pd_num]; + auto properties = physicalDevice->getProperties(); - std::cout << "Created our own vsg::PhysicalDevice " << physicalDevice << std::endl; + std::cout << "Selected vsg::PhysicalDevice " << physicalDevice << " " << properties.deviceName << " deviceType = " << properties.deviceType <setPhysicalDevice(physicalDevice); } From cc1d7abbe80cd5d8e71175ae01cd7a45b786a209 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 15 Nov 2022 08:54:20 +0000 Subject: [PATCH 2/7] Replaced https with http --- examples/nodes/vsgpagedlod/vsgpagedlod.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/nodes/vsgpagedlod/vsgpagedlod.cpp b/examples/nodes/vsgpagedlod/vsgpagedlod.cpp index 51a71ada..5b233908 100644 --- a/examples/nodes/vsgpagedlod/vsgpagedlod.cpp +++ b/examples/nodes/vsgpagedlod/vsgpagedlod.cpp @@ -63,7 +63,7 @@ int main(int argc, char** argv) tileReader->maxLevel = 19; tileReader->originTopLeft = true; tileReader->projection = "EPSG:3857"; // spherical-mercator - tileReader->imageLayer = "https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"; + tileReader->imageLayer = "http://a.tile.openstreetmap.org/{z}/{x}/{y}.png"; } if (arguments.read("--rm") || !tileReader->imageLayer) From aba5cd8907b770e9470d81013dbf32f4c779b58b Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 17 Nov 2022 11:54:32 +0000 Subject: [PATCH 3/7] Added report of any name field. --- examples/traversals/vsgintersection/vsgintersection.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/traversals/vsgintersection/vsgintersection.cpp b/examples/traversals/vsgintersection/vsgintersection.cpp index 1905b26f..575d1172 100644 --- a/examples/traversals/vsgintersection/vsgintersection.cpp +++ b/examples/traversals/vsgintersection/vsgintersection.cpp @@ -120,9 +120,11 @@ class IntersectionHandler : public vsg::InheritnodePath) { std::cout << ", " << node->className(); + if (node->getValue("name", name)) std::cout<<":name="< Date: Thu, 17 Nov 2022 12:20:13 +0000 Subject: [PATCH 4/7] Moved vsgintersection from examples/traversal to examples/utils --- CMakeLists.txt | 1 - examples/utils/CMakeLists.txt | 1 + examples/{traversals => utils}/vsgintersection/CMakeLists.txt | 0 .../{traversals => utils}/vsgintersection/vsgintersection.cpp | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename examples/{traversals => utils}/vsgintersection/CMakeLists.txt (100%) rename examples/{traversals => utils}/vsgintersection/vsgintersection.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index d044e181..fe464a95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,6 @@ add_subdirectory(examples/ui) add_subdirectory(examples/state) add_subdirectory(examples/commands) add_subdirectory(examples/nodes) -add_subdirectory(examples/traversals) add_subdirectory(examples/threading) add_subdirectory(examples/app) add_subdirectory(examples/vk) diff --git a/examples/utils/CMakeLists.txt b/examples/utils/CMakeLists.txt index 32aba7d1..0bf0dab8 100644 --- a/examples/utils/CMakeLists.txt +++ b/examples/utils/CMakeLists.txt @@ -1,3 +1,4 @@ add_subdirectory(vsgbuilder) add_subdirectory(vsggraphicspipelineconfigurator) add_subdirectory(vsgshaderset) +add_subdirectory(vsgintersection) diff --git a/examples/traversals/vsgintersection/CMakeLists.txt b/examples/utils/vsgintersection/CMakeLists.txt similarity index 100% rename from examples/traversals/vsgintersection/CMakeLists.txt rename to examples/utils/vsgintersection/CMakeLists.txt diff --git a/examples/traversals/vsgintersection/vsgintersection.cpp b/examples/utils/vsgintersection/vsgintersection.cpp similarity index 100% rename from examples/traversals/vsgintersection/vsgintersection.cpp rename to examples/utils/vsgintersection/vsgintersection.cpp From bc04410a3f491e9fd19959a82e48339dbf55d212 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 17 Nov 2022 17:13:56 +0000 Subject: [PATCH 5/7] Removed nolonger used directory --- examples/traversals/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 examples/traversals/CMakeLists.txt diff --git a/examples/traversals/CMakeLists.txt b/examples/traversals/CMakeLists.txt deleted file mode 100644 index 2da6f3ec..00000000 --- a/examples/traversals/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(vsgintersection) From 5d2ebd96140e3d68ae863048abc835f16d628edd Mon Sep 17 00:00:00 2001 From: Gareth Francis Date: Thu, 17 Nov 2022 20:45:14 +0000 Subject: [PATCH 6/7] Upgrade Android example Gradle version --- examples/platform/vsgandroidnative/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/platform/vsgandroidnative/build.gradle b/examples/platform/vsgandroidnative/build.gradle index 4e99eeb8..157ec5d4 100755 --- a/examples/platform/vsgandroidnative/build.gradle +++ b/examples/platform/vsgandroidnative/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:7.3.0' } } diff --git a/examples/platform/vsgandroidnative/gradle/wrapper/gradle-wrapper.properties b/examples/platform/vsgandroidnative/gradle/wrapper/gradle-wrapper.properties index d604c726..8710f01c 100755 --- a/examples/platform/vsgandroidnative/gradle/wrapper/gradle-wrapper.properties +++ b/examples/platform/vsgandroidnative/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Feb 05 19:39:12 IST 2017 +#Thu Nov 17 20:42:48 GMT 2022 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +zipStoreBase=GRADLE_USER_HOME From a19cd8ae59399083513e4acef38f47d2a1376606 Mon Sep 17 00:00:00 2001 From: Gareth Francis Date: Thu, 17 Nov 2022 21:02:48 +0000 Subject: [PATCH 7/7] Project fixes for Android Example --- examples/platform/vsgandroidnative/README.md | 2 ++ examples/platform/vsgandroidnative/app/build.gradle | 5 +---- examples/platform/vsgandroidnative/app/cpp/CMakeLists.txt | 3 ++- examples/platform/vsgandroidnative/app/cpp/main.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/platform/vsgandroidnative/README.md b/examples/platform/vsgandroidnative/README.md index cf071588..b56f9a99 100644 --- a/examples/platform/vsgandroidnative/README.md +++ b/examples/platform/vsgandroidnative/README.md @@ -20,6 +20,8 @@ This example demonstates how to create a window, load assests and render a scene 4. At the bottom of the file add the path to your cmake directory (v3.13) like so cmake.dir=/usr/local/Cellar/cmake/3.13.0 5. Open /app/build.gradle and change the '-Dvsg_DIR' path in the cmake arguments section to point to your Android VSG install path. + * Alternatively, edit app/cpp/CMakeLists.txt and add replace find_package(vsg) with add_subdirectory(/path/to/VulkanSceneGraph vsg). This will build vsg from source, as part of the Android app's CMake project + * Note that when using -Dvsg_DIR or CMAKE_PREFIX_PATH on Android, only paths within the Android sysroot are allowed by default. You can use find_package(vsg NO_CMAKE_FIND_ROOT_PATH) to override this behaviour 6. Build the application diff --git a/examples/platform/vsgandroidnative/app/build.gradle b/examples/platform/vsgandroidnative/app/build.gradle index 4982d588..0e8a1eec 100755 --- a/examples/platform/vsgandroidnative/app/build.gradle +++ b/examples/platform/vsgandroidnative/app/build.gradle @@ -10,10 +10,7 @@ android { externalNativeBuild { cmake { version "3.13.0" - arguments '-DCMAKE_SYSTEM_NAME="Android', '-DCMAKE_SYSTEM_VERSION=24', '-DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a', '-DANDROID_STL=c++_static', '-Dvsg_DIR=/usr/local/android/lib/cmake/vsg' - } - ndk { - abiFilters 'armeabi-v7a' + arguments '-DANDROID_STL=c++_static' } } } diff --git a/examples/platform/vsgandroidnative/app/cpp/CMakeLists.txt b/examples/platform/vsgandroidnative/app/cpp/CMakeLists.txt index 32a583f0..4b8363f7 100755 --- a/examples/platform/vsgandroidnative/app/cpp/CMakeLists.txt +++ b/examples/platform/vsgandroidnative/app/cpp/CMakeLists.txt @@ -21,7 +21,8 @@ target_include_directories(vsgnative PRIVATE ${ANDROID_NDK}/sources/android/native_app_glue) # find vsg -find_package(vsg REQUIRED) +# find_package(vsg REQUIRED) +add_subdirectory(/path/to/VulkanSceneGraph vsg) # add lib dependencies target_link_libraries(vsgnative diff --git a/examples/platform/vsgandroidnative/app/cpp/main.cpp b/examples/platform/vsgandroidnative/app/cpp/main.cpp index 9fd256da..bdf80c45 100755 --- a/examples/platform/vsgandroidnative/app/cpp/main.cpp +++ b/examples/platform/vsgandroidnative/app/cpp/main.cpp @@ -21,7 +21,7 @@ struct AppData { struct android_app* app; - vsg::ref_ptr traits; + vsg::ref_ptr traits; vsg::ref_ptr viewer; vsg::ref_ptr window;