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

@ -20,8 +20,7 @@ namespace SM.Base
public abstract class GenericWindow : GameWindow public abstract class GenericWindow : GameWindow
{ {
private bool _loading = false; private bool _loading = false;
/// <summary> /// <summary>
/// This tells you the current world scale. /// This tells you the current world scale.
/// </summary> /// </summary>

View file

@ -80,15 +80,10 @@ namespace SM.OGL
if (GLSystem.Debugging) GL.ObjectLabel(TypeIdentifier, _id, name.Length, name); if (GLSystem.Debugging) GL.ObjectLabel(TypeIdentifier, _id, name.Length, name);
} }
protected virtual int GetID()
{
return _id;
}
/// <summary> /// <summary>
/// Returns the ID for the object. /// Returns the ID for the object.
/// </summary> /// </summary>
/// <param name="glo"></param> /// <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)); ShadingVersion = Version.CreateGLVersion(GL.GetString(StringName.ShadingLanguageVersion));
Extensions = GL.GetString(StringName.Extensions).Split(' '); Extensions = GL.GetString(StringName.Extensions).Split(' ');
Debugging = Extensions.Contains("KHR_debug"); Debugging = Extensions.Contains("khr_debug");
if (Debugging) GLDebugging.EnableDebugging(); if (Debugging) GLDebugging.EnableDebugging();
_init = true; _init = true;