From d8a7ee14c7430b10887cca6cec3d96c1e3402fe9 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Sun, 2 Jul 2023 00:43:29 +0100 Subject: [PATCH 1/3] Modernise Graphics file structure. --- CMakeLists.txt | 3 +- graphics/CMakeLists.txt | 155 ++++++++++++++++++ .../GraphicsMemoryBlock.cpp | 2 +- .../GraphicsMemoryBlockCollection.cpp | 2 +- .../GraphicsPipeline.cpp | 2 +- .../GraphicsPipelineInput.cpp | 2 +- .../GraphicsPipelineInputElement.cpp | 2 +- .../GraphicsPipelineResource.cpp | 2 +- .../GraphicsPipelineSignature.cpp | 2 +- .../GraphicsResourceManager.cpp | 2 +- .../Graphics => graphics}/ShaderProgram.cpp | 2 +- .../Vulkan/VulkanGraphicsAdapter.cpp | 2 +- .../Vulkan/VulkanGraphicsAdapterSelector.cpp | 2 +- .../Vulkan/VulkanGraphicsBuffer.cpp | 2 +- .../Vulkan/VulkanGraphicsContext.cpp | 2 +- .../Vulkan/VulkanGraphicsDevice.cpp | 2 +- .../Vulkan/VulkanGraphicsFence.cpp | 2 +- .../Vulkan/VulkanGraphicsMemoryAllocator.cpp | 2 +- .../Vulkan/VulkanGraphicsMemoryBlock.cpp | 2 +- .../VulkanGraphicsMemoryBlockCollection.cpp | 2 +- .../Vulkan/VulkanGraphicsPipeline.cpp | 2 +- .../VulkanGraphicsPipelineSignature.cpp | 2 +- .../Vulkan/VulkanGraphicsPluginProvider.cpp | 2 +- .../Vulkan/VulkanGraphicsProvider.cpp | 2 +- .../Vulkan/VulkanGraphicsSurfaceContext.cpp | 2 +- .../Vulkan/VulkanGraphicsTexture.cpp | 2 +- .../Vulkan/VulkanShaderProgram.cpp | 2 +- .../NovelRT/Graphics/D3D12/Graphics.D3D12.hpp | 8 +- .../Utilities/Graphics.D3D12.Utilities.hpp | 2 +- .../D3D12/Utilities/PipelineBlendFactor.hpp | 0 .../include/NovelRT/Graphics/Graphics.hpp | 82 ++++----- .../NovelRT/Graphics/GraphicsAdapter.hpp | 0 .../NovelRT/Graphics/GraphicsBuffer.hpp | 0 .../NovelRT/Graphics/GraphicsBufferKind.hpp | 0 .../NovelRT/Graphics/GraphicsContext.hpp | 0 .../NovelRT/Graphics/GraphicsDevice.hpp | 0 .../NovelRT/Graphics/GraphicsDeviceObject.hpp | 0 .../NovelRT/Graphics/GraphicsFence.hpp | 0 .../Graphics/GraphicsMemoryAllocator.hpp | 0 .../GraphicsMemoryAllocatorSettings.hpp | 0 .../NovelRT/Graphics/GraphicsMemoryBlock.hpp | 0 .../GraphicsMemoryBlockCollection.hpp | 0 .../NovelRT/Graphics/GraphicsMemoryBudget.hpp | 0 .../NovelRT/Graphics/GraphicsMemoryRegion.hpp | 0 .../GraphicsMemoryRegionAllocationFlags.hpp | 0 .../NovelRT/Graphics/GraphicsPipeline.hpp | 0 .../Graphics/GraphicsPipelineBlendFactor.hpp | 0 .../Graphics/GraphicsPipelineInput.hpp | 0 .../Graphics/GraphicsPipelineInputElement.hpp | 0 .../GraphicsPipelineInputElementKind.hpp | 0 .../Graphics/GraphicsPipelineResource.hpp | 0 .../Graphics/GraphicsPipelineResourceKind.hpp | 0 .../Graphics/GraphicsPipelineSignature.hpp | 0 .../NovelRT/Graphics/GraphicsPrimitive.hpp | 0 .../NovelRT/Graphics/GraphicsProvider.hpp | 0 .../NovelRT/Graphics/GraphicsResource.hpp | 0 .../Graphics/GraphicsResourceAccess.hpp | 0 .../Graphics/GraphicsResourceManager.hpp | 0 .../Graphics/GraphicsSurfaceContext.hpp | 0 .../NovelRT/Graphics/GraphicsSurfaceKind.hpp | 0 .../NovelRT/Graphics/GraphicsTexture.hpp | 0 .../Graphics/GraphicsTextureAddressMode.hpp | 0 .../NovelRT/Graphics/GraphicsTextureKind.hpp | 0 .../Graphics/IGraphicsAdapterSelector.hpp | 0 .../IGraphicsMemoryRegionCollection.hpp | 0 .../NovelRT/Graphics/IGraphicsSurface.hpp | 0 .../NovelRT/Graphics/Metal/Graphics.Metal.hpp | 0 .../Utilities/Graphics.Metal.Utilities.hpp | 0 .../Metal/Utilities/PipelineBlendFactor.hpp | 0 .../include/NovelRT/Graphics/RGBAColour.hpp | 0 .../NovelRT/Graphics/ShaderProgram.hpp | 0 .../NovelRT/Graphics/ShaderProgramKind.hpp | 0 .../Graphics/ShaderProgramVisibility.hpp | 0 .../include/NovelRT/Graphics/TexelFormat.hpp | 0 .../Graphics/Vulkan/Graphics.Vulkan.hpp | 83 ++++++++++ .../Graphics/Vulkan/QueueFamilyIndices.hpp | 0 .../Vulkan/SwapChainSupportDetails.hpp | 0 .../Vulkan/Utilities/BufferUsageKind.hpp | 0 .../Utilities/Graphics.Vulkan.Utilities.hpp | 10 +- .../Vulkan/Utilities/PipelineBlendFactor.hpp | 0 .../Graphics/Vulkan/Utilities/Support.hpp | 0 .../Graphics/Vulkan/Utilities/Texel.hpp | 0 .../Vulkan/Utilities/TextureAddressMode.hpp | 0 .../Graphics/Vulkan/VulkanGraphicsAdapter.hpp | 0 .../Vulkan/VulkanGraphicsAdapterSelector.hpp | 0 .../Graphics/Vulkan/VulkanGraphicsBuffer.hpp | 0 .../Graphics/Vulkan/VulkanGraphicsContext.hpp | 0 .../Graphics/Vulkan/VulkanGraphicsDevice.hpp | 0 .../Graphics/Vulkan/VulkanGraphicsFence.hpp | 0 .../Vulkan/VulkanGraphicsMemoryAllocator.hpp | 0 .../Vulkan/VulkanGraphicsMemoryBlock.hpp | 0 .../VulkanGraphicsMemoryBlockCollection.hpp | 0 .../Vulkan/VulkanGraphicsPipeline.hpp | 0 .../VulkanGraphicsPipelineSignature.hpp | 0 .../Vulkan/VulkanGraphicsPluginProvider.hpp | 0 .../Vulkan/VulkanGraphicsPrimitive.hpp | 0 .../Vulkan/VulkanGraphicsProvider.hpp | 0 .../Vulkan/VulkanGraphicsSurfaceContext.hpp | 0 .../Graphics/Vulkan/VulkanGraphicsTexture.hpp | 0 .../Graphics/Vulkan/VulkanShaderProgram.hpp | 0 include/NovelRT/Ecs/Graphics/Ecs.Graphics.h | 2 +- .../NovelRT/Graphics/Vulkan/Graphics.Vulkan.h | 82 --------- include/NovelRT/NovelRT.h | 11 +- .../PluginManagement/PluginManagement.h | 2 +- include/NovelRT/Windowing/Windowing.h | 2 +- src/NovelRT/CMakeLists.txt | 31 +--- .../PluginManagement/TemporaryFnPtrs.cpp | 2 +- 107 files changed, 327 insertions(+), 198 deletions(-) create mode 100644 graphics/CMakeLists.txt rename {src/NovelRT/Graphics => graphics}/GraphicsMemoryBlock.cpp (96%) rename {src/NovelRT/Graphics => graphics}/GraphicsMemoryBlockCollection.cpp (99%) rename {src/NovelRT/Graphics => graphics}/GraphicsPipeline.cpp (97%) rename {src/NovelRT/Graphics => graphics}/GraphicsPipelineInput.cpp (95%) rename {src/NovelRT/Graphics => graphics}/GraphicsPipelineInputElement.cpp (95%) rename {src/NovelRT/Graphics => graphics}/GraphicsPipelineResource.cpp (92%) rename {src/NovelRT/Graphics => graphics}/GraphicsPipelineSignature.cpp (97%) rename {src/NovelRT/Graphics => graphics}/GraphicsResourceManager.cpp (99%) rename {src/NovelRT/Graphics => graphics}/ShaderProgram.cpp (92%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsAdapter.cpp (97%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsAdapterSelector.cpp (98%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsBuffer.cpp (99%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsContext.cpp (99%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsDevice.cpp (99%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsFence.cpp (98%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsMemoryAllocator.cpp (99%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsMemoryBlock.cpp (97%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsMemoryBlockCollection.cpp (95%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsPipeline.cpp (99%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsPipelineSignature.cpp (99%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsPluginProvider.cpp (97%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsProvider.cpp (99%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsSurfaceContext.cpp (97%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanGraphicsTexture.cpp (99%) rename {src/NovelRT/Graphics => graphics}/Vulkan/VulkanShaderProgram.cpp (97%) rename include/NovelRT/Graphics/D3D12/Graphics.D3D12.h => graphics/include/NovelRT/Graphics/D3D12/Graphics.D3D12.hpp (71%) rename include/NovelRT/Graphics/D3D12/Utilities/Graphics.D3D12.Utilities.h => graphics/include/NovelRT/Graphics/D3D12/Utilities/Graphics.D3D12.Utilities.hpp (87%) rename include/NovelRT/Graphics/D3D12/Utilities/PipelineBlendFactor.h => graphics/include/NovelRT/Graphics/D3D12/Utilities/PipelineBlendFactor.hpp (100%) rename include/NovelRT/Graphics/Graphics.h => graphics/include/NovelRT/Graphics/Graphics.hpp (53%) rename include/NovelRT/Graphics/GraphicsAdapter.h => graphics/include/NovelRT/Graphics/GraphicsAdapter.hpp (100%) rename include/NovelRT/Graphics/GraphicsBuffer.h => graphics/include/NovelRT/Graphics/GraphicsBuffer.hpp (100%) rename include/NovelRT/Graphics/GraphicsBufferKind.h => graphics/include/NovelRT/Graphics/GraphicsBufferKind.hpp (100%) rename include/NovelRT/Graphics/GraphicsContext.h => graphics/include/NovelRT/Graphics/GraphicsContext.hpp (100%) rename include/NovelRT/Graphics/GraphicsDevice.h => graphics/include/NovelRT/Graphics/GraphicsDevice.hpp (100%) rename include/NovelRT/Graphics/GraphicsDeviceObject.h => graphics/include/NovelRT/Graphics/GraphicsDeviceObject.hpp (100%) rename include/NovelRT/Graphics/GraphicsFence.h => graphics/include/NovelRT/Graphics/GraphicsFence.hpp (100%) rename include/NovelRT/Graphics/GraphicsMemoryAllocator.h => graphics/include/NovelRT/Graphics/GraphicsMemoryAllocator.hpp (100%) rename include/NovelRT/Graphics/GraphicsMemoryAllocatorSettings.h => graphics/include/NovelRT/Graphics/GraphicsMemoryAllocatorSettings.hpp (100%) rename include/NovelRT/Graphics/GraphicsMemoryBlock.h => graphics/include/NovelRT/Graphics/GraphicsMemoryBlock.hpp (100%) rename include/NovelRT/Graphics/GraphicsMemoryBlockCollection.h => graphics/include/NovelRT/Graphics/GraphicsMemoryBlockCollection.hpp (100%) rename include/NovelRT/Graphics/GraphicsMemoryBudget.h => graphics/include/NovelRT/Graphics/GraphicsMemoryBudget.hpp (100%) rename include/NovelRT/Graphics/GraphicsMemoryRegion.h => graphics/include/NovelRT/Graphics/GraphicsMemoryRegion.hpp (100%) rename include/NovelRT/Graphics/GraphicsMemoryRegionAllocationFlags.h => graphics/include/NovelRT/Graphics/GraphicsMemoryRegionAllocationFlags.hpp (100%) rename include/NovelRT/Graphics/GraphicsPipeline.h => graphics/include/NovelRT/Graphics/GraphicsPipeline.hpp (100%) rename include/NovelRT/Graphics/GraphicsPipelineBlendFactor.h => graphics/include/NovelRT/Graphics/GraphicsPipelineBlendFactor.hpp (100%) rename include/NovelRT/Graphics/GraphicsPipelineInput.h => graphics/include/NovelRT/Graphics/GraphicsPipelineInput.hpp (100%) rename include/NovelRT/Graphics/GraphicsPipelineInputElement.h => graphics/include/NovelRT/Graphics/GraphicsPipelineInputElement.hpp (100%) rename include/NovelRT/Graphics/GraphicsPipelineInputElementKind.h => graphics/include/NovelRT/Graphics/GraphicsPipelineInputElementKind.hpp (100%) rename include/NovelRT/Graphics/GraphicsPipelineResource.h => graphics/include/NovelRT/Graphics/GraphicsPipelineResource.hpp (100%) rename include/NovelRT/Graphics/GraphicsPipelineResourceKind.h => graphics/include/NovelRT/Graphics/GraphicsPipelineResourceKind.hpp (100%) rename include/NovelRT/Graphics/GraphicsPipelineSignature.h => graphics/include/NovelRT/Graphics/GraphicsPipelineSignature.hpp (100%) rename include/NovelRT/Graphics/GraphicsPrimitive.h => graphics/include/NovelRT/Graphics/GraphicsPrimitive.hpp (100%) rename include/NovelRT/Graphics/GraphicsProvider.h => graphics/include/NovelRT/Graphics/GraphicsProvider.hpp (100%) rename include/NovelRT/Graphics/GraphicsResource.h => graphics/include/NovelRT/Graphics/GraphicsResource.hpp (100%) rename include/NovelRT/Graphics/GraphicsResourceAccess.h => graphics/include/NovelRT/Graphics/GraphicsResourceAccess.hpp (100%) rename include/NovelRT/Graphics/GraphicsResourceManager.h => graphics/include/NovelRT/Graphics/GraphicsResourceManager.hpp (100%) rename include/NovelRT/Graphics/GraphicsSurfaceContext.h => graphics/include/NovelRT/Graphics/GraphicsSurfaceContext.hpp (100%) rename include/NovelRT/Graphics/GraphicsSurfaceKind.h => graphics/include/NovelRT/Graphics/GraphicsSurfaceKind.hpp (100%) rename include/NovelRT/Graphics/GraphicsTexture.h => graphics/include/NovelRT/Graphics/GraphicsTexture.hpp (100%) rename include/NovelRT/Graphics/GraphicsTextureAddressMode.h => graphics/include/NovelRT/Graphics/GraphicsTextureAddressMode.hpp (100%) rename include/NovelRT/Graphics/GraphicsTextureKind.h => graphics/include/NovelRT/Graphics/GraphicsTextureKind.hpp (100%) rename include/NovelRT/Graphics/IGraphicsAdapterSelector.h => graphics/include/NovelRT/Graphics/IGraphicsAdapterSelector.hpp (100%) rename include/NovelRT/Graphics/IGraphicsMemoryRegionCollection.h => graphics/include/NovelRT/Graphics/IGraphicsMemoryRegionCollection.hpp (100%) rename include/NovelRT/Graphics/IGraphicsSurface.h => graphics/include/NovelRT/Graphics/IGraphicsSurface.hpp (100%) rename include/NovelRT/Graphics/Metal/Graphics.Metal.h => graphics/include/NovelRT/Graphics/Metal/Graphics.Metal.hpp (100%) rename include/NovelRT/Graphics/Metal/Utilities/Graphics.Metal.Utilities.h => graphics/include/NovelRT/Graphics/Metal/Utilities/Graphics.Metal.Utilities.hpp (100%) rename include/NovelRT/Graphics/Metal/Utilities/PipelineBlendFactor.h => graphics/include/NovelRT/Graphics/Metal/Utilities/PipelineBlendFactor.hpp (100%) rename include/NovelRT/Graphics/RGBAColour.h => graphics/include/NovelRT/Graphics/RGBAColour.hpp (100%) rename include/NovelRT/Graphics/ShaderProgram.h => graphics/include/NovelRT/Graphics/ShaderProgram.hpp (100%) rename include/NovelRT/Graphics/ShaderProgramKind.h => graphics/include/NovelRT/Graphics/ShaderProgramKind.hpp (100%) rename include/NovelRT/Graphics/ShaderProgramVisibility.h => graphics/include/NovelRT/Graphics/ShaderProgramVisibility.hpp (100%) rename include/NovelRT/Graphics/TexelFormat.h => graphics/include/NovelRT/Graphics/TexelFormat.hpp (100%) create mode 100644 graphics/include/NovelRT/Graphics/Vulkan/Graphics.Vulkan.hpp rename include/NovelRT/Graphics/Vulkan/QueueFamilyIndices.h => graphics/include/NovelRT/Graphics/Vulkan/QueueFamilyIndices.hpp (100%) rename include/NovelRT/Graphics/Vulkan/SwapChainSupportDetails.h => graphics/include/NovelRT/Graphics/Vulkan/SwapChainSupportDetails.hpp (100%) rename include/NovelRT/Graphics/Vulkan/Utilities/BufferUsageKind.h => graphics/include/NovelRT/Graphics/Vulkan/Utilities/BufferUsageKind.hpp (100%) rename include/NovelRT/Graphics/Vulkan/Utilities/Graphics.Vulkan.Utilities.h => graphics/include/NovelRT/Graphics/Vulkan/Utilities/Graphics.Vulkan.Utilities.hpp (60%) rename include/NovelRT/Graphics/Vulkan/Utilities/PipelineBlendFactor.h => graphics/include/NovelRT/Graphics/Vulkan/Utilities/PipelineBlendFactor.hpp (100%) rename include/NovelRT/Graphics/Vulkan/Utilities/Support.h => graphics/include/NovelRT/Graphics/Vulkan/Utilities/Support.hpp (100%) rename include/NovelRT/Graphics/Vulkan/Utilities/Texel.h => graphics/include/NovelRT/Graphics/Vulkan/Utilities/Texel.hpp (100%) rename include/NovelRT/Graphics/Vulkan/Utilities/TextureAddressMode.h => graphics/include/NovelRT/Graphics/Vulkan/Utilities/TextureAddressMode.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapter.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapter.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapterSelector.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapterSelector.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsBuffer.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsBuffer.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsContext.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsContext.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsDevice.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsDevice.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsFence.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsFence.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryAllocator.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryAllocator.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlock.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlock.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipeline.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipeline.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipelineSignature.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipelineSignature.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsPluginProvider.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPluginProvider.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsPrimitive.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPrimitive.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsProvider.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsProvider.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsSurfaceContext.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsSurfaceContext.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanGraphicsTexture.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsTexture.hpp (100%) rename include/NovelRT/Graphics/Vulkan/VulkanShaderProgram.h => graphics/include/NovelRT/Graphics/Vulkan/VulkanShaderProgram.hpp (100%) delete mode 100644 include/NovelRT/Graphics/Vulkan/Graphics.Vulkan.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f463821c..c8e61ba03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,6 +122,7 @@ endif() # add_subdirectory(thirdparty) add_subdirectory(resources) +add_subdirectory(graphics) add_subdirectory(src) if(NOVELRT_BUILD_SAMPLES) @@ -140,7 +141,7 @@ endif() # if(NOVELRT_INSTALL) install( - EXPORT NovelRT + EXPORT NovelRTConfig EXPORT_LINK_INTERFACE_LIBRARIES NAMESPACE NovelRT:: DESTINATION lib diff --git a/graphics/CMakeLists.txt b/graphics/CMakeLists.txt new file mode 100644 index 000000000..4cc03efe2 --- /dev/null +++ b/graphics/CMakeLists.txt @@ -0,0 +1,155 @@ +add_library(NovelRT-Graphics STATIC + GraphicsMemoryBlock.cpp + GraphicsMemoryBlockCollection.cpp + GraphicsPipeline.cpp + GraphicsPipelineInput.cpp + GraphicsPipelineInputElement.cpp + GraphicsPipelineResource.cpp + GraphicsPipelineSignature.cpp + GraphicsResourceManager.cpp + ShaderProgram.cpp + Vulkan/VulkanGraphicsAdapter.cpp + Vulkan/VulkanGraphicsAdapterSelector.cpp + Vulkan/VulkanGraphicsBuffer.cpp + Vulkan/VulkanGraphicsContext.cpp + Vulkan/VulkanGraphicsDevice.cpp + Vulkan/VulkanGraphicsFence.cpp + Vulkan/VulkanGraphicsMemoryAllocator.cpp + Vulkan/VulkanGraphicsMemoryBlock.cpp + Vulkan/VulkanGraphicsMemoryBlockCollection.cpp + Vulkan/VulkanGraphicsPipeline.cpp + Vulkan/VulkanGraphicsPipelineSignature.cpp + Vulkan/VulkanGraphicsPluginProvider.cpp + Vulkan/VulkanGraphicsProvider.cpp + Vulkan/VulkanGraphicsSurfaceContext.cpp + Vulkan/VulkanGraphicsTexture.cpp + Vulkan/VulkanShaderProgram.cpp +) + +target_sources(NovelRT-Graphics + PUBLIC + FILE_SET public_headers + TYPE HEADERS + BASE_DIRS include + FILES + include/NovelRT/Graphics/Graphics.hpp + include/NovelRT/Graphics/GraphicsAdapter.hpp + include/NovelRT/Graphics/GraphicsBuffer.hpp + include/NovelRT/Graphics/GraphicsBufferKind.hpp + include/NovelRT/Graphics/GraphicsContext.hpp + include/NovelRT/Graphics/GraphicsDevice.hpp + include/NovelRT/Graphics/GraphicsDeviceObject.hpp + include/NovelRT/Graphics/GraphicsFence.hpp + include/NovelRT/Graphics/GraphicsMemoryAllocator.hpp + include/NovelRT/Graphics/GraphicsMemoryAllocatorSettings.hpp + include/NovelRT/Graphics/GraphicsMemoryBlock.hpp + include/NovelRT/Graphics/GraphicsMemoryBlockCollection.hpp + include/NovelRT/Graphics/GraphicsMemoryBudget.hpp + include/NovelRT/Graphics/GraphicsMemoryRegion.hpp + include/NovelRT/Graphics/GraphicsMemoryRegionAllocationFlags.hpp + include/NovelRT/Graphics/GraphicsPipeline.hpp + include/NovelRT/Graphics/GraphicsPipelineBlendFactor.hpp + include/NovelRT/Graphics/GraphicsPipelineInput.hpp + include/NovelRT/Graphics/GraphicsPipelineInputElement.hpp + include/NovelRT/Graphics/GraphicsPipelineInputElementKind.hpp + include/NovelRT/Graphics/GraphicsPipelineResource.hpp + include/NovelRT/Graphics/GraphicsPipelineResourceKind.hpp + include/NovelRT/Graphics/GraphicsPipelineSignature.hpp + include/NovelRT/Graphics/GraphicsPrimitive.hpp + include/NovelRT/Graphics/GraphicsProvider.hpp + include/NovelRT/Graphics/GraphicsResource.hpp + include/NovelRT/Graphics/GraphicsResourceAccess.hpp + include/NovelRT/Graphics/GraphicsResourceManager.hpp + include/NovelRT/Graphics/GraphicsSurfaceContext.hpp + include/NovelRT/Graphics/GraphicsSurfaceKind.hpp + include/NovelRT/Graphics/GraphicsTexture.hpp + include/NovelRT/Graphics/GraphicsTextureAddressMode.hpp + include/NovelRT/Graphics/GraphicsTextureKind.hpp + include/NovelRT/Graphics/IGraphicsAdapterSelector.hpp + include/NovelRT/Graphics/IGraphicsMemoryRegionCollection.hpp + include/NovelRT/Graphics/IGraphicsSurface.hpp + include/NovelRT/Graphics/RGBAColour.hpp + include/NovelRT/Graphics/ShaderProgram.hpp + include/NovelRT/Graphics/ShaderProgramKind.hpp + include/NovelRT/Graphics/ShaderProgramVisibility.hpp + include/NovelRT/Graphics/TexelFormat.hpp + include/NovelRT/Graphics/D3D12/Graphics.D3D12.hpp + include/NovelRT/Graphics/D3D12/Utilities/Graphics.D3D12.Utilities.hpp + include/NovelRT/Graphics/D3D12/Utilities/PipelineBlendFactor.hpp + include/NovelRT/Graphics/Metal/Graphics.Metal.hpp + include/NovelRT/Graphics/Metal/Utilities/Graphics.Metal.Utilities.hpp + include/NovelRT/Graphics/Metal/Utilities/PipelineBlendFactor.hpp + include/NovelRT/Graphics/Vulkan/Graphics.Vulkan.hpp + include/NovelRT/Graphics/Vulkan/QueueFamilyIndices.hpp + include/NovelRT/Graphics/Vulkan/SwapChainSupportDetails.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapter.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapterSelector.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsBuffer.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsContext.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsDevice.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsFence.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryAllocator.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlock.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipeline.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipelineSignature.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsPluginProvider.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsPrimitive.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsProvider.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsSurfaceContext.hpp + include/NovelRT/Graphics/Vulkan/VulkanGraphicsTexture.hpp + include/NovelRT/Graphics/Vulkan/VulkanShaderProgram.hpp + include/NovelRT/Graphics/Vulkan/Utilities/BufferUsageKind.hpp + include/NovelRT/Graphics/Vulkan/Utilities/Graphics.Vulkan.Utilities.hpp + include/NovelRT/Graphics/Vulkan/Utilities/PipelineBlendFactor.hpp + include/NovelRT/Graphics/Vulkan/Utilities/Support.hpp + include/NovelRT/Graphics/Vulkan/Utilities/Texel.hpp + include/NovelRT/Graphics/Vulkan/Utilities/TextureAddressMode.hpp +) + +set_target_properties(NovelRT-Graphics + PROPERTIES + EXPORT_NAME Graphics + POSITION_INDEPENDENT_CODE ON +) + +target_compile_features(NovelRT-Graphics + PUBLIC + cxx_std_17 +) + +target_compile_options(NovelRT-Graphics + PRIVATE + $<$:-Wall> + $<$:-Wabi> + $<$:-Werror> + $<$:-Wextra> + $<$:-Wpedantic> + $<$:-pedantic-errors> + + $<$:-Wall> + $<$:-Werror> + $<$:-Wextra> + $<$:-Wpedantic> + $<$:-pedantic-errors> + + $<$:/W4> + $<$:/WX> + $<$:/permissive-> +) + +target_include_directories(NovelRT-Graphics PRIVATE "$") +target_link_libraries(NovelRT-Graphics + PUBLIC + spdlog + tbb + Vulkan::Vulkan + VulkanMemoryAllocator +) + +install( + TARGETS NovelRT-Graphics + EXPORT NovelRTConfig + LIBRARY DESTINATION lib + FILE_SET public_headers DESTINATION include +) \ No newline at end of file diff --git a/src/NovelRT/Graphics/GraphicsMemoryBlock.cpp b/graphics/GraphicsMemoryBlock.cpp similarity index 96% rename from src/NovelRT/Graphics/GraphicsMemoryBlock.cpp rename to graphics/GraphicsMemoryBlock.cpp index 06aed02e6..80ee3643e 100644 --- a/src/NovelRT/Graphics/GraphicsMemoryBlock.cpp +++ b/graphics/GraphicsMemoryBlock.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Graphics.h" +#include namespace NovelRT::Graphics { diff --git a/src/NovelRT/Graphics/GraphicsMemoryBlockCollection.cpp b/graphics/GraphicsMemoryBlockCollection.cpp similarity index 99% rename from src/NovelRT/Graphics/GraphicsMemoryBlockCollection.cpp rename to graphics/GraphicsMemoryBlockCollection.cpp index 29c11dc97..da040cc34 100644 --- a/src/NovelRT/Graphics/GraphicsMemoryBlockCollection.cpp +++ b/graphics/GraphicsMemoryBlockCollection.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Graphics.h" +#include namespace NovelRT::Graphics { diff --git a/src/NovelRT/Graphics/GraphicsPipeline.cpp b/graphics/GraphicsPipeline.cpp similarity index 97% rename from src/NovelRT/Graphics/GraphicsPipeline.cpp rename to graphics/GraphicsPipeline.cpp index 40cb043b1..22cc64a4b 100644 --- a/src/NovelRT/Graphics/GraphicsPipeline.cpp +++ b/graphics/GraphicsPipeline.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Graphics.h" +#include namespace NovelRT::Graphics { diff --git a/src/NovelRT/Graphics/GraphicsPipelineInput.cpp b/graphics/GraphicsPipelineInput.cpp similarity index 95% rename from src/NovelRT/Graphics/GraphicsPipelineInput.cpp rename to graphics/GraphicsPipelineInput.cpp index 2a143f1f8..89192ed79 100644 --- a/src/NovelRT/Graphics/GraphicsPipelineInput.cpp +++ b/graphics/GraphicsPipelineInput.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Graphics.h" +#include namespace NovelRT::Graphics { diff --git a/src/NovelRT/Graphics/GraphicsPipelineInputElement.cpp b/graphics/GraphicsPipelineInputElement.cpp similarity index 95% rename from src/NovelRT/Graphics/GraphicsPipelineInputElement.cpp rename to graphics/GraphicsPipelineInputElement.cpp index db1a4260a..d223547b2 100644 --- a/src/NovelRT/Graphics/GraphicsPipelineInputElement.cpp +++ b/graphics/GraphicsPipelineInputElement.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Graphics.h" +#include namespace NovelRT::Graphics { diff --git a/src/NovelRT/Graphics/GraphicsPipelineResource.cpp b/graphics/GraphicsPipelineResource.cpp similarity index 92% rename from src/NovelRT/Graphics/GraphicsPipelineResource.cpp rename to graphics/GraphicsPipelineResource.cpp index 64c00617c..418a78bc6 100644 --- a/src/NovelRT/Graphics/GraphicsPipelineResource.cpp +++ b/graphics/GraphicsPipelineResource.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Graphics.h" +#include namespace NovelRT::Graphics { diff --git a/src/NovelRT/Graphics/GraphicsPipelineSignature.cpp b/graphics/GraphicsPipelineSignature.cpp similarity index 97% rename from src/NovelRT/Graphics/GraphicsPipelineSignature.cpp rename to graphics/GraphicsPipelineSignature.cpp index 14a7b2a21..9fde9071e 100644 --- a/src/NovelRT/Graphics/GraphicsPipelineSignature.cpp +++ b/graphics/GraphicsPipelineSignature.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Graphics.h" +#include namespace NovelRT::Graphics { diff --git a/src/NovelRT/Graphics/GraphicsResourceManager.cpp b/graphics/GraphicsResourceManager.cpp similarity index 99% rename from src/NovelRT/Graphics/GraphicsResourceManager.cpp rename to graphics/GraphicsResourceManager.cpp index 4f0a12b25..a33db8d56 100644 --- a/src/NovelRT/Graphics/GraphicsResourceManager.cpp +++ b/graphics/GraphicsResourceManager.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Graphics.h" +#include namespace NovelRT::Graphics { diff --git a/src/NovelRT/Graphics/ShaderProgram.cpp b/graphics/ShaderProgram.cpp similarity index 92% rename from src/NovelRT/Graphics/ShaderProgram.cpp rename to graphics/ShaderProgram.cpp index dddf854f8..929a50986 100644 --- a/src/NovelRT/Graphics/ShaderProgram.cpp +++ b/graphics/ShaderProgram.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Graphics.h" +#include namespace NovelRT::Graphics { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapter.cpp b/graphics/Vulkan/VulkanGraphicsAdapter.cpp similarity index 97% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapter.cpp rename to graphics/Vulkan/VulkanGraphicsAdapter.cpp index b9fef3e43..a3f93afe5 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapter.cpp +++ b/graphics/Vulkan/VulkanGraphicsAdapter.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapterSelector.cpp b/graphics/Vulkan/VulkanGraphicsAdapterSelector.cpp similarity index 98% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapterSelector.cpp rename to graphics/Vulkan/VulkanGraphicsAdapterSelector.cpp index e9dc1cadc..c850927a2 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapterSelector.cpp +++ b/graphics/Vulkan/VulkanGraphicsAdapterSelector.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsBuffer.cpp b/graphics/Vulkan/VulkanGraphicsBuffer.cpp similarity index 99% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsBuffer.cpp rename to graphics/Vulkan/VulkanGraphicsBuffer.cpp index 922ac3f4b..77183eccf 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsBuffer.cpp +++ b/graphics/Vulkan/VulkanGraphicsBuffer.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsContext.cpp b/graphics/Vulkan/VulkanGraphicsContext.cpp similarity index 99% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsContext.cpp rename to graphics/Vulkan/VulkanGraphicsContext.cpp index 1b6294be4..441f09605 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsContext.cpp +++ b/graphics/Vulkan/VulkanGraphicsContext.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsDevice.cpp b/graphics/Vulkan/VulkanGraphicsDevice.cpp similarity index 99% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsDevice.cpp rename to graphics/Vulkan/VulkanGraphicsDevice.cpp index 145f7f96a..5eb615746 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsDevice.cpp +++ b/graphics/Vulkan/VulkanGraphicsDevice.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsFence.cpp b/graphics/Vulkan/VulkanGraphicsFence.cpp similarity index 98% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsFence.cpp rename to graphics/Vulkan/VulkanGraphicsFence.cpp index 9aa29849c..8a966d891 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsFence.cpp +++ b/graphics/Vulkan/VulkanGraphicsFence.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryAllocator.cpp b/graphics/Vulkan/VulkanGraphicsMemoryAllocator.cpp similarity index 99% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryAllocator.cpp rename to graphics/Vulkan/VulkanGraphicsMemoryAllocator.cpp index 06d5ab82c..3f28d7fb2 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryAllocator.cpp +++ b/graphics/Vulkan/VulkanGraphicsMemoryAllocator.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlock.cpp b/graphics/Vulkan/VulkanGraphicsMemoryBlock.cpp similarity index 97% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlock.cpp rename to graphics/Vulkan/VulkanGraphicsMemoryBlock.cpp index 3ed5bd0cf..9a3327db2 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlock.cpp +++ b/graphics/Vulkan/VulkanGraphicsMemoryBlock.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.cpp b/graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.cpp similarity index 95% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.cpp rename to graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.cpp index 6a2bf76c4..7798fc1e5 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.cpp +++ b/graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsPipeline.cpp b/graphics/Vulkan/VulkanGraphicsPipeline.cpp similarity index 99% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsPipeline.cpp rename to graphics/Vulkan/VulkanGraphicsPipeline.cpp index b0c6b5ab3..4181a4f9a 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsPipeline.cpp +++ b/graphics/Vulkan/VulkanGraphicsPipeline.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsPipelineSignature.cpp b/graphics/Vulkan/VulkanGraphicsPipelineSignature.cpp similarity index 99% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsPipelineSignature.cpp rename to graphics/Vulkan/VulkanGraphicsPipelineSignature.cpp index 21b3371cb..9ad436e31 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsPipelineSignature.cpp +++ b/graphics/Vulkan/VulkanGraphicsPipelineSignature.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsPluginProvider.cpp b/graphics/Vulkan/VulkanGraphicsPluginProvider.cpp similarity index 97% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsPluginProvider.cpp rename to graphics/Vulkan/VulkanGraphicsPluginProvider.cpp index 303e69b83..18765683b 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsPluginProvider.cpp +++ b/graphics/Vulkan/VulkanGraphicsPluginProvider.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsProvider.cpp b/graphics/Vulkan/VulkanGraphicsProvider.cpp similarity index 99% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsProvider.cpp rename to graphics/Vulkan/VulkanGraphicsProvider.cpp index d4e469859..09d29d346 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsProvider.cpp +++ b/graphics/Vulkan/VulkanGraphicsProvider.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include #include namespace NovelRT::Graphics::Vulkan diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsSurfaceContext.cpp b/graphics/Vulkan/VulkanGraphicsSurfaceContext.cpp similarity index 97% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsSurfaceContext.cpp rename to graphics/Vulkan/VulkanGraphicsSurfaceContext.cpp index d5302cf05..16b68b351 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsSurfaceContext.cpp +++ b/graphics/Vulkan/VulkanGraphicsSurfaceContext.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsTexture.cpp b/graphics/Vulkan/VulkanGraphicsTexture.cpp similarity index 99% rename from src/NovelRT/Graphics/Vulkan/VulkanGraphicsTexture.cpp rename to graphics/Vulkan/VulkanGraphicsTexture.cpp index aeb76d646..1ae04bdf4 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanGraphicsTexture.cpp +++ b/graphics/Vulkan/VulkanGraphicsTexture.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/src/NovelRT/Graphics/Vulkan/VulkanShaderProgram.cpp b/graphics/Vulkan/VulkanShaderProgram.cpp similarity index 97% rename from src/NovelRT/Graphics/Vulkan/VulkanShaderProgram.cpp rename to graphics/Vulkan/VulkanShaderProgram.cpp index 6b2cc2513..7946073f5 100644 --- a/src/NovelRT/Graphics/Vulkan/VulkanShaderProgram.cpp +++ b/graphics/Vulkan/VulkanShaderProgram.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include "NovelRT/Graphics/Vulkan/Graphics.Vulkan.h" +#include namespace NovelRT::Graphics::Vulkan { diff --git a/include/NovelRT/Graphics/D3D12/Graphics.D3D12.h b/graphics/include/NovelRT/Graphics/D3D12/Graphics.D3D12.hpp similarity index 71% rename from include/NovelRT/Graphics/D3D12/Graphics.D3D12.h rename to graphics/include/NovelRT/Graphics/D3D12/Graphics.D3D12.hpp index 99a2e9410..5aa33f7e4 100644 --- a/include/NovelRT/Graphics/D3D12/Graphics.D3D12.h +++ b/graphics/include/NovelRT/Graphics/D3D12/Graphics.D3D12.hpp @@ -5,9 +5,9 @@ #define NOVELRT_GRAPHICS_D3D12_H // Graphics.D3D12 dependencies -#include "../../Exceptions/Exceptions.h" -#include "../../LoggingService.h" -#include "../Graphics.h" +#include +#include +#include #include /** @@ -22,7 +22,7 @@ namespace NovelRT::Graphics::D3D12 // clang-format off -#include "NovelRT/Graphics/D3D12/Utilities/Graphics.D3D12.Utilities.h" +#include // clang-format on diff --git a/include/NovelRT/Graphics/D3D12/Utilities/Graphics.D3D12.Utilities.h b/graphics/include/NovelRT/Graphics/D3D12/Utilities/Graphics.D3D12.Utilities.hpp similarity index 87% rename from include/NovelRT/Graphics/D3D12/Utilities/Graphics.D3D12.Utilities.h rename to graphics/include/NovelRT/Graphics/D3D12/Utilities/Graphics.D3D12.Utilities.hpp index b4169d171..9ac8f725f 100644 --- a/include/NovelRT/Graphics/D3D12/Utilities/Graphics.D3D12.Utilities.h +++ b/graphics/include/NovelRT/Graphics/D3D12/Utilities/Graphics.D3D12.Utilities.hpp @@ -8,6 +8,6 @@ #error NovelRT does not support including types explicitly by default. Please include Graphics.D3D12.h instead for the Graphics::D3D12 namespace subset. #endif -#include "PipelineBlendFactor.h" +#include #endif // !NOVELRT_GRAPHICS_D3D12_UTILITIES_H diff --git a/include/NovelRT/Graphics/D3D12/Utilities/PipelineBlendFactor.h b/graphics/include/NovelRT/Graphics/D3D12/Utilities/PipelineBlendFactor.hpp similarity index 100% rename from include/NovelRT/Graphics/D3D12/Utilities/PipelineBlendFactor.h rename to graphics/include/NovelRT/Graphics/D3D12/Utilities/PipelineBlendFactor.hpp diff --git a/include/NovelRT/Graphics/Graphics.h b/graphics/include/NovelRT/Graphics/Graphics.hpp similarity index 53% rename from include/NovelRT/Graphics/Graphics.h rename to graphics/include/NovelRT/Graphics/Graphics.hpp index 89aaa99bf..3d46f713a 100644 --- a/include/NovelRT/Graphics/Graphics.h +++ b/graphics/include/NovelRT/Graphics/Graphics.hpp @@ -14,7 +14,7 @@ #include "NovelRT/Utilities/Lazy.h" #include "NovelRT/Utilities/Memory.h" #include "NovelRT/Utilities/Misc.h" -#include "RGBAColour.h" +#include #include #include #include @@ -74,46 +74,46 @@ namespace NovelRT::Graphics // Graphics types // clang-format off - -#include "ShaderProgramKind.h" -#include "GraphicsAdapter.h" -#include "GraphicsDeviceObject.h" -#include "GraphicsContext.h" -#include "GraphicsFence.h" -#include "GraphicsMemoryAllocatorSettings.h" -#include "GraphicsMemoryRegion.h" -#include "IGraphicsMemoryRegionCollection.h" -#include "GraphicsMemoryRegionAllocationFlags.h" -#include "TexelFormat.h" -#include "GraphicsMemoryAllocator.h" -#include "GraphicsMemoryBlockCollection.h" -#include "GraphicsMemoryBudget.h" -#include "GraphicsMemoryBlock.h" -#include "GraphicsResourceAccess.h" -#include "GraphicsSurfaceKind.h" -#include "GraphicsTextureKind.h" -#include "IGraphicsSurface.h" -#include "GraphicsSurfaceContext.h" -#include "GraphicsDevice.h" -#include "GraphicsResource.h" -#include "GraphicsBufferKind.h" -#include "GraphicsBuffer.h" -#include "GraphicsTextureAddressMode.h" -#include "GraphicsTexture.h" -#include "IGraphicsAdapterSelector.h" -#include "ShaderProgram.h" -#include "GraphicsPipelineBlendFactor.h" -#include "GraphicsPipeline.h" -#include "GraphicsPipelineSignature.h" -#include "GraphicsPrimitive.h" -#include "GraphicsProvider.h" -#include "GraphicsPipelineInput.h" -#include "GraphicsPipelineInputElement.h" -#include "GraphicsPipelineInputElementKind.h" -#include "GraphicsPipelineResource.h" -#include "GraphicsPipelineResourceKind.h" -#include "ShaderProgramVisibility.h" -#include "GraphicsResourceManager.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // clang-format on diff --git a/include/NovelRT/Graphics/GraphicsAdapter.h b/graphics/include/NovelRT/Graphics/GraphicsAdapter.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsAdapter.h rename to graphics/include/NovelRT/Graphics/GraphicsAdapter.hpp diff --git a/include/NovelRT/Graphics/GraphicsBuffer.h b/graphics/include/NovelRT/Graphics/GraphicsBuffer.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsBuffer.h rename to graphics/include/NovelRT/Graphics/GraphicsBuffer.hpp diff --git a/include/NovelRT/Graphics/GraphicsBufferKind.h b/graphics/include/NovelRT/Graphics/GraphicsBufferKind.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsBufferKind.h rename to graphics/include/NovelRT/Graphics/GraphicsBufferKind.hpp diff --git a/include/NovelRT/Graphics/GraphicsContext.h b/graphics/include/NovelRT/Graphics/GraphicsContext.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsContext.h rename to graphics/include/NovelRT/Graphics/GraphicsContext.hpp diff --git a/include/NovelRT/Graphics/GraphicsDevice.h b/graphics/include/NovelRT/Graphics/GraphicsDevice.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsDevice.h rename to graphics/include/NovelRT/Graphics/GraphicsDevice.hpp diff --git a/include/NovelRT/Graphics/GraphicsDeviceObject.h b/graphics/include/NovelRT/Graphics/GraphicsDeviceObject.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsDeviceObject.h rename to graphics/include/NovelRT/Graphics/GraphicsDeviceObject.hpp diff --git a/include/NovelRT/Graphics/GraphicsFence.h b/graphics/include/NovelRT/Graphics/GraphicsFence.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsFence.h rename to graphics/include/NovelRT/Graphics/GraphicsFence.hpp diff --git a/include/NovelRT/Graphics/GraphicsMemoryAllocator.h b/graphics/include/NovelRT/Graphics/GraphicsMemoryAllocator.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsMemoryAllocator.h rename to graphics/include/NovelRT/Graphics/GraphicsMemoryAllocator.hpp diff --git a/include/NovelRT/Graphics/GraphicsMemoryAllocatorSettings.h b/graphics/include/NovelRT/Graphics/GraphicsMemoryAllocatorSettings.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsMemoryAllocatorSettings.h rename to graphics/include/NovelRT/Graphics/GraphicsMemoryAllocatorSettings.hpp diff --git a/include/NovelRT/Graphics/GraphicsMemoryBlock.h b/graphics/include/NovelRT/Graphics/GraphicsMemoryBlock.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsMemoryBlock.h rename to graphics/include/NovelRT/Graphics/GraphicsMemoryBlock.hpp diff --git a/include/NovelRT/Graphics/GraphicsMemoryBlockCollection.h b/graphics/include/NovelRT/Graphics/GraphicsMemoryBlockCollection.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsMemoryBlockCollection.h rename to graphics/include/NovelRT/Graphics/GraphicsMemoryBlockCollection.hpp diff --git a/include/NovelRT/Graphics/GraphicsMemoryBudget.h b/graphics/include/NovelRT/Graphics/GraphicsMemoryBudget.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsMemoryBudget.h rename to graphics/include/NovelRT/Graphics/GraphicsMemoryBudget.hpp diff --git a/include/NovelRT/Graphics/GraphicsMemoryRegion.h b/graphics/include/NovelRT/Graphics/GraphicsMemoryRegion.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsMemoryRegion.h rename to graphics/include/NovelRT/Graphics/GraphicsMemoryRegion.hpp diff --git a/include/NovelRT/Graphics/GraphicsMemoryRegionAllocationFlags.h b/graphics/include/NovelRT/Graphics/GraphicsMemoryRegionAllocationFlags.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsMemoryRegionAllocationFlags.h rename to graphics/include/NovelRT/Graphics/GraphicsMemoryRegionAllocationFlags.hpp diff --git a/include/NovelRT/Graphics/GraphicsPipeline.h b/graphics/include/NovelRT/Graphics/GraphicsPipeline.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsPipeline.h rename to graphics/include/NovelRT/Graphics/GraphicsPipeline.hpp diff --git a/include/NovelRT/Graphics/GraphicsPipelineBlendFactor.h b/graphics/include/NovelRT/Graphics/GraphicsPipelineBlendFactor.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsPipelineBlendFactor.h rename to graphics/include/NovelRT/Graphics/GraphicsPipelineBlendFactor.hpp diff --git a/include/NovelRT/Graphics/GraphicsPipelineInput.h b/graphics/include/NovelRT/Graphics/GraphicsPipelineInput.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsPipelineInput.h rename to graphics/include/NovelRT/Graphics/GraphicsPipelineInput.hpp diff --git a/include/NovelRT/Graphics/GraphicsPipelineInputElement.h b/graphics/include/NovelRT/Graphics/GraphicsPipelineInputElement.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsPipelineInputElement.h rename to graphics/include/NovelRT/Graphics/GraphicsPipelineInputElement.hpp diff --git a/include/NovelRT/Graphics/GraphicsPipelineInputElementKind.h b/graphics/include/NovelRT/Graphics/GraphicsPipelineInputElementKind.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsPipelineInputElementKind.h rename to graphics/include/NovelRT/Graphics/GraphicsPipelineInputElementKind.hpp diff --git a/include/NovelRT/Graphics/GraphicsPipelineResource.h b/graphics/include/NovelRT/Graphics/GraphicsPipelineResource.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsPipelineResource.h rename to graphics/include/NovelRT/Graphics/GraphicsPipelineResource.hpp diff --git a/include/NovelRT/Graphics/GraphicsPipelineResourceKind.h b/graphics/include/NovelRT/Graphics/GraphicsPipelineResourceKind.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsPipelineResourceKind.h rename to graphics/include/NovelRT/Graphics/GraphicsPipelineResourceKind.hpp diff --git a/include/NovelRT/Graphics/GraphicsPipelineSignature.h b/graphics/include/NovelRT/Graphics/GraphicsPipelineSignature.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsPipelineSignature.h rename to graphics/include/NovelRT/Graphics/GraphicsPipelineSignature.hpp diff --git a/include/NovelRT/Graphics/GraphicsPrimitive.h b/graphics/include/NovelRT/Graphics/GraphicsPrimitive.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsPrimitive.h rename to graphics/include/NovelRT/Graphics/GraphicsPrimitive.hpp diff --git a/include/NovelRT/Graphics/GraphicsProvider.h b/graphics/include/NovelRT/Graphics/GraphicsProvider.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsProvider.h rename to graphics/include/NovelRT/Graphics/GraphicsProvider.hpp diff --git a/include/NovelRT/Graphics/GraphicsResource.h b/graphics/include/NovelRT/Graphics/GraphicsResource.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsResource.h rename to graphics/include/NovelRT/Graphics/GraphicsResource.hpp diff --git a/include/NovelRT/Graphics/GraphicsResourceAccess.h b/graphics/include/NovelRT/Graphics/GraphicsResourceAccess.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsResourceAccess.h rename to graphics/include/NovelRT/Graphics/GraphicsResourceAccess.hpp diff --git a/include/NovelRT/Graphics/GraphicsResourceManager.h b/graphics/include/NovelRT/Graphics/GraphicsResourceManager.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsResourceManager.h rename to graphics/include/NovelRT/Graphics/GraphicsResourceManager.hpp diff --git a/include/NovelRT/Graphics/GraphicsSurfaceContext.h b/graphics/include/NovelRT/Graphics/GraphicsSurfaceContext.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsSurfaceContext.h rename to graphics/include/NovelRT/Graphics/GraphicsSurfaceContext.hpp diff --git a/include/NovelRT/Graphics/GraphicsSurfaceKind.h b/graphics/include/NovelRT/Graphics/GraphicsSurfaceKind.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsSurfaceKind.h rename to graphics/include/NovelRT/Graphics/GraphicsSurfaceKind.hpp diff --git a/include/NovelRT/Graphics/GraphicsTexture.h b/graphics/include/NovelRT/Graphics/GraphicsTexture.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsTexture.h rename to graphics/include/NovelRT/Graphics/GraphicsTexture.hpp diff --git a/include/NovelRT/Graphics/GraphicsTextureAddressMode.h b/graphics/include/NovelRT/Graphics/GraphicsTextureAddressMode.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsTextureAddressMode.h rename to graphics/include/NovelRT/Graphics/GraphicsTextureAddressMode.hpp diff --git a/include/NovelRT/Graphics/GraphicsTextureKind.h b/graphics/include/NovelRT/Graphics/GraphicsTextureKind.hpp similarity index 100% rename from include/NovelRT/Graphics/GraphicsTextureKind.h rename to graphics/include/NovelRT/Graphics/GraphicsTextureKind.hpp diff --git a/include/NovelRT/Graphics/IGraphicsAdapterSelector.h b/graphics/include/NovelRT/Graphics/IGraphicsAdapterSelector.hpp similarity index 100% rename from include/NovelRT/Graphics/IGraphicsAdapterSelector.h rename to graphics/include/NovelRT/Graphics/IGraphicsAdapterSelector.hpp diff --git a/include/NovelRT/Graphics/IGraphicsMemoryRegionCollection.h b/graphics/include/NovelRT/Graphics/IGraphicsMemoryRegionCollection.hpp similarity index 100% rename from include/NovelRT/Graphics/IGraphicsMemoryRegionCollection.h rename to graphics/include/NovelRT/Graphics/IGraphicsMemoryRegionCollection.hpp diff --git a/include/NovelRT/Graphics/IGraphicsSurface.h b/graphics/include/NovelRT/Graphics/IGraphicsSurface.hpp similarity index 100% rename from include/NovelRT/Graphics/IGraphicsSurface.h rename to graphics/include/NovelRT/Graphics/IGraphicsSurface.hpp diff --git a/include/NovelRT/Graphics/Metal/Graphics.Metal.h b/graphics/include/NovelRT/Graphics/Metal/Graphics.Metal.hpp similarity index 100% rename from include/NovelRT/Graphics/Metal/Graphics.Metal.h rename to graphics/include/NovelRT/Graphics/Metal/Graphics.Metal.hpp diff --git a/include/NovelRT/Graphics/Metal/Utilities/Graphics.Metal.Utilities.h b/graphics/include/NovelRT/Graphics/Metal/Utilities/Graphics.Metal.Utilities.hpp similarity index 100% rename from include/NovelRT/Graphics/Metal/Utilities/Graphics.Metal.Utilities.h rename to graphics/include/NovelRT/Graphics/Metal/Utilities/Graphics.Metal.Utilities.hpp diff --git a/include/NovelRT/Graphics/Metal/Utilities/PipelineBlendFactor.h b/graphics/include/NovelRT/Graphics/Metal/Utilities/PipelineBlendFactor.hpp similarity index 100% rename from include/NovelRT/Graphics/Metal/Utilities/PipelineBlendFactor.h rename to graphics/include/NovelRT/Graphics/Metal/Utilities/PipelineBlendFactor.hpp diff --git a/include/NovelRT/Graphics/RGBAColour.h b/graphics/include/NovelRT/Graphics/RGBAColour.hpp similarity index 100% rename from include/NovelRT/Graphics/RGBAColour.h rename to graphics/include/NovelRT/Graphics/RGBAColour.hpp diff --git a/include/NovelRT/Graphics/ShaderProgram.h b/graphics/include/NovelRT/Graphics/ShaderProgram.hpp similarity index 100% rename from include/NovelRT/Graphics/ShaderProgram.h rename to graphics/include/NovelRT/Graphics/ShaderProgram.hpp diff --git a/include/NovelRT/Graphics/ShaderProgramKind.h b/graphics/include/NovelRT/Graphics/ShaderProgramKind.hpp similarity index 100% rename from include/NovelRT/Graphics/ShaderProgramKind.h rename to graphics/include/NovelRT/Graphics/ShaderProgramKind.hpp diff --git a/include/NovelRT/Graphics/ShaderProgramVisibility.h b/graphics/include/NovelRT/Graphics/ShaderProgramVisibility.hpp similarity index 100% rename from include/NovelRT/Graphics/ShaderProgramVisibility.h rename to graphics/include/NovelRT/Graphics/ShaderProgramVisibility.hpp diff --git a/include/NovelRT/Graphics/TexelFormat.h b/graphics/include/NovelRT/Graphics/TexelFormat.hpp similarity index 100% rename from include/NovelRT/Graphics/TexelFormat.h rename to graphics/include/NovelRT/Graphics/TexelFormat.hpp diff --git a/graphics/include/NovelRT/Graphics/Vulkan/Graphics.Vulkan.hpp b/graphics/include/NovelRT/Graphics/Vulkan/Graphics.Vulkan.hpp new file mode 100644 index 000000000..255c7b5d6 --- /dev/null +++ b/graphics/include/NovelRT/Graphics/Vulkan/Graphics.Vulkan.hpp @@ -0,0 +1,83 @@ +// Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root +// for more information. + +#ifndef NOVELRT_GRAPHICS_VULKAN_H +#define NOVELRT_GRAPHICS_VULKAN_H + +// Graphics.Vulkan dependencies +// clang-format off + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// clang-format on + +/** + * @brief The default Vulkan implementation for the Graphics plugin API. + */ +namespace NovelRT::Graphics::Vulkan +{ + struct QueueFamilyIndices; + struct SwapChainSupportDetails; + class VulkanGraphicsDevice; + class VulkanGraphicsPipeline; + class VulkanShaderProgram; + class VulkanGraphicsPipeline; + class VulkanGraphicsPipelineSignature; + class VulkanGraphicsContext; + class VulkanGraphicsFence; + class VulkanGraphicsBuffer; + class VulkanGraphicsTexture; + class VulkanGraphicsPrimitive; + class VulkanGraphicsProvider; + class VulkanGraphicsMemoryAllocator; + class VulkanGraphicsMemoryBlockCollection; + class VulkanGraphicsMemoryBlock; + class VulkanGraphicsAdapter; + class VulkanGraphicsAdapterSelector; + class VulkanGraphicsSurfaceContext; + class VulkanGraphicsPluginProvider; +} + +// Graphics.Vulkan types + +// clang-format off + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// clang-format on + +#endif // NOVELRT_GRAPHICS_VULKAN_H diff --git a/include/NovelRT/Graphics/Vulkan/QueueFamilyIndices.h b/graphics/include/NovelRT/Graphics/Vulkan/QueueFamilyIndices.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/QueueFamilyIndices.h rename to graphics/include/NovelRT/Graphics/Vulkan/QueueFamilyIndices.hpp diff --git a/include/NovelRT/Graphics/Vulkan/SwapChainSupportDetails.h b/graphics/include/NovelRT/Graphics/Vulkan/SwapChainSupportDetails.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/SwapChainSupportDetails.h rename to graphics/include/NovelRT/Graphics/Vulkan/SwapChainSupportDetails.hpp diff --git a/include/NovelRT/Graphics/Vulkan/Utilities/BufferUsageKind.h b/graphics/include/NovelRT/Graphics/Vulkan/Utilities/BufferUsageKind.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/Utilities/BufferUsageKind.h rename to graphics/include/NovelRT/Graphics/Vulkan/Utilities/BufferUsageKind.hpp diff --git a/include/NovelRT/Graphics/Vulkan/Utilities/Graphics.Vulkan.Utilities.h b/graphics/include/NovelRT/Graphics/Vulkan/Utilities/Graphics.Vulkan.Utilities.hpp similarity index 60% rename from include/NovelRT/Graphics/Vulkan/Utilities/Graphics.Vulkan.Utilities.h rename to graphics/include/NovelRT/Graphics/Vulkan/Utilities/Graphics.Vulkan.Utilities.hpp index a467f7678..6e37dfe97 100644 --- a/include/NovelRT/Graphics/Vulkan/Utilities/Graphics.Vulkan.Utilities.h +++ b/graphics/include/NovelRT/Graphics/Vulkan/Utilities/Graphics.Vulkan.Utilities.hpp @@ -8,10 +8,10 @@ #error NovelRT does not support including types explicitly by default. Please include Graphics.Vulkan.h instead for the Graphics::Vulkan namespace subset. #endif -#include "BufferUsageKind.h" -#include "PipelineBlendFactor.h" -#include "Support.h" -#include "Texel.h" -#include "TextureAddressMode.h" +#include +#include +#include +#include +#include #endif // !NOVELRT_GRAPHICS_VULKAN_UTILITIES_H diff --git a/include/NovelRT/Graphics/Vulkan/Utilities/PipelineBlendFactor.h b/graphics/include/NovelRT/Graphics/Vulkan/Utilities/PipelineBlendFactor.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/Utilities/PipelineBlendFactor.h rename to graphics/include/NovelRT/Graphics/Vulkan/Utilities/PipelineBlendFactor.hpp diff --git a/include/NovelRT/Graphics/Vulkan/Utilities/Support.h b/graphics/include/NovelRT/Graphics/Vulkan/Utilities/Support.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/Utilities/Support.h rename to graphics/include/NovelRT/Graphics/Vulkan/Utilities/Support.hpp diff --git a/include/NovelRT/Graphics/Vulkan/Utilities/Texel.h b/graphics/include/NovelRT/Graphics/Vulkan/Utilities/Texel.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/Utilities/Texel.h rename to graphics/include/NovelRT/Graphics/Vulkan/Utilities/Texel.hpp diff --git a/include/NovelRT/Graphics/Vulkan/Utilities/TextureAddressMode.h b/graphics/include/NovelRT/Graphics/Vulkan/Utilities/TextureAddressMode.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/Utilities/TextureAddressMode.h rename to graphics/include/NovelRT/Graphics/Vulkan/Utilities/TextureAddressMode.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapter.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapter.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapter.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapter.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapterSelector.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapterSelector.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapterSelector.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsAdapterSelector.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsBuffer.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsBuffer.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsBuffer.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsBuffer.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsContext.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsContext.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsContext.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsContext.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsDevice.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsDevice.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsDevice.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsDevice.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsFence.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsFence.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsFence.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsFence.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryAllocator.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryAllocator.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryAllocator.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryAllocator.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlock.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlock.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlock.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlock.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipeline.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipeline.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipeline.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipeline.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipelineSignature.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipelineSignature.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipelineSignature.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPipelineSignature.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPluginProvider.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPluginProvider.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsPluginProvider.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPluginProvider.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPrimitive.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPrimitive.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsPrimitive.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsPrimitive.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsProvider.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsProvider.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsProvider.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsProvider.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsSurfaceContext.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsSurfaceContext.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsSurfaceContext.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsSurfaceContext.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanGraphicsTexture.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsTexture.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanGraphicsTexture.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanGraphicsTexture.hpp diff --git a/include/NovelRT/Graphics/Vulkan/VulkanShaderProgram.h b/graphics/include/NovelRT/Graphics/Vulkan/VulkanShaderProgram.hpp similarity index 100% rename from include/NovelRT/Graphics/Vulkan/VulkanShaderProgram.h rename to graphics/include/NovelRT/Graphics/Vulkan/VulkanShaderProgram.hpp diff --git a/include/NovelRT/Ecs/Graphics/Ecs.Graphics.h b/include/NovelRT/Ecs/Graphics/Ecs.Graphics.h index 5d89d6043..593560a94 100644 --- a/include/NovelRT/Ecs/Graphics/Ecs.Graphics.h +++ b/include/NovelRT/Ecs/Graphics/Ecs.Graphics.h @@ -9,7 +9,7 @@ #endif // Ecs.Graphics Dependencies -#include "NovelRT/Graphics/RGBAColour.h" +#include namespace NovelRT::Ecs::Graphics { diff --git a/include/NovelRT/Graphics/Vulkan/Graphics.Vulkan.h b/include/NovelRT/Graphics/Vulkan/Graphics.Vulkan.h deleted file mode 100644 index 34b0a3650..000000000 --- a/include/NovelRT/Graphics/Vulkan/Graphics.Vulkan.h +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root -// for more information. - -#ifndef NOVELRT_GRAPHICS_VULKAN_H -#define NOVELRT_GRAPHICS_VULKAN_H - -// Graphics.Vulkan dependencies - -// clang-format off -#include "../../EngineConfig.h" -#include "../../Exceptions/Exceptions.h" -#include "../../LoggingService.h" -#include "../../PluginManagement/PluginManagement.h" -#include "../../Utilities/Lazy.h" -#include "../../Utilities/Memory.h" -#include "../../Utilities/Misc.h" -#include "../Graphics.h" -#include -#include -#include -#include -#include -#include -#include -// clang-format on - -/** - * @brief The default Vulkan implementation for the Graphics plugin API. - */ -namespace NovelRT::Graphics::Vulkan -{ - struct QueueFamilyIndices; - struct SwapChainSupportDetails; - class VulkanGraphicsDevice; - class VulkanGraphicsPipeline; - class VulkanShaderProgram; - class VulkanGraphicsPipeline; - class VulkanGraphicsPipelineSignature; - class VulkanGraphicsContext; - class VulkanGraphicsFence; - class VulkanGraphicsBuffer; - class VulkanGraphicsTexture; - class VulkanGraphicsPrimitive; - class VulkanGraphicsProvider; - class VulkanGraphicsMemoryAllocator; - class VulkanGraphicsMemoryBlockCollection; - class VulkanGraphicsMemoryBlock; - class VulkanGraphicsAdapter; - class VulkanGraphicsAdapterSelector; - class VulkanGraphicsSurfaceContext; - class VulkanGraphicsPluginProvider; -} - -// Graphics.Vulkan types - -// clang-format off - -#include "QueueFamilyIndices.h" -#include "SwapChainSupportDetails.h" -#include "NovelRT/Graphics/Vulkan/Utilities/Graphics.Vulkan.Utilities.h" -#include "VulkanGraphicsAdapter.h" -#include "VulkanGraphicsSurfaceContext.h" -#include "VulkanGraphicsAdapterSelector.h" -#include "VulkanGraphicsFence.h" -#include "VulkanGraphicsMemoryAllocator.h" -#include "VulkanGraphicsDevice.h" -#include "VulkanGraphicsMemoryBlock.h" -#include "VulkanGraphicsMemoryBlockCollection.h" -#include "VulkanGraphicsContext.h" -#include "VulkanGraphicsBuffer.h" -#include "VulkanShaderProgram.h" -#include "VulkanGraphicsPipeline.h" -#include "VulkanGraphicsPipelineSignature.h" -#include "VulkanGraphicsPrimitive.h" -#include "VulkanGraphicsProvider.h" -#include "VulkanShaderProgram.h" -#include "VulkanGraphicsTexture.h" -#include "VulkanGraphicsPluginProvider.h" - -// clang-format on - -#endif // NOVELRT_GRAPHICS_VULKAN_H diff --git a/include/NovelRT/NovelRT.h b/include/NovelRT/NovelRT.h index f73ace5e3..8b0e91a80 100644 --- a/include/NovelRT/NovelRT.h +++ b/include/NovelRT/NovelRT.h @@ -86,7 +86,7 @@ #include #include - #include + #include //Maths types #include @@ -107,14 +107,13 @@ // Exception types #include - // Experimental types - #include - #include + #include + #include #ifdef WIN32 - #include + #include #endif #ifdef TARGET_OS_MAC - #include + #include #endif #include #include diff --git a/include/NovelRT/PluginManagement/PluginManagement.h b/include/NovelRT/PluginManagement/PluginManagement.h index 76607b45d..f3d4b8a19 100644 --- a/include/NovelRT/PluginManagement/PluginManagement.h +++ b/include/NovelRT/PluginManagement/PluginManagement.h @@ -5,7 +5,7 @@ #define NOVELRT_PLUGINMANAGEMENT_H // PluginManagement Dependencies -#include "../Graphics/Graphics.h" +#include #include "../Input/Input.h" #include "../ResourceManagement/ResourceManagement.h" #include "../Windowing/Windowing.h" diff --git a/include/NovelRT/Windowing/Windowing.h b/include/NovelRT/Windowing/Windowing.h index e7a046791..0c2e246db 100644 --- a/include/NovelRT/Windowing/Windowing.h +++ b/include/NovelRT/Windowing/Windowing.h @@ -13,7 +13,7 @@ namespace NovelRT::Windowing } // Windowing dependencies -#include "NovelRT/Graphics/Graphics.h" +#include #include "NovelRT/Maths/Maths.h" #include "WindowMode.h" diff --git a/src/NovelRT/CMakeLists.txt b/src/NovelRT/CMakeLists.txt index 08b97badb..6a063dc22 100644 --- a/src/NovelRT/CMakeLists.txt +++ b/src/NovelRT/CMakeLists.txt @@ -21,32 +21,6 @@ set(CORE_SOURCES Ecs/Input/InputSystem.cpp Ecs/Narrative/NarrativePlayerSystem.cpp - Graphics/GraphicsMemoryBlock.cpp - Graphics/GraphicsMemoryBlockCollection.cpp - Graphics/GraphicsPipeline.cpp - Graphics/GraphicsPipelineInput.cpp - Graphics/GraphicsPipelineInputElement.cpp - Graphics/GraphicsPipelineResource.cpp - Graphics/GraphicsPipelineSignature.cpp - Graphics/GraphicsResourceManager.cpp - Graphics/ShaderProgram.cpp - Graphics/Vulkan/VulkanGraphicsAdapter.cpp - Graphics/Vulkan/VulkanGraphicsAdapterSelector.cpp - Graphics/Vulkan/VulkanGraphicsBuffer.cpp - Graphics/Vulkan/VulkanGraphicsContext.cpp - Graphics/Vulkan/VulkanGraphicsDevice.cpp - Graphics/Vulkan/VulkanGraphicsFence.cpp - Graphics/Vulkan/VulkanGraphicsMemoryAllocator.cpp - Graphics/Vulkan/VulkanGraphicsMemoryBlock.cpp - Graphics/Vulkan/VulkanGraphicsMemoryBlockCollection.cpp - Graphics/Vulkan/VulkanGraphicsPipeline.cpp - Graphics/Vulkan/VulkanGraphicsPipelineSignature.cpp - Graphics/Vulkan/VulkanGraphicsPluginProvider.cpp - Graphics/Vulkan/VulkanGraphicsProvider.cpp - Graphics/Vulkan/VulkanGraphicsSurfaceContext.cpp - Graphics/Vulkan/VulkanGraphicsTexture.cpp - Graphics/Vulkan/VulkanShaderProgram.cpp - Input/Glfw/GlfwInputDevice.cpp Input/Glfw/GlfwInputPluginProvider.cpp Input/NovelKey.cpp @@ -98,7 +72,6 @@ target_compile_definitions(Engine PUBLIC ${NOVELRT_TARGET_COMPILE_DEFS}) target_link_libraries(Engine PUBLIC runtime - Vulkan::Vulkan tbb OpenAL sndfile @@ -112,13 +85,13 @@ target_link_libraries(Engine FLAC opus ogg - VulkanMemoryAllocator + NovelRT-Graphics ) if(NOVELRT_INSTALL) install( TARGETS Engine - EXPORT NovelRT + EXPORT NovelRTConfig LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin diff --git a/src/NovelRT/PluginManagement/TemporaryFnPtrs.cpp b/src/NovelRT/PluginManagement/TemporaryFnPtrs.cpp index e6d269f13..64802f1ad 100644 --- a/src/NovelRT/PluginManagement/TemporaryFnPtrs.cpp +++ b/src/NovelRT/PluginManagement/TemporaryFnPtrs.cpp @@ -1,7 +1,7 @@ // Copyright © Matt Jones and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root // for more information. -#include +#include #include #include #include From af947c804772b661568061f653a6f0ea41b444f3 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Sun, 2 Jul 2023 00:54:02 +0100 Subject: [PATCH 2/3] clang format patch. --- include/NovelRT/PluginManagement/PluginManagement.h | 2 +- include/NovelRT/Windowing/Windowing.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/NovelRT/PluginManagement/PluginManagement.h b/include/NovelRT/PluginManagement/PluginManagement.h index f3d4b8a19..1362b2839 100644 --- a/include/NovelRT/PluginManagement/PluginManagement.h +++ b/include/NovelRT/PluginManagement/PluginManagement.h @@ -5,10 +5,10 @@ #define NOVELRT_PLUGINMANAGEMENT_H // PluginManagement Dependencies -#include #include "../Input/Input.h" #include "../ResourceManagement/ResourceManagement.h" #include "../Windowing/Windowing.h" +#include /** * @brief The NovelRT engine plugin system for loading modules such as Vulkan, GLFW3, OpenAL, and more. diff --git a/include/NovelRT/Windowing/Windowing.h b/include/NovelRT/Windowing/Windowing.h index 0c2e246db..ebeca88f7 100644 --- a/include/NovelRT/Windowing/Windowing.h +++ b/include/NovelRT/Windowing/Windowing.h @@ -13,9 +13,9 @@ namespace NovelRT::Windowing } // Windowing dependencies -#include #include "NovelRT/Maths/Maths.h" #include "WindowMode.h" +#include // Windowing types #include "IWindowingDevice.h" From 648ec5db2c9a1a480c845d9d66a9cfe2d0579112 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Sun, 2 Jul 2023 01:08:56 +0100 Subject: [PATCH 3/3] Fix clang extension issue. --- src/NovelRT.Interop/Graphics/NrtGraphicsProvider.cpp | 2 +- thirdparty/VulkanMemoryAllocator/CMakeLists.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/NovelRT.Interop/Graphics/NrtGraphicsProvider.cpp b/src/NovelRT.Interop/Graphics/NrtGraphicsProvider.cpp index f76c204e1..1ae8c7245 100644 --- a/src/NovelRT.Interop/Graphics/NrtGraphicsProvider.cpp +++ b/src/NovelRT.Interop/Graphics/NrtGraphicsProvider.cpp @@ -4,7 +4,7 @@ #include "../LifetimeExtender.h" #include #include -#include +#include using namespace NovelRT::Graphics; using namespace NovelRT::Interop; diff --git a/thirdparty/VulkanMemoryAllocator/CMakeLists.txt b/thirdparty/VulkanMemoryAllocator/CMakeLists.txt index c9f0c4bfd..89bb5bc4a 100644 --- a/thirdparty/VulkanMemoryAllocator/CMakeLists.txt +++ b/thirdparty/VulkanMemoryAllocator/CMakeLists.txt @@ -6,3 +6,9 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) set(BUILD_SHARED_LIBS OFF) FetchContent_MakeAvailable(VulkanMemoryAllocator) + +target_compile_options(VulkanMemoryAllocator + PUBLIC + $<$:-Wno-nullability-extension> + $<$:-Wno-nullability-extension> +)