Skip to content

Commit b2cfd8a

Browse files
committed
Merge branch 'release-1.1.x'
2 parents dcdd2e1 + 1d77df3 commit b2cfd8a

299 files changed

Lines changed: 16291 additions & 9679 deletions

File tree

Some content is hidden

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

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Version History
22
---------------
33

4+
### Open VKL 1.1.0
5+
6+
- vklExamples improvements: asynchronous rendering, multiple viewports,
7+
docking, and more
8+
- Fixed bug in `openvkl_utility_vdb` which could lead to crashes when creating
9+
VDB volumes with temporally constant tiles
10+
- Superbuild updates to latest versions of dependencies
11+
- Minimum rkcommon version is now 1.8.0
12+
413
### Open VKL 1.0.1
514

615
- Fixed issue in `structuredRegular` and `vdb` interval iterators that could

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
1919

2020
## Establish project ##
2121

22-
project(openvkl VERSION 1.0.1 LANGUAGES C CXX)
22+
project(openvkl VERSION 1.1.0 LANGUAGES C CXX)
2323

2424
## Add openvkl specific macros ##
2525

@@ -47,7 +47,7 @@ openvkl_configure_build_type()
4747
openvkl_configure_global_build_flags()
4848
openvkl_configure_ispc_isa()
4949

50-
set(RKCOMMON_VERSION_REQUIRED 1.7.0)
50+
set(RKCOMMON_VERSION_REQUIRED 1.8.0)
5151
find_package(rkcommon ${RKCOMMON_VERSION_REQUIRED} REQUIRED)
5252
get_target_property(RKCOMMON_INCLUDE_DIRS rkcommon::rkcommon
5353
INTERFACE_INCLUDE_DIRECTORIES)

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Intel® Open Volume Kernel Library
22

3-
This is release v1.0.1 of Intel® Open VKL. For changes and new features
3+
This is release v1.1.0 of Intel® Open VKL. For changes and new features
44
see the [changelog](CHANGELOG.md). Visit http://www.openvkl.org for more
55
information.
66

@@ -33,6 +33,15 @@ example renderers to demonstrate how to best use the Open VKL API.
3333

3434
## Version History
3535

36+
### Open VKL 1.1.0
37+
38+
- vklExamples improvements: asynchronous rendering, multiple
39+
viewports, docking, and more
40+
- Fixed bug in `openvkl_utility_vdb` which could lead to crashes when
41+
creating VDB volumes with temporally constant tiles
42+
- Superbuild updates to latest versions of dependencies
43+
- Minimum rkcommon version is now 1.8.0
44+
3645
### Open VKL 1.0.1
3746

