comparison src/glslang/glslang_c_interface.nim @ 2:213fdf8d31dd

did: hello world triangle, a bit of code organization
author Sam <sam@basx.dev>
date Mon, 19 Dec 2022 10:41:20 +0700
parents bb2a7d3a7003
children 0660ba9d1930
comparison
equal deleted inserted replaced
1:bb2a7d3a7003 2:213fdf8d31dd
1 import std/strformat
2
3 when defined(linux):
4 const platform = "linux"
5 when defined(windows):
6 const platform = "windows"
7
8
9 when defined(release):
10 const libversion = "release"
11 else:
12 const libversion = "debug"
13
14
1 # required to link the GLSL compiler 15 # required to link the GLSL compiler
2 when defined(release): 16 {.passl: &"-Lthirdparty/lib/glslang/{platform}_{libversion}" .}
3 {.passl: "-Lthirdparty/glslang/lib/release" .} 17 {.passl: &"-Lthirdparty/lib/spirv-tools/{platform}_{libversion}" .}
4 else:
5 {.passl: "-Lthirdparty/glslang/lib/debug" .}
6 {.passl: "-Lthirdparty/spirv-tools/lib/" .}
7 18
8 {.passl: "-lglslang" .} 19 {.passl: "-lglslang" .}
9 {.passl: "-lglslang-default-resource-limits" .} 20 {.passl: "-lglslang-default-resource-limits" .}
10 {.passl: "-lHLSL" .} 21 {.passl: "-lHLSL" .}
11 {.passl: "-lMachineIndependent" .} 22 {.passl: "-lMachineIndependent" .}
12 {.passl: "-lGenericCodeGen" .} 23 {.passl: "-lGenericCodeGen" .}
13 {.passl: "-lOSDependent" .} 24 {.passl: "-lOSDependent" .}
14 {.passl: "-lOGLCompiler" .} 25 {.passl: "-lOGLCompiler" .}
15 {.passl: "-lSPIRV" .} 26 {.passl: "-lSPIRV" .}
16 {.passl: "-lSPIRV-Tools-opt" .} 27 {.passl: "-lSPIRV-Tools-opt" .}
17
18 {.passl: "-lSPIRV-Tools" .} 28 {.passl: "-lSPIRV-Tools" .}
19 {.passl: "-lSPIRV-Tools-diff" .} 29 {.passl: "-lSPIRV-Tools-diff" .}
20 {.passl: "-lSPIRV-Tools-fuzz" .} 30 {.passl: "-lSPIRV-Tools-fuzz" .}
21 {.passl: "-lSPIRV-Tools-link" .} 31 {.passl: "-lSPIRV-Tools-link" .}
22 {.passl: "-lSPIRV-Tools-lint" .} 32 {.passl: "-lSPIRV-Tools-lint" .}