b9f57ba4d2
Most OpenGL versions work with single-byte ASCII strings exclusively. OpenGL 4.2 adds UTF8 encoded comments to GLSL shaders. Unfortunately, UTF16 (.Net) to UTF8 conversions will usually modify the length of the resulting byte array. This is not currently possible to implement inside OpenTK, since the binding generator does not know which length parameter corresponds to a string parameter. For this reason, and to maintain compatibility with older OpenGL versions, we perform a destructive UTF16-to-ASCII encoding, which replaces unsupported characters by '?'. This allows multi-byte post-4.2. GLSL shaders to work as expected. If non-destructive round-tripping of strings is required, the user will have to use the IntPtr overload for string parameters and perform the UTF16-to-UTF8 encoding/decoding manually. This need is very unlikely to arise in practice. |
||
---|---|---|
Dependencies | ||
Documentation | ||
Installers | ||
Source | ||
.gitattributes | ||
.gitignore | ||
OpenTK.sln | ||
OpenTK.snk | ||
README.md |
OpenTK
The Open Toolkit is an advanced, low-level C# library that wraps OpenGL, OpenGL ES and OpenAL. It is suitable for games, scientific applications and any other project that requires 3d graphics, audio or compute functionality.
Project website: http://www.opentk.com/
Official git repository: https://github.com/opentk/opentk
Features
- Create cutting-edge graphics with OpenGL 4.4 and OpenGL ES 3.0
- Spice up your GUI with 3d graphics
- Improve your code flow with strong types and inline documentation
- Write once run everywhere!
OpenTK is available on Windows, Linux, Mac OS X, *BSD, SteamOS, Android and iOS. It can be used standalone or integrated into a GUI (Windows.Forms, WPF, GTK+, Qt, VTK, ...)
Binaries and NuGet packages available at http://www.opentk.com
Roadmap
- Merge opentk/opentk (upstream) with mono/opentk (Xamarin)
- Add Portable Class Library (PCL) target
- Add multitouch API
- Add new platforms: NaCL, emscripten, Windows Metro, Ouya, Raspberry PI
- Improve OpenCL bindings
- Improve math library
Contributing
- Install git and a C# IDE (see requirements section below)
- Fork the develop branch of https://github.com/opentk/opentk
- Commit your changes in small, incremental steps with clear descriptions
- When ready, issue a Pull Request (PR) against the develop branch of https://github.com/opentk/opentk
For details on coding style and best practices, refer to https://github.com/opentk/opentk/wiki/Contributing
Requirements
- Windows (XP/Vista/7/8), Linux, Mac OS X, *BSD, SteamOS, Android or iOS
- For graphics, OpenGL drivers or a suitable emulator, such as ANGLE
- For audio, OpenAL drivers or OpenAL Soft
- To develop desktop applications: Visual Studio, Xamarin Studio, MonoDevelop or SharpDevelop
- To develop Android applications: Xamarin Studio or the Xamarin Extensions for Visual Studio
- To develop iOS applications: Xamarin Studio and XCode
Documentation
Your favorite IDE will display inline documentation for all OpenTK APIs. Additional information can be found in the OpenTK Manual and in the opentk/Documentation/ folder.
Technical documentation about the implementation of OpenTK can be found in the Technical Wiki.
Need Help?
Post your questions at the OpenTK forums.
Report bugs at https://github.com/opentk/opentk/issues
License
The Open Toolkit is distributed under the permissive MIT/X11 license and is absolutely free.