3847
- Fixed issue in `structuredRegular` and `vdb` interval iterators that
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Copyright 2021 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#include "BatchApplication.h"
5+
#include "renderer/Framebuffer.h"
6+
#include "renderer/Renderer.h"
7+
#include "renderer/Scene.h"
8+
#include "renderer/Scheduler.h"
9+
10+
#include "rkcommon/utility/SaveImage.h"
11+
12+
namespace openvkl {
13+
namespace examples {
14+
15+
BatchApplication::BatchApplication() {}
16+
17+
BatchApplication::~BatchApplication() {}
18+
19+
void BatchApplication::run(Scene &scene)
20+
{
21+
if (scene.rendererTypes.empty()) {
22+
scene.rendererTypes = {"density_path_tracer_ispc"};
23+
}
24+
25+
auto &scheduler = scene.scheduler;
26+
auto &volume = scene.volume;
27+
28+
scene.rendererParams->fixedFramebufferSize = true;
29+
const vec2i resolution = scene.rendererParams->framebufferSize;
30+
31+
std::cout << "Creating VKL objects ..." << std::endl;
32+
volume.updateVKLObjects();
33+
volume.printInfo();
34+
scene.camera->fitToScreen(volume.getBounds());
35+
scene.camera.incrementVersion();
36+
37+
for (const auto &type : scene.rendererTypes) {
38+
auto rendererPtr = scene.createRenderer(type);
39+
if (!rendererPtr) {
40+
continue;
41+
}
42+
43+
Renderer &renderer = *(rendererPtr.get());
44+
// This call will resize the framebuffer to our desired output
45+
// resolution.
46+
renderer.getFramebuffer(resolution.x, resolution.y);
47+
48+
const std::string filename = type + ".pfm";
49+
50+
std::cout << "Rendering with " << type << " ..." << std::endl;
51+
52+
scheduler.start(renderer);
53+
for (unsigned i = 0; i < scene.batchModeSpp; ++i) {
54+
std::cout << "\r" << i << " / " << scene.batchModeSpp << " spp"
55+
<< std::flush;
56+
scheduler.renderFrame(renderer);
57+
}
58+
scheduler.stop(renderer);
59+
std::cout << std::endl;
60+
61+
const auto &framebuffer =
62+
renderer.getFramebuffer(resolution.x, resolution.y);
63+
const auto &fb = framebuffer.getFrontBuffer();
64+
std::cout << "Writing " << filename << " ..." << std::endl;
65+
rkcommon::utility::writePFM(
66+
filename, fb.getWidth(), fb.getHeight(), fb.getRgba());
67+
}
68+
}
69+
70+
} // namespace examples
71+
} // namespace openvkl
72+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright 2021 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#pragma once
5+
6+
#include <memory>
7+
#include <list>
8+
#include <vector>
9+
10+
namespace openvkl {
11+
namespace examples {
12+
13+
struct Scene;
14+
class Scheduler;
15+
16+
class BatchApplication
17+
{
18+
public:
19+
BatchApplication();
20+
~BatchApplication();
21+
void run(Scene &scene);
22+
};
23+
24+
} // namespace examples
25+
} // namespace openvkl
26+
27+
Lines changed: 55 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,69 @@
11
## Copyright 2019-2021 Intel Corporation
22
## SPDX-License-Identifier: Apache-2.0
33

4-
## OpenGL dependency ##
5-
6-
set(OpenGL_GL_PREFERENCE "LEGACY")
7-
find_package(OpenGL 2 REQUIRED)
8-
9-
## GLFW dependency ##
10-
11-
find_package(glfw3 REQUIRED)
12-
13-
## Example renderers ##
14-
15-
include_directories_ispc(
16-
${CMAKE_SOURCE_DIR}/openvkl/include
17-
${CMAKE_SOURCE_DIR}/openvkl/devices/cpu/math
18-
${RKCOMMON_INCLUDE_DIRS}
19-
)
20-
21-
openvkl_add_library_ispc(vkl_example_renderers STATIC
22-
renderers/Renderer.cpp
23-
renderers/Renderer.ih
24-
renderers/Renderer.ispc
25-
26-
renderers/DensityPathTracer.cpp
27-
renderers/DensityPathTracer.ispc
28-
renderers/HitIterator.cpp
29-
renderers/HitIterator.ispc
30-
renderers/IntervalIteratorDebug.cpp
31-
renderers/IntervalIteratorDebug.ispc
32-
renderers/RayMarchIterator.cpp
33-
renderers/RayMarchIterator.ispc
34-
)
35-
36-
target_include_directories(vkl_example_renderers PUBLIC ${ISPC_TARGET_DIR})
37-
38-
target_link_libraries(vkl_example_renderers PUBLIC openvkl openvkl_testing rkcommon::rkcommon)
39-
40-
41-
42-
set(OPENVKL_IMGUI_ROOT "${CMAKE_CURRENT_LIST_DIR}/imgui-1.81"
43-
CACHE PATH "Path to imgui.")
44-
45-
add_library(imgui STATIC
46-
${OPENVKL_IMGUI_ROOT}/imgui.cpp
47-
${OPENVKL_IMGUI_ROOT}/imgui_draw.cpp
48-
${OPENVKL_IMGUI_ROOT}/imgui_tables.cpp
49-
${OPENVKL_IMGUI_ROOT}/imgui_widgets.cpp
50-
${OPENVKL_IMGUI_ROOT}/backends/imgui_impl_glfw.cpp
51-
${OPENVKL_IMGUI_ROOT}/backends/imgui_impl_opengl2.cpp)
52-
53-
target_include_directories(imgui PUBLIC ${OPENVKL_IMGUI_ROOT})
54-
target_link_libraries(imgui PUBLIC glfw)
55-
56-
## Interactive example app ##
57-
58-
add_executable(vklExamples
59-
window/ArcballCamera.cpp
60-
window/VKLWindow.cpp
61-
window/GLFWVKLWindow.cpp
62-
vklExamples.cpp
63-
window/TransferFunctionWidget.cpp
64-
65-
${VKL_RESOURCE}
66-
)
4+
add_subdirectory(renderer)
5+
6+
### vklExamples app ##
7+
8+
set(OpenGL_GL_PREFERENCE "GLVND") # Request new ABI, but this is only a hint.
9+
find_package(OpenGL 2)
10+
11+
if (OPENGL_FOUND)
12+
add_library(vkl_opengl INTERFACE)
13+
target_compile_definitions(vkl_opengl INTERFACE GL_SILENCE_DEPRECATION)
14+
if (TARGET OpenGL::GL)
15+
target_link_libraries(vkl_opengl INTERFACE OpenGL::GL)
16+
else ()
17+
# Old versions of cmake do not create the GL targets.
18+
target_link_libraries(vkl_opengl INTERFACE ${OPENGL_LIBRARIES})
19+
target_include_directories(vkl_opengl INTERFACE ${OPENGL_INCLUDE_DIR})
20+
endif ()
21+
22+
find_package(glfw3 REQUIRED)
23+
24+
set(OPENVKL_IMGUI_ROOT "${CMAKE_CURRENT_LIST_DIR}/imgui-1.83"
25+
CACHE PATH "Path to imgui.")
26+
27+
add_library(imgui STATIC
28+
${OPENVKL_IMGUI_ROOT}/imgui.cpp
29+
${OPENVKL_IMGUI_ROOT}/imgui_draw.cpp
30+
${OPENVKL_IMGUI_ROOT}/imgui_tables.cpp
31+
${OPENVKL_IMGUI_ROOT}/imgui_widgets.cpp
32+
${OPENVKL_IMGUI_ROOT}/backends/imgui_impl_glfw.cpp
33+
${OPENVKL_IMGUI_ROOT}/backends/imgui_impl_opengl2.cpp)
34+
35+
target_include_directories(imgui PUBLIC ${OPENVKL_IMGUI_ROOT})
36+
target_link_libraries(imgui PUBLIC glfw vkl_opengl)
37+
target_compile_definitions(imgui PUBLIC VKL_HAVE_IMGUI)
38+
endif()
6739

