project now compiles

This commit is contained in:
Matthew 2025-08-16 12:06:24 +10:00
parent 00550d9766
commit 7b972d9baa
6 changed files with 64 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
build

3
.ignore Normal file
View File

@ -0,0 +1,3 @@
.git
src/VulkanRenderer/vma
src/DLibs/external

31
build.sh Normal file → Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
set -eu
# SHADERS
shader_compiler="glslc"
shader_flags="--target-spv=spv1.5 -std=460 --target-env=vulkan1.2"
shader_out="-oassets/"
mkdir -p build
mkdir -p assets
for shader in src/shaders/*.glsl; do
base_name=$(basename -- "$shader" .glsl)
case "$base_name" in
*.vert) shader_stage="-fshader-stage=vert" ;;
*.frag) shader_stage="-fshader-stage=frag" ;;
*.tesc) shader_stage="-fshader-stage=tesc" ;;
*.tese) shader_stage="-fshader-stage=tese" ;;
*.geom) shader_stage="-fshader-stage=geom" ;;
*.comp) shader_stage="-fshader-stage=comp" ;;
*) continue ;;
esac
$shader_compiler $shader_flags $shader_stage $shader "${shader_out}${base_name}.spv"
done
/bin/bash src/VulkanRenderer/build.sh build
/bin/bash src/DLibs/build.sh build

View File

@ -0,0 +1,22 @@
{
"name": "main",
"targetType": "none",
"subPackages": [
{
"name": "editor",
"targetType": "executable",
"targetName": "Editor",
"targetPath": "build",
"sourceFiles-linux": ["build/libvma.a", "build/libstb.a", "build/libm3d.a", "build/libcglm.a"],
"sourceFiles-windows": [],
"importPaths": ["src/editor", "src/DLibs", "src/DLibs/external/xxhash", "src/VulkanRenderer"],
"sourcePaths": ["src/editor", "src/DLibs", "src/DLibs/external/xxhash", "src/VulkanRenderer"],
"libs-linux": ["xcb", "X11", "X11-xcb", "vulkan", "stdc++", "xcb-xfixes", "freetype"],
"libs-windows": [],
"preGenerateCommands-linux": ["./build.sh"],
"preGenerateCommands-windows": [],
"dflags": ["-Xcc=-mno-sse", "-P-I/usr/include/freetype2", "-vgc"],
"dflags-dmd": ["-P=-DSTBI_NO_SIMD"]
},
]
}

@ -1 +1 @@
Subproject commit a91b50cb90397e4455bd505017541c72d1a959e0 Subproject commit 3c6d214aa7e3058f8de1a4ff380fd1bb8ce56036

View File

@ -0,0 +1,6 @@
import std.stdio;
void main(string[] argv)
{
writeln("Hello, World!");
}