instance: add constructor from base info type
This commit is contained in:
parent
1ac4db07ff
commit
ba3a49eccf
35
instance.cpp
35
instance.cpp
@ -21,24 +21,35 @@ using cruft::vk::instance;
|
|||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
instance::create_info::create_info ()
|
static const VkInstanceCreateInfo DEFAULT_INFO = {
|
||||||
{
|
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
|
||||||
sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
.pNext = nullptr,
|
||||||
pNext = nullptr;
|
.flags = 0,
|
||||||
flags = 0;
|
|
||||||
|
|
||||||
pApplicationInfo = nullptr;
|
.pApplicationInfo = nullptr,
|
||||||
|
|
||||||
enabledLayerCount = 0;
|
.enabledLayerCount = 0,
|
||||||
ppEnabledLayerNames = nullptr;
|
.ppEnabledLayerNames = nullptr,
|
||||||
|
|
||||||
enabledExtensionCount = 0;
|
.enabledExtensionCount = 0,
|
||||||
ppEnabledExtensionNames = nullptr;
|
.ppEnabledExtensionNames = nullptr
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
instance::instance (const VkInstanceCreateInfo &info):
|
instance::create_info::create_info ():
|
||||||
|
create_info (DEFAULT_INFO)
|
||||||
|
{ ; }
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
instance::create_info::create_info (const VkInstanceCreateInfo &base):
|
||||||
|
VkInstanceCreateInfo (base)
|
||||||
|
{ ; }
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
instance::instance (const create_info &info):
|
||||||
instantiated (&info, nullptr)
|
instantiated (&info, nullptr)
|
||||||
{ ; }
|
{ ; }
|
||||||
|
|
||||||
|
@ -30,9 +30,10 @@ namespace cruft::vk {
|
|||||||
struct instance : public instantiated<instance> {
|
struct instance : public instantiated<instance> {
|
||||||
struct create_info : public VkInstanceCreateInfo {
|
struct create_info : public VkInstanceCreateInfo {
|
||||||
create_info ();
|
create_info ();
|
||||||
|
create_info (const VkInstanceCreateInfo&);
|
||||||
};
|
};
|
||||||
|
|
||||||
instance (const VkInstanceCreateInfo &info);
|
instance (const create_info &info);
|
||||||
|
|
||||||
std::set<std::string> extensions (void) const;
|
std::set<std::string> extensions (void) const;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user