v2 nearly done
This commit is contained in:
parent
5e1fcd8590
commit
f13671b2be
24 changed files with 1467 additions and 314 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue