Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.


Repository files navigation

The MIT License Actions Status NuGet Badge


.NET bindings for GLFW. Currently only tested / works on Windows but should be fairly easy to make it work on other platforms. Pull requests are welcome.


Use one of the following options:

  • Use the NuGet package.
  • Include GLFW.cs directly in your project.

Native DLLs


If you include GLFW.cs directly into your project you'll need to implement the LoadAssembly() method of the GLFW class yourself, the default implementation is in GLFW.LoadAssembly.cs.

This can also just be included in your project of course, in which case the GLFW dlls must be copied into runtimes\{win-x86|win-x64}\native subdirectories relative to the GLFWDotNet.dll. See the output of the samples. An example MSBuild Target can be seen in the CopyDependencies.targets build script.


<Target Name="CopyGLFW" AfterTargets="AfterBuild">
    DestinationFolder="$(TargetDir)runtimes\win-x64\native" />

    DestinationFolder="$(TargetDir)runtimes\win-x86\native" />


Usage on Linux requires to be installed as well as

In Ubuntu the dependencies can be installed via the following command:

sudo apt install libc6-dev libglfw3-dev


Usage on MacOS requires libglfw.dylib to be installed. Dependencies can be installed via brew with the following command:

brew install glfw3


There are a few samples showing how to use GLFWDotNet.

  • HelloWorld Basic HelloWorld program to get you started.
  • GLFWInfo Writes information about the system out to the console.