Skip to content

Commit 0da2e07

Browse files
committed
Merge branch 'master' into fast-intersection-queries
2 parents b99db7b + f329721 commit 0da2e07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+877
-643
lines changed

.github/workflows/ci-android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-latest]
14-
android-platform: [24, latest]
14+
android-platform: [29, latest]
1515
android-abi: [armeabi-v7a, arm64-v8a]
1616
build-shared: [ON]
1717

CMakeLists.txt

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
cmake_minimum_required(VERSION 3.7)
1+
cmake_minimum_required(VERSION 3.10)
22

33
project(vsg
4-
VERSION 1.1.12
4+
VERSION 1.1.13
55
DESCRIPTION "VulkanSceneGraph library"
66
LANGUAGES CXX
77
)
@@ -44,18 +44,10 @@ set(VSG_MAX_INSTRUMENTATION_LEVEL 1 CACHE STRING "Set the instrumentation level
4444
option(VSG_SUPPORTS_ShaderCompiler "Optional shader compiler support" ON)
4545
if (VSG_SUPPORTS_ShaderCompiler)
4646

47-
# Try looking for glslang 15 first.
48-
set(GLSLANG_MIN_VERSION "15" CACHE STRING "glslang 14 is the earliest version that we think installs itself properly on all platforms. Other platforms may be able to use an earlier version")
49-
find_package(glslang ${GLSLANG_MIN_VERSION} CONFIG QUIET)
50-
51-
if (NOT glslang_FOUND)
52-
# fallback to trying glslang 14.
53-
set(GLSLANG_MIN_VERSION "14")
54-
find_package(glslang ${GLSLANG_MIN_VERSION} CONFIG)
55-
endif()
47+
find_package(glslang CONFIG QUIET)
5648

5749
if (glslang_FOUND)
58-
set(FIND_DEPENDENCY_glslang "find_package(glslang ${GLSLANG_MIN_VERSION} CONFIG REQUIRED)")
50+
set(FIND_DEPENDENCY_glslang "find_package(glslang CONFIG REQUIRED)")
5951
else()
6052
message(WARNING "glslang not found. ShaderCompile support disabled.")
6153
set(VSG_SUPPORTS_ShaderCompiler 0)
@@ -98,7 +90,7 @@ if (VSG_SUPPORTS_Windowing)
9890
endif()
9991
endif()
10092

101-
option(VSG_USE_dynamic_cast "Use dynamic_cast in vsg::Object::cast<T>(), 0 for off, 1 for enabled." OFF)
93+
option(VSG_USE_dynamic_cast "Use dynamic_cast in vsg::Object::cast<T>(), default is OFF and uses VSG native casting which provides 2-3x faster than using dynamic_cast<>." OFF)
10294

10395
# this line needs to be after the call to setup_build_vars()
10496
configure_file("${VSG_SOURCE_DIR}/src/vsg/core/Version.h.in" "${VSG_VERSION_HEADER}")

INSTALL.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
* C++17 compliant compiler i.e. g++ 7.3 or later, Clang 6.0 or later, Visual Studio S2017 or later.
2222
* [Vulkan](https://vulkan.lunarg.com/) 1.1 or later. You can use Vulkan (libs and headers) installed from repositories or VulkanSDK.
23-
* [CMake](https://www.cmake.org) 3.7 or later.
23+
* [CMake](https://www.cmake.org) 3.10 or later.
2424

2525
---
2626

@@ -170,22 +170,19 @@ To assist with setting up software to work with the VSG when you install the lib
170170

171171
find_package(vsg)
172172

173-
To select C++17 compilation you'll need:
174-
175-
set_property(TARGET mytargetname PROPERTY CXX_STANDARD 17)
176-
177173
To link your lib/application to required dependencies you'll need:
178174

179175
target_link_libraries(mytargetname vsg::vsg)
180176

181177
This will tell CMake to set up all the appropriate include paths, libs and any definitions (such as the VSG_SHARED_LIBRARY #define that is required under Windows with shared library builds to select the correct declspec().)
182178

179+
This will also tell CMake that your minimum C++ standard is 17.
180+
183181
For example, a bare minimum CMakeLists.txt file to compile a single file application would be:
184182

185-
cmake_minimum_required(VERSION 3.7)
183+
cmake_minimum_required(VERSION 3.10)
186184
find_package(vsg REQUIRED)
187185
add_executable(myapp "myapp.cpp")
188-
set_property(TARGET myapp PROPERTY CXX_STANDARD 17)
189186
target_link_libraries(myapp vsg::vsg)
190187

191188
### Using VSG provided cmake macros within your own projects
@@ -194,7 +191,7 @@ The build system provides macros that create specific cmake targets to use in yo
194191

195192
For example, a bare minimum CMakeLists.txt file adding the mentioned cmake targets would be:
196193

197-
cmake_minimum_required(VERSION 3.7)
194+
cmake_minimum_required(VERSION 3.10)
198195
find_package(vsg REQUIRED)
199196

200197
vsg_setup_dir_vars()
@@ -218,7 +215,6 @@ For example, a bare minimum CMakeLists.txt file adding the mentioned cmake targe
218215
vsg_add_target_uninstall()
219216

220217
add_executable(myapp "myapp.cpp")
221-
set_property(TARGET myapp PROPERTY CXX_STANDARD 17)
222218
target_link_libraries(myapp vsg::vsg)
223219

224220
### Using VSG provided cmake macro to generate cmake support files

include/vsg/app/View.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ namespace vsg
7777
/// and when it is visited the visitor.traversalMask is &'ed with the mask to give the traversalMask to use in the subgraph.
7878
Mask mask = MASK_ALL;
7979

80+
/// LODScale scales
81+
double LODScale = 1.0;
82+
8083
/// bins
8184
std::vector<ref_ptr<Bin>> bins;
8285

include/vsg/app/Window.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,11 @@ namespace vsg
122122
ref_ptr<ImageView> imageView;
123123
ref_ptr<Framebuffer> framebuffer;
124124
ref_ptr<Semaphore> imageAvailableSemaphore;
125+
ref_ptr<Semaphore> renderFinishedSemaphore;
125126
};
126127

127128
using Frames = std::vector<Frame>;
129+
using Semaphores = std::vector<ref_ptr<Semaphore>>;
128130

129131
Frame& frame(size_t i) { return _frames[i]; }
130132
Frames& frames() { return _frames; }
@@ -173,10 +175,11 @@ namespace vsg
173175
ref_ptr<Image> _multisampleDepthImage;
174176
ref_ptr<ImageView> _multisampleDepthImageView;
175177

176-
ref_ptr<Semaphore> _availableSemaphore;
177-
178178
Frames _frames;
179179
std::vector<size_t> _indices;
180+
181+
Semaphores _availableSemaphores;
182+
size_t _availableSemaphoreIndex = 0;
180183
};
181184
VSG_type_name(vsg::Window);
182185

include/vsg/app/WindowTraits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace vsg
7070
VkImageUsageFlags depthImageUsage = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
7171

7272
VkQueueFlags queueFlags = VK_QUEUE_GRAPHICS_BIT;
73-
std::vector<float> queuePiorities{1.0, 0.0};
73+
std::vector<float> queuePriorities{1.0, 0.0};
7474
VkPipelineStageFlagBits imageAvailableSemaphoreWaitFlag = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
7575

7676
// hints to which extension to enable during Instance/Device setup

include/vsg/core/Array.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
3232
namespace vsg
3333
{
3434
template<typename T>
35-
class VSG_DECLSPEC Array : public Data
35+
class VSG_TEMPLATE_DECLSPEC Array : public Data
3636
{
3737
public:
3838
using value_type = T;

include/vsg/core/Array2D.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace vsg
3030
{
3131

3232
template<typename T>
33-
class VSG_DECLSPEC Array2D : public Data
33+
class VSG_TEMPLATE_DECLSPEC Array2D : public Data
3434
{
3535
public:
3636
using value_type = T;

include/vsg/core/Array3D.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
3030
namespace vsg
3131
{
3232
template<typename T>
33-
class VSG_DECLSPEC Array3D : public Data
33+
class VSG_TEMPLATE_DECLSPEC Array3D : public Data
3434
{
3535
public:
3636
using value_type = T;

include/vsg/core/Export.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,21 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
1616
# pragma warning(disable : 4251)
1717
#endif
1818

19-
#if defined(WIN32)
19+
#if defined(_WIN32)
2020
# if defined(vsg_EXPORTS)
2121
# define VSG_DECLSPEC __declspec(dllexport)
2222
# elif defined(VSG_SHARED_LIBRARY)
2323
# define VSG_DECLSPEC __declspec(dllimport)
2424
# else
2525
# define VSG_DECLSPEC
2626
# endif
27+
# define VSG_TEMPLATE_DECLSPEC
2728
#else
2829
# if defined(VSG_SHARED_LIBRARY) || defined(VSG_EXPORTS)
2930
# define VSG_DECLSPEC __attribute__((visibility("default")))
31+
# define VSG_TEMPLATE_DECLSPEC __attribute__((visibility("default")))
3032
# else
3133
# define VSG_DECLSPEC
34+
# define VSG_TEMPLATE_DECLSPEC
3235
# endif
3336
#endif

0 commit comments

Comments
 (0)