Glslang.NET
1.0.1
See the version list below for details.
dotnet add package Glslang.NET --version 1.0.1
NuGet\Install-Package Glslang.NET -Version 1.0.1
<PackageReference Include="Glslang.NET" Version="1.0.1" />
paket add Glslang.NET --version 1.0.1
#r "nuget: Glslang.NET, 1.0.1"
// Install Glslang.NET as a Cake Addin #addin nuget:?package=Glslang.NET&version=1.0.1 // Install Glslang.NET as a Cake Tool #tool nuget:?package=Glslang.NET&version=1.0.1
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#.
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.<br> 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:
- Zig compiler version 0.14.0-dev.1862+c96f9a017 present on your
PATH
. You can get the compiler from Zig's download page or from a package manager
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
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Glslang.NET:
Repository | Stars |
---|---|
ProwlEngine/Prowl
An Open Source C# 3D Game Engine under MIT license, inspired by Unity and featuring a complete editor
|