Some checks failed
CI / build-test-release (push) Failing after 7m15s
37 lines
922 B
C++
37 lines
922 B
C++
// SPDX-License-Identifier: LGPL-3.0-only
|
|
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
|
|
|
module;
|
|
#include "Crafter.Build-Api.h"
|
|
export module Crafter.Build:Shader;
|
|
import std;
|
|
namespace fs = std::filesystem;
|
|
|
|
namespace Crafter {
|
|
export enum class ShaderType {
|
|
Vertex,
|
|
TessControl,
|
|
TessEvaluation,
|
|
Geometry,
|
|
Fragment,
|
|
Compute,
|
|
RayGen,
|
|
Intersect,
|
|
AnyHit,
|
|
ClosestHit,
|
|
Miss,
|
|
Callable,
|
|
Task,
|
|
Mesh,
|
|
};
|
|
|
|
export class Shader {
|
|
public:
|
|
fs::path path;
|
|
std::string entrypoint;
|
|
ShaderType type;
|
|
CRAFTER_API Shader(fs::path&& path, std::string&& entrypoint, ShaderType type);
|
|
CRAFTER_API bool Check(const fs::path& outputDir) const;
|
|
CRAFTER_API std::string Compile(const fs::path& outputDir, std::span<const fs::path> includeDirs) const;
|
|
};
|
|
}
|