Awesome Open Source
Awesome Open Source


Arqan is a classlib which basically serves as a C# wrapper for OpenGL functions and enums as well as GLFW 3.3.2 functions and enums.


Due to the differences between how OpenGL works per operating system I maintain two versions of Arqan. One for Windows and one for Linux.

dotnet add package Arqan.Windows
dotnet add package Arqan.Linux

Cross-Platform usage

Instead of maintaining multiple code sources with each different package references I recommend making use of the Condition attribute in the ItemGroup element of your csproj file like this:

<ItemGroup Condition="'$(OS)' == 'UNIX'">
    <PackageReference Include="Arqan.Linux" Version="2.1.0" />
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
    <PackageReference Include="Arqan.Windows.x64" Version="2.1.0" />



To build this library you need dotnet core 2.1 or newer. I recommend going with the latest version when possible.




Just refering the library wont cut it. You also need to make sure you got the right 3rd-party libraries.



Most Windows system ship a dll called "opengl32.dll". If not, make sure your hardware supports OpenGL and that your drivers are up-to-date.


I cannot provide instructions for all distros because I don't know all of them. Nor would that be doable. So I just go along with the most popular one, which in this case is Ubuntu. Run below commands to install OpenGL on your system, if you have not done so already.

sudo apt-get update
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev


Arqan supports GLFW version 3.3.2. For the current installation of that version see the instructions below as it differs per operating system.


I included the pre-compiled glfw3 dll files so you won't have to add those manually. You do not need to manually copy and paste it in your bin folder. The dll file is included in the nuget package and will be copied to your output folder upon building your application.


The developers did not provide a pre-compiled library for Linux because that would not be appliable for all distros. So by default they suggest to compile the library on your machine using cmake. A tutorial on how to do this can be found at However, on some distros glfw can be installed from your package repository. To install glfw on Ubuntu for example, run the following commands:

sudo apt-get update
sudo apt-get install libglfw3 libglfw3-dev


I would highly appreciate it if you would help me polish this library. I have not had the chance yet to test all wrapped methods in the classes. I actually generated them based on an XML provided by the Khronos Group a couple of years ago. So probably there are new functions and enums already which have not been integrated yet. So feel free to send in a pull request or open up an issue. If you do open up a pull request, please target the develop branch.



Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
c-sharp (12,663
csharp (1,124
dotnet (918
opengl (480
binding (63
glfw (30