/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright: * 2016-2017, Danny Robson */ #pragma once #include #include #include #include #include #include #include namespace cruft::vk { struct instance : public root { struct create_info_t : public VkInstanceCreateInfo { create_info_t (); create_info_t (const VkInstanceCreateInfo&); }; struct application_info_t : public VkApplicationInfo { application_info_t (); application_info_t (const VkApplicationInfo&); }; instance (); instance (cruft::view layers, cruft::view extensions); instance (const create_info_t &info); template FunctionT proc (const char *name) { auto ret = vkGetInstanceProcAddr (native (), name); if (!ret) throw vk::invalid_argument ("invalid procedure name"); return reinterpret_cast (ret); } std::set extensions (void) const; static std::vector available_layers (void); }; }