v2 nearly done

This commit is contained in:
Jorijn van der Graaf 2026-04-27 07:04:42 +02:00
commit f13671b2be
24 changed files with 1467 additions and 314 deletions

View file

@ -17,19 +17,34 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
module;
#include "glslang/Public/ShaderLang.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;
EShLanguage type;
Shader(fs::path&& path, std::string&& entrypoint, EShLanguage type);
ShaderType type;
Shader(fs::path&& path, std::string&& entrypoint, ShaderType type);
bool Check(const fs::path& outputDir) const;
std::string Compile(const fs::path& outputDir) const;
};