-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from ARM-software/develop
Release v1.2.0
- Loading branch information
Showing
219 changed files
with
9,409 additions
and
5,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.1.4 | ||
1.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,18 @@ | |
|
||
#include "@[email protected]" | ||
|
||
#include "common/vk_common.h" | ||
#include "gltf_loader.h" | ||
#include "gui.h" | ||
#include "platform/filesystem.h" | ||
#include "platform/platform.h" | ||
#include "rendering/subpasses/scene_subpass.h" | ||
#include "stats.h" | ||
|
||
#if defined(VK_USE_PLATFORM_ANDROID_KHR) | ||
# include "platform/android/android_platform.h" | ||
#endif | ||
|
||
@SAMPLE_NAME@::@SAMPLE_NAME@() | ||
{ | ||
} | ||
|
@@ -30,14 +42,6 @@ bool @SAMPLE_NAME@::prepare(vkb::Platform &platform) | |
{ | ||
return false; | ||
} | ||
|
||
std::vector<const char *> extensions = {VK_KHR_SWAPCHAIN_EXTENSION_NAME}; | ||
|
||
device = std::make_unique<vkb::Device>(get_gpu(), get_surface(), extensions); | ||
|
||
auto swapchain = std::make_unique<vkb::Swapchain>(*device, get_surface()); | ||
|
||
render_context = std::make_unique<vkb::RenderContext>(std::move(swapchain)); | ||
|
||
// Load a scene from the assets folder | ||
load_scene("scenes/sponza/Sponza01.gltf"); | ||
|
@@ -47,16 +51,16 @@ bool @SAMPLE_NAME@::prepare(vkb::Platform &platform) | |
auto camera = &camera_node.get_component<vkb::sg::Camera>(); | ||
|
||
// Example Scene Render Pipeline | ||
vkb::ShaderSource vert_shader(vkb::file::read_asset("shaders/base.vert")); | ||
vkb::ShaderSource frag_shader(vkb::file::read_asset("shaders/base.frag")); | ||
auto scene_subpass = std::make_unique<vkb::SceneSubpass>(*render_context, std::move(vert_shader), std::move(frag_shader), *scene, *camera); | ||
vkb::ShaderSource vert_shader(vkb::fs::read_shader("base.vert")); | ||
vkb::ShaderSource frag_shader(vkb::fs::read_shader("base.frag")); | ||
auto scene_subpass = std::make_unique<vkb::SceneSubpass>(get_render_context(), std::move(vert_shader), std::move(frag_shader), *scene, *camera); | ||
auto render_pipeline = vkb::RenderPipeline(); | ||
render_pipeline.add_subpass(std::move(scene_subpass)); | ||
set_render_pipeline(std::move(render_pipeline)); | ||
|
||
// Add a GUI with the stats you want to monitor | ||
stats = std::make_unique<vkb::Stats>(std::set<vkb::StatIndex>{vkb::StatIndex::frame_times}); | ||
gui = std::make_unique<vkb::Gui>(*render_context, platform.get_dpi_factor()); | ||
gui = std::make_unique<vkb::Gui>(*this, platform.get_dpi_factor()); | ||
|
||
return true; | ||
} | ||
|
Oops, something went wrong.