Vulkan/RenderWindow: Add support for depth buffer

Former-commit-id: 42f113fcb7463c0f010fdc325b9024b08de3c667 [formerly 95040d268ff328f2d54459bf11c269dd5f042f73] [formerly 77c2d1139585cbf31f881ffddfb43b23284a7073 [formerly d235ff32fae4612d95d25524410bf1b43974d520]]
Former-commit-id: bab56f18d034bade640bf023c97810adf2c717ff [formerly c62041abb56103d6c7aeac2b55f7bf66acd8882b]
Former-commit-id: cef0ac55f6eaa54f17d3d0cc2030a4b9de7b166c
This commit is contained in:
Lynix
2016-08-09 13:53:12 +02:00
parent 16818fa7a3
commit 8776ffe953
4 changed files with 277 additions and 40 deletions

View File

@@ -0,0 +1,43 @@
// 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_VKIMAGE_HPP
#define NAZARA_VULKAN_VKIMAGE_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Vulkan/VkDeviceObject.hpp>
namespace Nz
{
namespace Vk
{
class Image : public DeviceObject<Image, VkImage, VkImageCreateInfo>
{
friend DeviceObject;
public:
Image() = default;
Image(const Image&) = delete;
Image(Image&&) = default;
~Image() = default;
bool BindImageMemory(VkDeviceMemory memory, VkDeviceSize offset = 0);
VkMemoryRequirements GetMemoryRequirements() const;
Image& operator=(const Image&) = delete;
Image& operator=(Image&&) = delete;
private:
static inline VkResult CreateHelper(const DeviceHandle& device, const VkImageCreateInfo* createInfo, const VkAllocationCallbacks* allocator, VkImage* handle);
static inline void DestroyHelper(const DeviceHandle& device, VkImage handle, const VkAllocationCallbacks* allocator);
};
}
}
#include <Nazara/Vulkan/VkImage.inl>
#endif // NAZARA_VULKAN_VKIMAGE_HPP