From 1f17ee7fbbac350040415102a913dcd86d0f0836 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Wed, 18 Jan 2023 08:53:40 +0000 Subject: [PATCH] Test --- include/Orange/Render/RenderContext.h | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/include/Orange/Render/RenderContext.h b/include/Orange/Render/RenderContext.h index 27afd47..59e8337 100644 --- a/include/Orange/Render/RenderContext.h +++ b/include/Orange/Render/RenderContext.h @@ -54,6 +54,48 @@ namespace orange VkDeviceSize m_offset = 0u; }; +/* + template + struct VkHandleDestructor + { + void destroy(T) + } + + template + class VkHandle + { + public: + VkHandle() { } + + VkHandle(std::nullptr_t) { } + + VkHandle(T handle) + : m_handle(handle) { } + + ~VkHandle() + { + + } + + T get() const { return m_handle; } + + T* operator & () { return &m_handle; } + const T* operator & () const { return &m_handle; } + + T operator -> () const { return m_handle; } + operator T() const { return m_handle; } + operator bool() const { return handle != VK_NULL_HANDLE; } + + bool operator == (T other) const { return m_handle == other; } + bool operator != (T other) const { return m_handle != other; } + + bool operator == (std::nullptr_t) const { return m_ptr == VK_NULL_HANDLE; } + bool operator != (std::nullptr_t) const { return m_ptr != VK_NULL_HANDLE; } + private: + T m_handle = VK_NULL_HANDLE; + }; +*/ + template using VulkanResult = Result;