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

Method input_event

framework/vulkan_sample.h:1153–1186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1151 }
1152}
1153
1154template <vkb::BindingType bindingType>
1155inline bool VulkanSample<bindingType>::prepare(const ApplicationOptions &options)
1156{
1157 if (!Parent::prepare(options))
1158 {
1159 return false;
1160 }
1161
1162 LOGI("Initializing Vulkan sample");
1163
1164 // initialize C++-Bindings default dispatcher, first step
1165#if defined(_HPP_VULKAN_LIBRARY)
1166 static vk::detail::DynamicLoader dl(_HPP_VULKAN_LIBRARY);
1167#else
1168 static vk::detail::DynamicLoader dl;
1169#endif
1170 VULKAN_HPP_DEFAULT_DISPATCHER.init(dl.getProcAddress<PFN_vkGetInstanceProcAddr>("vkGetInstanceProcAddr"));
1171
1172 bool headless = window->get_window_mode() == Window::Mode::Headless;
1173
1174 // for a while we're running on mixed C- and C++-bindings, needing volk for the C-bindings!
1175 VkResult result = volkInitialize();
1176 if (result)
1177 {
1178 throw VulkanException(result, "Failed to initialize volk.");
1179 }
1180
1181 if constexpr (bindingType == BindingType::Cpp)
1182 {
1183 instance = create_instance();
1184 }
1185 else
1186 {
1187 instance.reset(reinterpret_cast<vkb::core::InstanceCpp *>(create_instance().release()));
1188 }
1189

Callers

nothing calls this directly

Calls 4

get_sourceMethod · 0.80
get_actionMethod · 0.80
get_codeMethod · 0.80
screenshotFunction · 0.50

Tested by

no test coverage detected