Skip to content

g-champagne/OpenGL.Net

 
 

Repository files navigation

build nuget NuGet

wiki

OpenGL.Net

Modern OpenGL bindings for C#.

Generated from the lastest official XML specification, OpenGL.Net provides:

  • Function pointer wrappers, with safe and unsafe parameters, pinning managed memory when necessary;
  • Automatic entry points aliasing management: function loader is aware of the current OpenGL context;
  • Strongly typed enumerants;
  • OpenGL entry points overloading;
  • Fully documented OpenGL entry points with the official manual pages;
  • Vector, math and color data structures. With System.Numerics.Vector support.
  • Automatic OpenGL extensions and implementation limits query;
  • Checking errors after each OpenGL command (Debug builds only);
  • Integrated entry points call logging (Debug builds only);

Currently implemented API are:

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

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`

NuGet

Open the Package Manager Console and run the following command:

Install-Package OpenGL.Net

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

Or just download the nuget binary packages:

Documentation

Go to the wiki to look for information about the project.

Contributing

If you use OpenGL.Net, and you're willing to improve the project, your contributions are welcome.

Create an issue

If you find something wrong during the development, you can open an issue to get help. The issue should specify all information that helps to identify the problem. The minimal information to be included should be:

  • OpenGL.Net version and configuration;
  • Operating system;
  • GPU device driver vendor, if correlated with the problem.

The common reasons for creating an issue:

  • Unexpected exceptions: if you get an unexpected exception from OpenGL.Net, the issue should specify the exception stack and message.
  • Missing OpenGL API: if you expect a GL command, a GL constant or an enumeration, but it is missing or wrong, you can create an issue about it; you can go further by checking the local gl.xml specification, and if it is reasonable, create an issue to the Khronos GitHub repository.
  • Toolkit integration: you can run OpenGL.Net with any toolkit on any(*) platform, just find the display and window handles. You can open an issue for requesting a support library for integrating some toolkit.
  • Missing feature: you can request any feature implementation, if it is related to the project target.

Pull request

Once you have created an issue, you are free to submit a pull request relative to the issue.

Donate

If you like the project, or if it has saved you time, or you just want to offer a free beer to me, you can Donate.

About

Modern OpenGL bindings for C#.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.6%
  • Other 0.4%