Opentk/Source
Stefanos A. b9f57ba4d2 [OpenTK] Use ASCII encoding
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.
2014-01-16 14:32:11 +01:00
..
Bind Added overloads for compatibility with svn r3127 2013-12-16 01:55:05 +01:00
Build.UpdateVersion Merge master into no-reflect 2013-12-15 16:36:37 +01:00
Compatibility Normalized xml doc file paths 2013-12-15 23:24:17 +01:00
Converter Merge master into no-reflect 2013-12-15 16:36:37 +01:00
Examples [Examples] Improved timing display 2014-01-14 13:27:09 +01:00
Generator.Rewrite Marshal strings as UTF8 (affects #18) 2013-12-21 00:51:34 +01:00
GLControl Remove bogus GraphicsMode.Index check. Fixes #22 2013-12-22 15:40:01 +01:00
OpenTK [OpenTK] Use ASCII encoding 2014-01-16 14:32:11 +01:00