flibitijibibo/MonoGame — pull request #123 by sulix (2013-11-17 16:19:48+00:00)
Title: Make Texture2D.GetData slightly less insulting to the spec.

So it turns out that MonoGame's (OpenGL) implementation of Texture2D.GetData() ~~is a piece of shit~~ totally ignores two parameters, making it either:
a) Return the wrong results,
b) Throw an exception from trying to write outside the bounds of an array,
c) Make the GL driver corrupt memory *or*
d) Some combination of the above.

This fixes it to be spec-compliant, even if it's now a bit slower and the code is uglier (basically, we fall back to a now-even-slower slow path a lot more often).

This fixes one crash in Codename RobotnikNo, though this simply exposes another two seconds later. It also might be fixing a graphical issue, but the instancing is still sufficiently broken for me not to be able to tell.