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. |
||
---|---|---|
.. | ||
Bind | ||
Build.UpdateVersion | ||
Compatibility | ||
Converter | ||
Examples | ||
Generator.Rewrite | ||
GLControl | ||
OpenTK |