Files
NazaraEngine/include/Nazara/Vulkan/VkSemaphore.hpp
Lynix f3f46b71fb Vulkan: Make device objects take a device handle at creation
Former-commit-id: 985b9f5b04aef4d6de55ee6d360a2da92bed8940 [formerly e31d84225897da96b0438d49dbdf6473a7873a17]
Former-commit-id: 82ed4eeccde614312fff717ab1f469335c861292
2016-06-08 12:57:06 +02:00

43 lines
1.3 KiB
C++

// Copyright (C) 2016 Jérôme Leclercq
// This file is part of the "Nazara Engine - Vulkan"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_VULKAN_VKSEMAPHORE_HPP
#define NAZARA_VULKAN_VKSEMAPHORE_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Vulkan/VkDeviceObject.hpp>
namespace Nz
{
namespace Vk
{
class Semaphore : public DeviceObject<Semaphore, VkSemaphore, VkSemaphoreCreateInfo>
{
friend DeviceObject;
public:
Semaphore() = default;
Semaphore(const Semaphore&) = delete;
Semaphore(Semaphore&&) = default;
~Semaphore() = default;
using DeviceObject::Create;
inline bool Create(DeviceObject device, VkSemaphoreCreateFlags flags = 0, const VkAllocationCallbacks* allocator = nullptr);
Semaphore& operator=(const Semaphore&) = delete;
Semaphore& operator=(Semaphore&&) = delete;
private:
static VkResult CreateHelper(const DeviceHandle& device, const VkSemaphoreCreateInfo* createInfo, const VkAllocationCallbacks* allocator, VkSemaphore* handle);
static void DestroyHelper(const DeviceHandle& device, VkSemaphore handle, const VkAllocationCallbacks* allocator);
};
}
}
#include <Nazara/Vulkan/VkSemaphore.inl>
#endif // NAZARA_VULKAN_VKSEMAPHORE_HPP