OpenGL Version fix

  1. Index: GL_Display.cs
  2. ===================================================================
  3. --- GL_Display.cs       (revision 1049)
  4. +++ GL_Display.cs       (working copy)
  5. @@ -397,6 +397,9 @@
  6.                         string versionString = GL.GetString(StringName.Version);
  7.                         string ext = GL.GetString(StringName.Extensions);
  8.  
  9. +                       string decimal_sep = System.Globalization.NumberFormatInfo.CurrentInfo.CurrencyDecimalSeparator;
  10. +                       versionString = versionString.Replace(".", decimal_sep);
  11. +                       versionString = versionString.Replace(",", decimal_sep);
  12.                         mGLVersion = decimal.Parse(versionString.Substring(0, 3));
  13.                         mSupportsShaders = false;
  14.  

I think this line always return decimal value but with '.' as delimiter:
string versionString = GL.GetString(StringName.Version);
If your system delimiter (for example, in russian - ',') is different your will get exception. This patch will fix it.

Sorry for my bad English.

kanato
Posted - Wed, 10/14/2009 - 10:24

Thanks for the patch. I have made an issue to track it, and I will try to apply it this weekend.
http://www.agatelib.org/node/156