68-
target_link_libraries(vklExamples PRIVATE
69-
openvkl_utility
70-
openvkl_testing
71-
imgui
72-
vkl_example_renderers
73-
${OPENGL_LIBRARIES}
74-
)
40+
if (TARGET imgui)
41+
add_executable(vklExamples
42+
vklExamples.cpp
43+
BatchApplication.cpp
44+
InteractiveApplication.cpp
45+
ParameterGui.cpp
46+
RenderView.cpp
47+
TransferFunctionWidget.cpp
48+
${VKL_RESOURCE}
49+
)
7550

76-
target_include_directories(vklExamples PRIVATE ${CMAKE_CURRENT_LIST_DIR})
77-
target_compile_definitions(vklExamples PRIVATE GL_SILENCE_DEPRECATION)
51+
target_link_libraries(vklExamples
52+
PRIVATE
53+
imgui
54+
vkl_example_renderers
55+
)
7856

79-
install(TARGETS vklExamples RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
57+
install(TARGETS vklExamples
58+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
59+
)
60+
endif()
8061

81-
## Benchmark app ##
62+
### vklBenchmark app ##
8263

8364
if (BUILD_BENCHMARKS)
8465
add_executable(vklBenchmark
85-
window/ArcballCamera.cpp
86-
window/VKLWindow.cpp
8766
vklBenchmark.cpp
88-
8967
${VKL_RESOURCE}
9068
)
9169

@@ -96,7 +74,5 @@ if (BUILD_BENCHMARKS)
9674
vkl_example_renderers
9775
)
9876

99-
target_include_directories(vklBenchmark PRIVATE ${CMAKE_CURRENT_LIST_DIR})
100-
10177
install(TARGETS vklBenchmark RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
10278
endif()

0 commit comments

Comments
 (0)