/*
Crafter®.Graphics
Copyright (C) 2026 Catcrafts®
catcrafts.net
*/

// Backend-portable type aliases. NOT an abstraction layer — these are pure
// `using` declarations that resolve to the backend's native types per the
// active CRAFTER_GRAPHICS_WINDOW_* define.

module;
#ifndef CRAFTER_GRAPHICS_WINDOW_DOM
#include "vulkan/vulkan.h"
#endif
export module Crafter.Graphics:GraphicsTypes;

#ifndef CRAFTER_GRAPHICS_WINDOW_DOM
import :VulkanBuffer;
import :DescriptorHeapVulkan;
import :ComputeShader;

export namespace Crafter {
    using GraphicsCommandBuffer = VkCommandBuffer;
    using GraphicsDescriptorHeap = DescriptorHeapVulkan;
    using GraphicsComputeShader = ComputeShader;
    template<class T, bool Mapped>
    using GraphicsBuffer = VulkanBuffer<T, Mapped>;
}
#else
import :WebGPU;
import :WebGPUBuffer;
import :DescriptorHeapWebGPU;
import :WebGPUComputeShader;

export namespace Crafter {
    using GraphicsCommandBuffer = WebGPUCommandEncoderRef;
    using GraphicsDescriptorHeap = DescriptorHeapWebGPU;
    using GraphicsComputeShader = WebGPUComputeShader;
    template<class T, bool Mapped>
    using GraphicsBuffer = WebGPUBuffer<T, Mapped>;
}
#endif
