<commit_before>// Copyright (C) 2020 <NAME>
// This file is part of the "Nazara Engine - Vulkan Renderer"
// For conditions of distribution and use, see copyright notice in Config.hpp

#include <Nazara/VulkanRenderer/Wrapper/Instance.hpp>
#include <Nazara/Core/Error.hpp>
#include <Nazara/VulkanRenderer/Utils.hpp>
#include <cassert>
#include <Nazara/VulkanRenderer/Debug.hpp>

namespace Nz
{
	namespace Vk
	{
		inline Instance::Instance() :
		m_instance(nullptr)
		{
		}

		inline Instance::~Instance()
		{
			DestroyInstance();
		}

		inline bool Instance::Create(const String& appName, UInt32 appVersion, const String& engineName, UInt32 engineVersion, const std::vector<const char*>& layers, const std::vector<const char*>& extensions, const VkAllocationCallbacks* allocator)
		{
			VkApplicationInfo appInfo = 
			{
				VK_STRUCTURE_TYPE_APPLICATION_INFO,
				nullptr,
				appName.GetConstBuffer(),
				appVersion,
				engineName.GetConstBuffer(),
				engineVersion
			};

			VkInstanceCreateInfo instanceInfo = 
			{
				VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,<commit_msg>Fix instance destruction<commit_after>// Copyright (C) 2020 <NAME>
// This file is part of the "Nazara Engine - Vulkan Renderer"
// For conditions of distribution and use, see copyright notice in Config.hpp

#include <Nazara/VulkanRenderer/Wrapper/Instance.hpp>
#include <Nazara/Core/Error.hpp>
#include <Nazara/VulkanRenderer/Utils.hpp>
#include <cassert>
#include <Nazara/VulkanRenderer/Debug.hpp>

namespace Nz
{
	namespace Vk
	{
		inline Instance::Instance() :
		m_instance(nullptr)
		{
		}

		inline Instance::~Instance()
		{
			if (m_instance)
				DestroyInstance();
		}

		inline bool Instance::Create(const String& appName, UInt32 appVersion, const String& engineName, UInt32 engineVersion, const std::vector<const char*>& layers, const std::vector<const char*>& extensions, const VkAllocationCallbacks* allocator)
		{
			VkApplicationInfo appInfo = 
			{
				VK_STRUCTURE_TYPE_APPLICATION_INFO,
				nullptr,
				appName.GetConstBuffer(),
				appVersion,
				engineName.GetConstBuffer(),
				engineVersion
			};

			VkInstanceCreateInfo instanceInfo = 
			{
				VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
{'fraction_non_alphanumeric': 0.10242341106538637, 'fraction_numerical': 0.007315957933241884, 'mean_word_length': 4.595907928388747, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '820213', 'n_tokens_mistral': 804, 'n_tokens_neox': 712, 'n_words': 163}