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

Method prepare

samples/api/oit_linked_lists/oit_linked_lists.cpp:52–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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