instance: add a default constructor
This commit is contained in:
parent
4f7e12951c
commit
3141c27338
12
instance.cpp
12
instance.cpp
@ -12,17 +12,19 @@
|
||||
* limitations under the License.
|
||||
*
|
||||
* Copyright:
|
||||
* 2016, Danny Robson <danny@nerdcruft.net>
|
||||
* 2016-2017, Danny Robson <danny@nerdcruft.net>
|
||||
*/
|
||||
|
||||
#include "./instance.hpp"
|
||||
|
||||
#include "./traits.hpp"
|
||||
|
||||
using cruft::vk::instance;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
static const VkInstanceCreateInfo DEFAULT_INFO = {
|
||||
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
|
||||
.sType = cruft::vk::structure_type_v<VkInstanceCreateInfo>,
|
||||
.pNext = nullptr,
|
||||
.flags = 0,
|
||||
|
||||
@ -49,6 +51,12 @@ instance::create_info::create_info (const VkInstanceCreateInfo &base):
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
instance::instance ():
|
||||
instance (create_info ())
|
||||
{ ; }
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
instance::instance (const create_info &info):
|
||||
instantiated (&info, nullptr)
|
||||
{ ; }
|
||||
|
@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*
|
||||
* Copyright:
|
||||
* 2016, Danny Robson <danny@nerdcruft.net>
|
||||
* 2016-2017, Danny Robson <danny@nerdcruft.net>
|
||||
*/
|
||||
|
||||
#ifndef CRUFT_VK_INSTANCE_HPP
|
||||
@ -33,6 +33,7 @@ namespace cruft::vk {
|
||||
create_info (const VkInstanceCreateInfo&);
|
||||
};
|
||||
|
||||
instance ();
|
||||
instance (const create_info &info);
|
||||
|
||||
std::set<std::string> extensions (void) const;
|
||||
|
Loading…
Reference in New Issue
Block a user