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.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* Copyright:
|
* Copyright:
|
||||||
* 2016, Danny Robson <danny@nerdcruft.net>
|
* 2016-2017, Danny Robson <danny@nerdcruft.net>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "./instance.hpp"
|
#include "./instance.hpp"
|
||||||
|
|
||||||
|
#include "./traits.hpp"
|
||||||
|
|
||||||
using cruft::vk::instance;
|
using cruft::vk::instance;
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
static const VkInstanceCreateInfo DEFAULT_INFO = {
|
static const VkInstanceCreateInfo DEFAULT_INFO = {
|
||||||
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
|
.sType = cruft::vk::structure_type_v<VkInstanceCreateInfo>,
|
||||||
.pNext = nullptr,
|
.pNext = nullptr,
|
||||||
.flags = 0,
|
.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):
|
instance::instance (const create_info &info):
|
||||||
instantiated (&info, nullptr)
|
instantiated (&info, nullptr)
|
||||||
{ ; }
|
{ ; }
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* Copyright:
|
* Copyright:
|
||||||
* 2016, Danny Robson <danny@nerdcruft.net>
|
* 2016-2017, Danny Robson <danny@nerdcruft.net>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CRUFT_VK_INSTANCE_HPP
|
#ifndef CRUFT_VK_INSTANCE_HPP
|
||||||
@ -33,6 +33,7 @@ namespace cruft::vk {
|
|||||||
create_info (const VkInstanceCreateInfo&);
|
create_info (const VkInstanceCreateInfo&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
instance ();
|
||||||
instance (const create_info &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