Add OpenGLRenderer (WIP)

This commit is contained in:
Lynix
2020-04-15 19:38:11 +02:00
parent ebb271a089
commit 68760209c1
118 changed files with 19236 additions and 414 deletions

View File

@@ -0,0 +1,43 @@
// Copyright (C) 2020 Jérôme Leclercq
// This file is part of the "Nazara Engine - OpenGL Renderer"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_OPENGLRENDERER_VKIMAGE_HPP
#define NAZARA_OPENGLRENDERER_VKIMAGE_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/OpenGLRenderer/Wrapper/DeviceObject.hpp>
namespace Nz
{
namespace Vk
{
class Image : public DeviceObject<Image, VkImage, VkImageCreateInfo, VK_OBJECT_TYPE_IMAGE>
{
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(Device& device, const VkImageCreateInfo* createInfo, const VkAllocationCallbacks* allocator, VkImage* handle);
static inline void DestroyHelper(Device& device, VkImage handle, const VkAllocationCallbacks* allocator);
};
}
}
#include <Nazara/OpenGLRenderer/Wrapper/Image.inl>
#endif // NAZARA_OPENGLRENDERER_VKIMAGE_HPP