fixed GL issue, where ids were not right returned
This commit is contained in:
parent
820d6ce700
commit
1f4fb7e560
3 changed files with 3 additions and 9 deletions
|
|
@ -21,7 +21,6 @@ namespace SM.Base
|
||||||
{
|
{
|
||||||
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>
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue