An open API service indexing awesome lists of open source software.

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

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());
}
```