Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smack0007/GLFWDotNet
.NET bindings for GLFW.
https://github.com/smack0007/GLFWDotNet
c-sharp dotnet dotnet-core glfw interop
Last synced: 9 days ago
JSON representation
.NET bindings for GLFW.
- Host: GitHub
- URL: https://github.com/smack0007/GLFWDotNet
- Owner: smack0007
- License: mit
- Archived: true
- Created: 2016-03-10T15:36:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-02-17T05:54:30.000Z (over 2 years ago)
- Last Synced: 2024-10-07T12:21:06.095Z (29 days ago)
- Topics: c-sharp, dotnet, dotnet-core, glfw, interop
- Language: C
- Homepage:
- Size: 3.86 MB
- Stars: 50
- Watchers: 6
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.md
- License: License.txt
Awesome Lists containing this project
- awesome-dotnet-core - GLFWDotNet - .NET bindings for GLFW. (Frameworks, Libraries and Tools / Graphics)
- fucking-awesome-dotnet-core - GLFWDotNet - .NET bindings for GLFW. (Frameworks, Libraries and Tools / Graphics)
- awesome-dotnet-core - GLFWDotNet - .NET bindings for GLFW. (Frameworks, Libraries and Tools / Graphics)
- awesome-dotnet-core - GLFWDotNet - GLFW的.NET绑定。 (框架, 库和工具 / 图片)
README
[![The MIT License](https://img.shields.io/badge/license-MIT-orange.svg?style=flat-square)](http://opensource.org/licenses/MIT)
[![Actions Status](https://github.com/smack0007/GLFWDotNet/workflows/CI/badge.svg)](https://github.com/smack0007/GLFWDotNet/actions)
[![NuGet Badge](https://buildstats.info/nuget/GLFWDotNet)](https://www.nuget.org/packages/GLFWDotNet/)# GLFWDotNet
.NET bindings for [GLFW](http://www.glfw.org). Currently only tested / works on Windows but should be
fairly easy to make it work on other platforms. Pull requests are welcome.## Usage
Use one of the following options:
* Use the [NuGet](https://www.nuget.org/packages/GLFWDotNet/) package.
* Include [GLFW.cs](https://github.com/smack0007/GLFWDotNet/blob/master/src/GLFWDotNet/GLFW.cs) directly
in your project.
### Native DLLs#### Windows
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](https://github.com/smack0007/GLFWDotNet/blob/master/src/GLFWDotNet/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](https://github.com/smack0007/GLFWDotNet/blob/master/build/CopyDependencies.targets)
build script.```xml
$(MSBuildThisFileDirectory)..\ext\GLFW\
```
#### Linux
Usage on Linux requires `libglfw.so` to be installed as well as `libdl.so`.
In Ubuntu the dependencies can be installed via the following command:
```bash
sudo apt install libc6-dev libglfw3-dev
```#### MacOS
Usage on MacOS requires `libglfw.dylib` to be installed. Dependencies can be installed
via brew with the following command:```bash
brew install glfw3
```## Samples
There are a few [samples](https://github.com/smack0007/GLFWDotNet/tree/master/samples) showing how to use GLFWDotNet.
* [HelloWorld](https://github.com/smack0007/GLFWDotNet/blob/master/samples/HelloWorld/Program.cs) Basic HelloWorld program to get you started.
* [GLFWInfo](https://github.com/smack0007/GLFWDotNet/blob/master/samples/GLFWInfo/Program.cs) Writes information about the system out to the console.