Skip to content
This repository has been archived by the owner on Aug 20, 2019. It is now read-only.


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Join us on Gitter! Build status Linux and Mac build

Automatic generated bindings of GLFW3 for .NET


Please report any bugs and suggestions!

Nuget package

NuGet version

Please keep in mind to add the file WrapperGLFW.dll.config to your project and change the option CopyToOutputPath of the file WrapperGLFW.dll.config to Always. The file can be found under /yoursolutionpath/packages/GLFW.NET.x.x.x/Content/WrapperGLFW.dll.config. This is required for Linux or Mac and if you don't do it, the library won't work.


This repository provides bindings for the latest GLFW3 version. It covers almost the complete API except Vulkan.

The binding is generated automatically but for a small part.

To get support for the Vulkan specific functions it's recommeneded to use the additional file GLFW3_Wrapper.cs which includes the missing bindings (for Vulkan) and an object oriented wrapper.

The projects under src are the generator, raw GLFW binding and an oop wrapper with binding for GLFW.

To get the binding as dll please read further.

How to get a working library file


  1. Clone
  2. Go into src/
  3. Build the project with the command Build.cmd
  4. Link the output dll to your project and copy the native glfw.dll into your output directory

The x64 glfw3.dll can be found in the dependencies folder. If you need a custom binary for windows go to the glfw website Pre-build binaries for all other architectures on windows e.g. x86 can be found there.


  1. Install glfw with your package-manager (version glfw 3.2.1)
  2. Clone
  3. Go into src/
  4. Build the library file with the command sh
  5. Link the dll to your project and link/copy WrapperGLFW.dll.config to your build-output directory (needed!)

Other build targets

There are also custom targets available for FAKE:

  • Build WrapperBinding to get the binding with oop wrapper (default target).
  • Build RawBinding to get the binding without oop wrapper.
  • Build Generator to build the generator.
  • Build all bindings to build the raw and wrapper binding.
  • ```Build`` to build all projects available in the src folder.
  • Clean to clean the build folder.

To use them simply add them with quotation marks after the build command.

Important remarks


  • The project is compatible with Mono. It can be opened and built by MonoDevelop too but using the script file is recommended.
  • The current GLFW.dll is for windows. For Linux/Mac please keep in mind to install glfw with your package-manager
  • Again, the wrapper which is highly recommended to prevent seg faults can be found under src/GLFW_Wrapper.cs


Few usage examples are under the examples folder:

  • How to use GLFW3.NET with SharpVk to acquire a VkSurfaceKHR from GLFW

Other examples can be seen in the wiki page of this repository.

Dependencies for generation:

  • The library uses CppSharp for binding generation.


Contributions to make this binding better and staying up to date are readily appreciated, feel free to send PR's and open issues if there are any.

To build the generator under Linux or Mac you have to compile the latest CppSharp on your own.

Windows developers can easily use the existing dlls in the dependencies folder.

Questions, Suggestions

We're having a gitter chat for discussing binding generation and or additional features! Feel free to join us!


Automatic generated bindings of GLFW3 for .NET








No releases published


No packages published