fixed GL issue, where ids were not right returned

This commit is contained in:
Michel Fedde 2020-10-06 16:56:58 +02:00
parent 820d6ce700
commit 1f4fb7e560
3 changed files with 3 additions and 9 deletions

View file

@ -80,15 +80,10 @@ namespace SM.OGL
if (GLSystem.Debugging) GL.ObjectLabel(TypeIdentifier, _id, name.Length, name);
}
protected virtual int GetID()
{
return _id;
}
/// <summary>
/// Returns the ID for the object.
/// </summary>
/// <param name="glo"></param>
public static implicit operator int(GLObject glo) => glo.GetID();
public static implicit operator int(GLObject glo) => glo.ID;
}
}

View file

@ -48,7 +48,7 @@ namespace SM.OGL
ShadingVersion = Version.CreateGLVersion(GL.GetString(StringName.ShadingLanguageVersion));
Extensions = GL.GetString(StringName.Extensions).Split(' ');
Debugging = Extensions.Contains("KHR_debug");
Debugging = Extensions.Contains("khr_debug");
if (Debugging) GLDebugging.EnableDebugging();
_init = true;