mono/MonoGame — pull request #789 by slygamer (2012-09-20 14:02:42+00:00)
Title: Android rendering issues resolved

- Added GraphicsExtensions.CheckGLError(). Has a Conditional("DEBUG") attribute so it only exists in builds with a DEBUG conditional.
- Added call to GraphicsExtensions.CheckGLError() after every GL call. Found several problem areas on Android. Performance in Debug builds does not appear to be affected much, if at all.
- Attribute vertex locations are no longer hard-coded. Locations are retrieved after linking the shader program.
- Added call to GL.UseProgram() before calls to GL.Uniform1() to prevent InvalidOperation error.
- Retrieve maximum number of texture image units from OpenGL and use that number to initialize TextureCollection and SamplerStates in GraphicsDevice. Prevents error from using out-of-range index in GL.ActiveTexture().