Home

Awesome

GLFW3.NET

Join us on Gitter! Build status Linux and Mac build

Automatic generated bindings of GLFW3 for .NET

Important

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.

Introduction

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

Windows

  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.

Linux/Mac

  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 build.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:

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

Important remarks

Compatibility:

Examples

Few usage examples are under the examples folder:

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

Dependencies for generation:

Contributing

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!