bugfixes
This commit is contained in:
parent
d29f5609cd
commit
d840a81448
5 changed files with 45 additions and 36 deletions
29
examples/VulkanTriangle/project.cpp
Normal file
29
examples/VulkanTriangle/project.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import std;
|
||||
import Crafter.Build;
|
||||
namespace fs = std::filesystem;
|
||||
using namespace Crafter;
|
||||
|
||||
extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> args) {
|
||||
std::vector<std::string> graphicsArgs(args.begin(), args.end());
|
||||
graphicsArgs.push_back("--vulkan");
|
||||
Configuration* graphics = LocalProject({
|
||||
.projectFile = "../../project.cpp",
|
||||
.args = graphicsArgs,
|
||||
});
|
||||
|
||||
Configuration cfg;
|
||||
cfg.path = "./";
|
||||
cfg.name = "VulkanTriangle";
|
||||
cfg.outputName = "VulkanTriangle";
|
||||
ApplyStandardArgs(cfg, args);
|
||||
cfg.dependencies = { graphics };
|
||||
|
||||
std::array<fs::path, 0> ifaces = {};
|
||||
std::array<fs::path, 1> impls = { "main" };
|
||||
cfg.GetInterfacesAndImplementations(ifaces, impls);
|
||||
|
||||
cfg.shaders.emplace_back(fs::path("raygen.glsl"), std::string("main"), ShaderType::RayGen);
|
||||
cfg.shaders.emplace_back(fs::path("closesthit.glsl"), std::string("main"), ShaderType::ClosestHit);
|
||||
cfg.shaders.emplace_back(fs::path("miss.glsl"), std::string("main"), ShaderType::Miss);
|
||||
return cfg;
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"name": "crafter-graphics",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "executable",
|
||||
"implementations": ["main"],
|
||||
"dependencies": [
|
||||
{
|
||||
"path":"../../project.json",
|
||||
"configuration":"lib-wayland-vulkan-debug"
|
||||
}
|
||||
],
|
||||
"shaders": [
|
||||
{
|
||||
"path":"raygen.glsl",
|
||||
"type": 6,
|
||||
"entrypoint":"main"
|
||||
},
|
||||
{
|
||||
"path":"closesthit.glsl",
|
||||
"type": 9,
|
||||
"entrypoint":"main"
|
||||
},
|
||||
{
|
||||
"path":"miss.glsl",
|
||||
"type": 10,
|
||||
"entrypoint":"main"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue