[MonoTouch] OpenTK.Graphics issue with generic ref/out parameters
Stefanos A.
stapostol at gmail.com
Sun Oct 18 19:03:10 EDT 2009
The current version of the OpenGL|ES binding suffers from an issue where
generic ref/out parameters are not updated to reflect the results of the
unmanaged method call. This issue is fixed as of OpenTK rev. 2339.
This bug only affects wrappers that take generic ref or out parameters,
which are modified by OpenGL|ES. It typically manifests when calling
GL.ReadPixels() to retrieve the color of a single pixel - the color will
always be 0 (black). This bug does not affect non-generic parameters,
generic array parameters or generic ref parameters that are not modified
by OpenGL|ES.
Until MonoTouch can be updated to incorporate the upstream fix, you can
work around the issue by boxing the ailing parameter in a single-element
array. This will call an array overload instead of the problematic
ref/out ones, allowing the code to work correctly.
(Original issue report: http://www.opentk.com/node/1240)
More information about the MonoTouch
mailing list