https://github.com/rtbo/spirv_cross-d
D bindings to Khronos' SPIRV-Cross
https://github.com/rtbo/spirv_cross-d
Last synced: about 1 year ago
JSON representation
D bindings to Khronos' SPIRV-Cross
- Host: GitHub
- URL: https://github.com/rtbo/spirv_cross-d
- Owner: rtbo
- License: mit
- Created: 2018-03-24T20:29:07.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-11-24T11:13:57.000Z (over 5 years ago)
- Last Synced: 2025-01-30T19:26:55.777Z (over 1 year ago)
- Language: C++
- Size: 5.45 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# spirv_cross-d
D bindings to [Khronos' SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross)
Automatically builds and statically links to the C++ library through a provided C wrapper.
On Windows X86 DMD, only mscoff libs are supported. (Dub flag --arch=x86_mscoff)
## Example:
```d
import std.stdio;
import spirv_cross;
void main()
{
auto spirv = cast(immutable(uint)[])import("shader.vert.spv");
auto cl = new ScCompilerGlsl(spirv);
scope(exit) cl.dispose();
auto opts = cl.options;
opts.ver = 130;
cl.options = opts;
writeln(cl.compile());
}
```