MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / prepare

Method prepare

samples/api/oit_depth_peeling/oit_depth_peeling.cpp:53–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53bool OITDepthPeeling::prepare(const vkb::ApplicationOptions &options)
54{
55 if (!ApiVulkanSample::prepare(options))
56 {
57 return false;
58 }
59
60 camera.type = vkb::CameraType::LookAt;
61 camera.set_position({0.0f, 0.0f, -4.0f});
62 camera.set_rotation({0.0f, 0.0f, 0.0f});
63 camera.set_perspective(60.0f, static_cast<float>(width) / static_cast<float>(height), 16.0f, 0.1f);
64
65 load_assets();
66 create_samplers();
67 create_constant_buffers();
68 create_descriptors();
69 create_sized_objects(width, height);
70 create_pipelines();
71
72 update_scene_constants();
73 update_descriptors();
74 build_command_buffers();
75
76 prepared = true;
77 return true;
78}
79
80bool OITDepthPeeling::resize(const uint32_t width, const uint32_t height)
81{

Callers

nothing calls this directly

Calls 3

set_positionMethod · 0.80
set_perspectiveMethod · 0.80
set_rotationMethod · 0.45

Tested by

no test coverage detected