Skip to content

Commit

Permalink
Merge pull request vsg-dev#189 from vsg-dev/master
Browse files Browse the repository at this point in the history
Merge fixes from master.
  • Loading branch information
robertosfield authored Nov 18, 2022
2 parents 876558b + 98f15d4 commit 2a13cc6
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 14 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion examples/app/vsgdeviceselection/vsgdeviceselection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<std::endl;

window->setPhysicalDevice(physicalDevice);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/nodes/vsgpagedlod/vsgpagedlod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions examples/platform/vsgandroidnative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
5 changes: 1 addition & 4 deletions examples/platform/vsgandroidnative/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion examples/platform/vsgandroidnative/app/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/vsgandroidnative/app/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct AppData
{
struct android_app* app;

vsg::ref_ptr<vsg::Window::Traits> traits;
vsg::ref_ptr<vsg::WindowTraits> traits;
vsg::ref_ptr<vsg::Viewer> viewer;
vsg::ref_ptr<vsgAndroid::Android_Window> window;

Expand Down
2 changes: 1 addition & 1 deletion examples/platform/vsgandroidnative/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion examples/traversals/CMakeLists.txt

This file was deleted.

1 change: 1 addition & 0 deletions examples/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
add_subdirectory(vsgbuilder)
add_subdirectory(vsggraphicspipelineconfigurator)
add_subdirectory(vsgshaderset)
add_subdirectory(vsgintersection)
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,11 @@ class IntersectionHandler : public vsg::Inherit<vsg::Visitor, IntersectionHandle

if (verbose)
{
std::string name;
for (auto& node : intersection->nodePath)
{
std::cout << ", " << node->className();
if (node->getValue("name", name)) std::cout<<":name="<<name;
}

std::cout << ", Arrays[ ";
Expand Down

0 comments on commit 2a13cc6

Please sign in to comment.