Home

Awesome

build build codecov nuget NuGet

wiki

OpenGL.Net

Modern OpenGL bindings for C#.

OpenGL

Features

If you need more OOP with OpenGL, you can give a try to OpenGL.Net.Objects.

Frameworks

OpenGL.Net is running on a number of .NET frameworks:

Toolkits

OpenGL.Net is not aware(*) about the underlying platform or graphical toolkit you're running on. To create a GL context, users are required to provide a window handle and a display handle. There are sub-projects that automate the GL viewport definition and creation.

NuGet

Open the Package Manager Console and run the following command:

Install-Package OpenGL.Net

You can choose to restrict the available GL profile:

Install-Package OpenGL.Net.CoreProfile
Install-Package OpenGL.Net.ES2Profile

Math data structures:

Install-Package OpenGL.Net.Math

To integrate window systems, run the most appropriate command for your platform:

Install-Package OpenGL.Net.WinForms
Install-Package OpenGL.Net.Xamarin.Android
Install-Package OpenGL.Net.VideoCore

OpenVX

Bindings for OpenVX 1.2; currently under development, but the sample is running well.

Features

OpenWF

OpenWF Composition.

Instructions

In order to use OpenGL.Net you only need to link the library; due the current state of the project, it is advisable to clone the repository and work directly with the library, since this method offers more flexible solution (i.e. Debug builds).

Clone the repository

Follow the command below to clone and build the repository.

git clone https://github.com/luca-piccioni/OpenGL.Net.git
cd OpenGL.Net
msbuild /p:Configuration=Release OpenGL.Net_VC14.sln
msbuild /p:Configuration=Release OpenGL.Net_VC15.sln
msbuild /p:Configuration=Release OpenGL.Net_Mono.sln

The following environments can be used:

Documentation

Go to the wiki to look for information about the project, especially the how do I... page. There is also a Samples directory where application skeleton are implemented for various platforms, and there is an exaustive and documented hello triangle application.

Acknowledgements

Many tools and services are required to build and run OpenGL.Net.

<img src="https://github.com/luca-piccioni/OpenGL.Net/blob/master/Wiki/Supporter-AppVeyor.png" width="335" height="70"><img src="https://github.com/luca-piccioni/OpenGL.Net/blob/master/Wiki/Supporter-TravisCI.png" width="125" height="124"><img src="https://files.readme.io/9d08c4c-back.png" width="125" height="125">

<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/61/Visual_Studio_2017_logo_and_wordmark.svg/640px-Visual_Studio_2017_logo_and_wordmark.svg.png" width="640" height="108"> <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/68/Xamarin_logo_and_wordmark.png/320px-Xamarin_logo_and_wordmark.png" width="320" height="87"> <img src="https://github.com/luca-piccioni/OpenGL.Net/blob/master/Wiki/Supporter-Resharper.png" width="125" height="125"><img src="https://raw.githubusercontent.com/nunit/resources/master/images/icon/nunit_256.png" width="125" height="125">

Licensing

The project is released under the MIT license. Previous revisions of the project were licensed under the LGPL2 licence; this kind of license seems limiting the deployment of the binary forms on some platform (ironic, isn't it?). Since the project is maintained to be useful on the widest range of platforms/user-cases, and considering the spirit of the technology used to build it (.NET Fundation), the MIT license was preferred. The WTFPL license was considered also, but it has not met all requirements.