C# Portable Class Library OpenGL bindings with backends to various platform implementations.
This repository has been archived on 2023-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2013-08-11 17:57:56 -04:00
libs add OpenTK backend 2013-08-11 13:49:02 -04:00
PortableGL add more helper overloads 2013-08-11 17:57:56 -04:00
PortableGL.OpenTK fix mismatching opengl function name 2013-08-11 16:06:55 -04:00
PortableGL.SDL fix mismatching opengl function name 2013-08-11 16:06:55 -04:00
.gitignore Initial commit. 2013-08-11 13:06:21 -04:00
LICENSE Update LICENSE 2013-08-11 13:28:42 -04:00
PortableGL.sln add OpenTK backend 2013-08-11 13:49:02 -04:00
README.md Update README.md 2013-08-11 13:22:43 -04:00

PortableGL

This is a interface over platform/framework specific OpenGL bindings for C#.

The idea is to allow core application code to still include OpenGL calls by referencing a Portable Class Library which contains an interface with the OpenGL methods without any platform or OS-specifics. Final application builds will also reference a "backend" assembly which contains the actual OpenGL binding code (e.g. OpenTK, SDL2-CS, Xamarin.Android, etc).

At the moment, the OpenGL ES 2.0 specification is used as the sole interface available for both mobile and desktop platforms. I have no intention to add any other specifications over the short-term (such as OpenGL 1.x, 3.x, etc). My own personal goals with this library are simply to use the ES specification for both mobile and desktop platforms to make code portability between the two simpler.

C-style naming for the methods and OpenGL constants is intentionally left as-is to aid in porting existing OpenGL code. I don't intend to C#-ify much, if any, of the OpenGL methods (such as using specific enums for certain parameters).

TODO

  • Mobile backends: Xamarin.Android, Xamarin.iOS
  • Add additional method overloads to PortableGL to make it easier to pass arrays of data, out parameters, etc instead of needing to use pointers all the time
  • See about removing the intermediate OpenTK layer in SDL2-CS to remove one layer of indirection. Would we be able to do this on mobile platforms too ... ?