Crafter.Build/interfaces/Crafter.Build-Shader.cppm

37 lines
920 B
Text
Raw Normal View History

//SPDX-License-Identifier: LGPL-3.0-only
//SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
2025-04-24 19:21:09 +02:00
module;
#include "Crafter.Build-Api.h"
2025-04-24 19:21:09 +02:00
export module Crafter.Build:Shader;
2025-10-31 16:50:47 +01:00
import std;
2025-04-24 19:21:09 +02:00
namespace fs = std::filesystem;
2025-10-31 16:50:47 +01:00
namespace Crafter {
2026-04-27 07:04:42 +02:00
export enum class ShaderType {
Vertex,
TessControl,
TessEvaluation,
Geometry,
Fragment,
Compute,
RayGen,
Intersect,
AnyHit,
ClosestHit,
Miss,
Callable,
Task,
Mesh,
};
2025-10-31 16:50:47 +01:00
export class Shader {
2025-04-24 19:21:09 +02:00
public:
fs::path path;
std::string entrypoint;
2026-04-27 07:04:42 +02:00
ShaderType type;
CRAFTER_API Shader(fs::path&& path, std::string&& entrypoint, ShaderType type);
CRAFTER_API bool Check(const fs::path& outputDir) const;
2026-05-02 21:08:51 +02:00
CRAFTER_API std::string Compile(const fs::path& outputDir, std::span<const fs::path> includeDirs) const;
2025-04-24 19:21:09 +02:00
};
}