Modern OpenGL binding for C#.
Generated from the lastest official XML specification, OpenGL.Net provides:
- Strongly typed enumerants;
- Function pointer wrappers, with safe and unsafe parameters, pinning managed memory when necessary;
- OpenGL entry points overloading;
- Automatic entry points aliasing management: function loader is aware of the current OpenGL context;
- Fully documented OpenGL entry points with the official manual pages;
- Checking errors after each OpenGL command (Debug builds only);
- Integrated entry points call logging (Debug builds only);
- Vector, math and color data structures. With System.Numerics.Vector support.
- Automatic OpenGL extensions and implementation limits query;
Currently implemented API are:
- OpenGL 4.5, including compatibility profile
- OpenGL ES 3.2, including OpenGL ES 1.0
- WGL, GLX 1.4 and EGL (Native Platform Interface) 1.5 as platform APIs.
- Broadcom VideoCore IV (alpha state)
- OpenWF Composition (alpha state)
If you need more OOP in OpenGL, you can give a try to OpenGL.Net.Objects.
In order to use OpenGL.Net you only need to link the library; Then it is just to write code. 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).
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`
The executable will be located at OpenGL.Net/OpenGL.Net/bin/net35/Release/OpenGL.Net.dll
and OpenGL.Net/OpenGL.Net/bin/net461/Release/OpenGL.Net.dll
.
Open the Package Manager Console and run the following command:
Install-Package OpenGL.Net
or just download the nuget binary package
The nuget package does not implement any UI integration. If you need it, install one of the following nuget packages:
- System.Windows.Forms UI integration (GlControl).
- Xamarin.Android UI integration.
- Rasperry PI 2 UI integration (native, no X11 support).
Go to the wiki to look for information about the project.
- Hello Triangle
- Hello Triangle using OpenGL ES 2 via ANGLE
- Hello Triangle on Android
- Hello Triangle on Raspberry Pi
- Hello Triangle in VB.Net
- Hello Triangle on WPF
- Offscren Triangle