diff --git a/buffer.cpp b/buffer.cpp index 1bcbb01..574dbba 100644 --- a/buffer.cpp +++ b/buffer.cpp @@ -17,7 +17,7 @@ #include "./buffer.hpp" -using vk::buffer; +using cruft::vk::buffer; /////////////////////////////////////////////////////////////////////////////// diff --git a/buffer.hpp b/buffer.hpp index 8b04a22..bae25b4 100644 --- a/buffer.hpp +++ b/buffer.hpp @@ -15,13 +15,13 @@ * 2016, Danny Robson */ -#ifndef __VK_BUFFER_HPP -#define __VK_BUFFER_HPP +#ifndef CRUFT_VK_BUFFER_HPP +#define CRUFT_VK_BUFFER_HPP #include "./object.hpp" #include "./fwd.hpp" -namespace vk { +namespace cruft::vk { struct buffer : public owned { }; diff --git a/command_buffer.cpp b/command_buffer.cpp index 60bed16..10baad3 100644 --- a/command_buffer.cpp +++ b/command_buffer.cpp @@ -22,7 +22,7 @@ #include -using vk::command_buffer; +using cruft::vk::command_buffer; /////////////////////////////////////////////////////////////////////////////// diff --git a/command_buffer.hpp b/command_buffer.hpp index 5560c6f..876dd61 100644 --- a/command_buffer.hpp +++ b/command_buffer.hpp @@ -15,14 +15,14 @@ * 2016, Danny Robson */ -#ifndef __VK_COMMAND_BUFFER_HPP -#define __VK_COMMAND_BUFFER_HPP +#ifndef CRUFT_VK_COMMAND_BUFFER_HPP +#define CRUFT_VK_COMMAND_BUFFER_HPP #include "./object.hpp" #include -namespace vk { +namespace cruft::vk { struct command_buffer : public owned { void reset (VkCommandBufferResetFlags); diff --git a/command_pool.cpp b/command_pool.cpp index e28d47f..ecd1a3b 100644 --- a/command_pool.cpp +++ b/command_pool.cpp @@ -19,7 +19,7 @@ #include "./device.hpp" -using vk::command_pool; +using cruft::vk::command_pool; /////////////////////////////////////////////////////////////////////////////// diff --git a/command_pool.hpp b/command_pool.hpp index f11ddb7..43a43b4 100644 --- a/command_pool.hpp +++ b/command_pool.hpp @@ -15,12 +15,12 @@ * 2016, Danny Robson */ -#ifndef __VK_COMMAND_POOL_HPP -#define __VK_COMMAND_POOL_HPP +#ifndef CRUFT_VK_COMMAND_POOL_HPP +#define CRUFT_VK_COMMAND_POOL_HPP #include "./object.hpp" -namespace vk { +namespace cruft::vk { struct command_pool : public owned { void reset (const device&, VkCommandPoolResetFlags); }; diff --git a/device.cpp b/device.cpp index 6e7e331..158de23 100644 --- a/device.cpp +++ b/device.cpp @@ -22,7 +22,7 @@ #include #include -using vk::device; +using cruft::vk::device; /////////////////////////////////////////////////////////////////////////////// diff --git a/device.hpp b/device.hpp index 3ffa27e..8e394fe 100644 --- a/device.hpp +++ b/device.hpp @@ -15,14 +15,14 @@ * 2016, Danny Robson */ -#ifndef __VK_DEVICE_HPP -#define __VK_DEVICE_HPP +#ifndef CRUFT_VK_DEVICE_HPP +#define CRUFT_VK_DEVICE_HPP #include "./object.hpp" #include "./fwd.hpp" -namespace vk { +namespace cruft::vk { struct device : public instantiated { device (const physical_device&, const VkDeviceCreateInfo&); diff --git a/device_memory.cpp b/device_memory.cpp index 017a40a..1f8fef7 100644 --- a/device_memory.cpp +++ b/device_memory.cpp @@ -19,7 +19,7 @@ #include "./device.hpp" -using vk::device_memory; +using cruft::vk::device_memory; /////////////////////////////////////////////////////////////////////////////// diff --git a/device_memory.hpp b/device_memory.hpp index 066f4e6..d1ad831 100644 --- a/device_memory.hpp +++ b/device_memory.hpp @@ -15,13 +15,13 @@ * 2016, Danny Robson */ -#ifndef __VK_DEVICE_MEMORY_HPP -#define __VK_DEVICE_MEMORY_HPP +#ifndef CRUFT_VK_DEVICE_MEMORY_HPP +#define CRUFT_VK_DEVICE_MEMORY_HPP #include "./object.hpp" #include "./fwd.hpp" -namespace vk { +namespace cruft::vk { struct device_memory : public owned { void* map (const device&, VkDeviceSize offset, diff --git a/event.cpp b/event.cpp index bd33ec4..1f75aad 100644 --- a/event.cpp +++ b/event.cpp @@ -19,7 +19,7 @@ #include "./device.hpp" -using vk::event; +using cruft::vk::event; /////////////////////////////////////////////////////////////////////////////// diff --git a/event.hpp b/event.hpp index 467dd38..9579189 100644 --- a/event.hpp +++ b/event.hpp @@ -15,13 +15,13 @@ * 2016, Danny Robson */ -#ifndef __VK_EVENT_HPP -#define __VK_EVENT_HPP +#ifndef CRUFT_VK_EVENT_HPP +#define CRUFT_VK_EVENT_HPP #include "./object.hpp" #include "./fwd.hpp" -namespace vk { +namespace cruft::vk { struct event : public owned { bool is_set (const device&) const; diff --git a/except.cpp b/except.cpp index a092842..efa5f3d 100644 --- a/except.cpp +++ b/except.cpp @@ -18,8 +18,10 @@ #include "./except.hpp" #include +#include -using vk::error; +using cruft::vk::error; +using cruft::vk::error_code; /////////////////////////////////////////////////////////////////////////////// diff --git a/except.hpp b/except.hpp index e1ff076..319f0d4 100644 --- a/except.hpp +++ b/except.hpp @@ -15,14 +15,14 @@ * 2016, Danny Robson */ -#ifndef __VK_EXCEPT_HPP -#define __VK_EXCEPT_HPP +#ifndef CRUFT_VK_EXCEPT_HPP +#define CRUFT_VK_EXCEPT_HPP #include "./vk.hpp" #include -namespace vk { +namespace cruft::vk { class error : public std::exception { public: static void try_code (VkResult); diff --git a/fence.cpp b/fence.cpp index 23d60ed..8e14692 100644 --- a/fence.cpp +++ b/fence.cpp @@ -22,7 +22,7 @@ #include #include -using vk::fence; +using cruft::vk::fence; /////////////////////////////////////////////////////////////////////////////// diff --git a/fence.hpp b/fence.hpp index 986b81d..9bb34a6 100644 --- a/fence.hpp +++ b/fence.hpp @@ -15,12 +15,12 @@ * 2016, Danny Robson */ -#ifndef __VK_FENCE_HPP -#define __VK_FENCE_HPP +#ifndef CRUFT_VK_FENCE_HPP +#define CRUFT_VK_FENCE_HPP #include "./object.hpp" -namespace vk { +namespace cruft::vk { struct fence : owned { bool is_ready (const device &dev); diff --git a/framebuffer.cpp b/framebuffer.cpp index 97b7f5a..887cd82 100644 --- a/framebuffer.cpp +++ b/framebuffer.cpp @@ -19,7 +19,7 @@ #include "./device.hpp" -using vk::framebuffer; +using cruft::vk::framebuffer; /////////////////////////////////////////////////////////////////////////////// diff --git a/framebuffer.hpp b/framebuffer.hpp index 848e746..1a928f6 100644 --- a/framebuffer.hpp +++ b/framebuffer.hpp @@ -15,12 +15,12 @@ * 2016, Danny Robson */ -#ifndef __VK_FRAMEBUFFER_HPP -#define __VK_FRAMEBUFFER_HPP +#ifndef CRUFT_VK_FRAMEBUFFER_HPP +#define CRUFT_VK_FRAMEBUFFER_HPP #include "./object.hpp" -namespace vk { +namespace cruft::vk { struct framebuffer : public owned { VkExtent2D area_granularity (const device&) const; }; diff --git a/fwd.hpp b/fwd.hpp index ed2a891..1e1ad0d 100644 --- a/fwd.hpp +++ b/fwd.hpp @@ -15,12 +15,12 @@ * 2016, Danny Robson */ -#ifndef __VK_FWD_HPP -#define __VK_FWD_HPP +#ifndef CRUFT_VK_FWD_HPP +#define CRUFT_VK_FWD_HPP #include "./vk.hpp" -namespace vk { +namespace cruft::vk { template struct instantiated; template struct enumerated; template struct owned; diff --git a/image.hpp b/image.hpp index 691e5d7..e8e889e 100644 --- a/image.hpp +++ b/image.hpp @@ -15,10 +15,10 @@ * 2016, Danny Robson */ -#ifndef __VK_IMAGE_HPP -#define __VK_IMAGE_HPP +#ifndef CRUFT_VK_IMAGE_HPP +#define CRUFT_VK_IMAGE_HPP -namespace vk { +namespace cruft::vk { } diff --git a/instance.cpp b/instance.cpp index 7aed7e0..c52348f 100644 --- a/instance.cpp +++ b/instance.cpp @@ -17,7 +17,7 @@ #include "./instance.hpp" -using vk::instance; +using cruft::vk::instance; /////////////////////////////////////////////////////////////////////////////// diff --git a/instance.hpp b/instance.hpp index da14d7d..64e0b19 100644 --- a/instance.hpp +++ b/instance.hpp @@ -15,15 +15,15 @@ * 2016, Danny Robson */ -#ifndef __VK_INSTANCE_HPP -#define __VK_INSTANCE_HPP +#ifndef CRUFT_VK_INSTANCE_HPP +#define CRUFT_VK_INSTANCE_HPP #include "./object.hpp" #include "./vk.hpp" #include "./traits.hpp" -namespace vk { +namespace cruft::vk { struct instance : public instantiated { instance (const VkInstanceCreateInfo &info); }; diff --git a/object.cpp b/object.cpp index d42eba4..3070ef6 100644 --- a/object.cpp +++ b/object.cpp @@ -12,7 +12,10 @@ * limitations under the License. * * Copyright: - * 2016, Danny Robson + * 2016-2017, Danny Robson */ #include "./object.hpp" + +using cruft::vk::object; +using cruft::vk::enumerated; diff --git a/object.hpp b/object.hpp index 70ab4db..a17a72b 100644 --- a/object.hpp +++ b/object.hpp @@ -15,15 +15,15 @@ * 2016, Danny Robson */ -#ifndef __VK_OBJECT_HPP -#define __VK_OBJECT_HPP +#ifndef CRUFT_VK_OBJECT_HPP +#define CRUFT_VK_OBJECT_HPP #include "./traits.hpp" #include "./except.hpp" #include -namespace vk { +namespace cruft::vk { template struct object { using id_t = typename id_traits::id_t; diff --git a/physical_device.cpp b/physical_device.cpp index f9b1904..f2524d6 100644 --- a/physical_device.cpp +++ b/physical_device.cpp @@ -15,6 +15,8 @@ * 2016, Danny Robson */ -#include "physical_device.hpp" +#include "./physical_device.hpp" + +#include "./except.hpp" /////////////////////////////////////////////////////////////////////////////// diff --git a/physical_device.hpp b/physical_device.hpp index 12379fa..95747bd 100644 --- a/physical_device.hpp +++ b/physical_device.hpp @@ -15,14 +15,14 @@ * 2016, Danny Robson */ -#ifndef __VK_PHYSICAL_DEVICE_HPP -#define __VK_PHYSICAL_DEVICE_HPP +#ifndef CRUFT_VK_PHYSICAL_DEVICE_HPP +#define CRUFT_VK_PHYSICAL_DEVICE_HPP #include "./object.hpp" #include "./vk.hpp" -namespace vk { +namespace cruft::vk { struct physical_device : public enumerated { }; } diff --git a/pipeline.cpp b/pipeline.cpp index c7b826c..b26542b 100644 --- a/pipeline.cpp +++ b/pipeline.cpp @@ -17,7 +17,7 @@ #include "./pipeline.hpp" -using vk::pipeline; +using cruft::vk::pipeline; /////////////////////////////////////////////////////////////////////////////// diff --git a/pipeline.hpp b/pipeline.hpp index 5d44b6e..fbeb8a3 100644 --- a/pipeline.hpp +++ b/pipeline.hpp @@ -15,13 +15,13 @@ * 2016, Danny Robson */ -#ifndef __VK_PIPELINE_HPP -#define __VK_PIPELINE_HPP +#ifndef CRUFT_VK_PIPELINE_HPP +#define CRUFT_VK_PIPELINE_HPP #include "./object.hpp" #include "./fwd.hpp" -namespace vk { +namespace cruft::vk { struct pipeline : public owned { }; diff --git a/pipeline_cache.cpp b/pipeline_cache.cpp index b519635..1f0663d 100644 --- a/pipeline_cache.cpp +++ b/pipeline_cache.cpp @@ -21,7 +21,7 @@ #include "./object.hpp" #include "./fwd.hpp" -namespace vk { +namespace cruft::vk { struct pipeline_cache : public owned { void merge (const device&, const pipeline_cache *first, diff --git a/pipeline_cache.hpp b/pipeline_cache.hpp index d6d549c..f309c30 100644 --- a/pipeline_cache.hpp +++ b/pipeline_cache.hpp @@ -19,7 +19,7 @@ #include "./device.hpp" -using vk::pipeline_cache; +using cruft::vk::pipeline_cache; /////////////////////////////////////////////////////////////////////////////// diff --git a/queue.cpp b/queue.cpp index ab8d085..009e883 100644 --- a/queue.cpp +++ b/queue.cpp @@ -19,7 +19,7 @@ #include "./except.hpp" -using vk::queue; +using cruft::vk::queue; /////////////////////////////////////////////////////////////////////////////// diff --git a/queue.hpp b/queue.hpp index 30ea30e..74b02a7 100644 --- a/queue.hpp +++ b/queue.hpp @@ -15,13 +15,13 @@ * 2016, Danny Robson */ -#ifndef __VK_QUEUE_HPP -#define __VK_QUEUE_HPP +#ifndef CRUFT_VK_QUEUE_HPP +#define CRUFT_VK_QUEUE_HPP #include "./object.hpp" #include "./fwd.hpp" -namespace vk { +namespace cruft::vk { struct queue : public owned { void wait_idle (void); diff --git a/render_pass.hpp b/render_pass.hpp index 2db9a11..f10b5ea 100644 --- a/render_pass.hpp +++ b/render_pass.hpp @@ -15,12 +15,12 @@ * 2016, Danny Robson */ -#ifndef __VK_RENDER_PASS_HPP -#define __VK_RENDER_PASS_HPP +#ifndef CRUFT_VK_RENDER_PASS_HPP +#define CRUFT_VK_RENDER_PASS_HPP #include "./object.hpp" -namespace vk { +namespace cruft::vk { struct render_pass : public owned { }; diff --git a/semaphore.hpp b/semaphore.hpp index 8583274..26e9bc0 100644 --- a/semaphore.hpp +++ b/semaphore.hpp @@ -15,13 +15,13 @@ * 2016, Danny Robson */ -#ifndef __VK_SEMAPHORE_HPP -#define __VK_SEMAPHORE_HPP +#ifndef CRUFT_VK_SEMAPHORE_HPP +#define CRUFT_VK_SEMAPHORE_HPP #include "./object.hpp" #include "./fwd.hpp" -namespace vk { +namespace cruft::vk { struct semaphore : public owned { }; diff --git a/shader_module.hpp b/shader_module.hpp index 0ee8c05..c34ceb1 100644 --- a/shader_module.hpp +++ b/shader_module.hpp @@ -15,13 +15,13 @@ * 2016, Danny Robson */ -#ifndef __VK_SHADER_MODULE_HPP -#define __VK_SHADER_MODULE_HPP +#ifndef CRUFT_VK_SHADER_MODULE_HPP +#define CRUFT_VK_SHADER_MODULE_HPP #include "./object.hpp" #include "./fwd.hpp" -namespace vk { +namespace cruft::vk { struct shader_module : public owned { }; diff --git a/traits.hpp b/traits.hpp index 6124e14..ac10ac2 100644 --- a/traits.hpp +++ b/traits.hpp @@ -15,13 +15,13 @@ * 2016, Danny Robson */ -#ifndef __VK_TRAITS_HPP -#define __VK_TRAITS_HPP +#ifndef CRUFT_VK_TRAITS_HPP +#define CRUFT_VK_TRAITS_HPP #include "./fwd.hpp" #include "./vk.hpp" -namespace vk { +namespace cruft::vk { /////////////////////////////////////////////////////////////////////////// template struct id_traits { };