Updated to work with the new bindings.

This commit is contained in:
the_fiddler 2007-11-04 15:30:44 +00:00
parent 9d8adb6643
commit 77e5453c68
2 changed files with 8 additions and 4 deletions

View file

@ -14,7 +14,9 @@ using System.Runtime.InteropServices;
using System.Reflection;
using System.Diagnostics;
using System.Reflection.Emit;
using OpenTK.Math;
using OpenTK.OpenGL.Enums;
#endregion
@ -141,7 +143,7 @@ namespace OpenTK.OpenGL
{
// Assumes there is an opengl context current.
AvailableExtensions.Clear();
string version_string = GL.GetString(OpenTK.OpenGL.GL.Enums.StringName.VERSION);
string version_string = GL.GetString(StringName.Version);
if (String.IsNullOrEmpty(version_string))
{
throw new ApplicationException("Failed to build extension list. Is there an opengl context current?");
@ -189,7 +191,7 @@ namespace OpenTK.OpenGL
AvailableExtensions.Add("VERSION_2_1", true);
}
string extension_string = GL.GetString(OpenTK.OpenGL.GL.Enums.StringName.EXTENSIONS);
string extension_string = GL.GetString(Enums.StringName.Extensions);
if (String.IsNullOrEmpty(extension_string))
return; // no extensions are available

View file

@ -10,7 +10,9 @@ using System.Collections.Generic;
using System.Text;
using System.Reflection;
using OpenTK.Platform;
using OpenTK.Math;
using OpenTK.OpenGL.Enums;
namespace OpenTK.OpenGL
{
@ -153,7 +155,7 @@ namespace OpenTK.OpenGL
AvailableExtensions.Clear();
string version_string = Glu.GetString(Enums.StringName.VERSION);
string version_string = Glu.GetString(GluStringName.Version);
if (String.IsNullOrEmpty(version_string))
{
throw new ApplicationException("Failed to build extension list. Is there an opengl context current?");
@ -183,7 +185,7 @@ namespace OpenTK.OpenGL
AvailableExtensions.Add("VERSION_1_3", true);
}
string extension_string = Glu.GetString(Enums.StringName.EXTENSIONS);
string extension_string = Glu.GetString(GluStringName.Extensions);
if (String.IsNullOrEmpty(extension_string))
{ // no extensions are available
return;