Skip to content

sinnwrig/Glslang.NET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glslang.NET: cross-platform C# wrapper for the Khronos Group's reference GLSL/SPIR-V compiler

A cross-platform .NET 8.0 wrapper for the Khronos GLSL reference compiler, written in C#.

NuGet

Usage

This project wraps functionality from glslang into managed classes, which can be used to compile shader code with various options in a similar fashion to the native glslang interface.
However, it appropriately modifies the interface to fit naturally with C# and behaves accordingly. To see an example of usage, refer to Example.cs in source.

Native Details

To support cross-platform compilation and to simplify the native build process, Glslang.NET uses a fork of glslang built with zig instead of CMake or GN/Ninja. As Zig's compiler supports cross-compilation out of the box, it allows glslang to build on any platform, for any platform. Additional functionality is also included in the repository to allow glslang to export the ability to disassemble SPIR-V bytecode into a human-readable format.

Building Native Libraries

To build native libraries, run the BuildNative.cs file inside the Native folder, specicying your target architecture [x64, arm64, all] with -A and your target platform [windows, linux, macos, all] with -P.

Native build requirements:

Pre-built binaries are bundled in the NuGet package for the following operating systems:

  • Windows x64
  • Windows arm64
  • OSX x64
  • OSX arm64 (Apple silicon)
  • Linux x64
  • Linux arm64

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages