More OO-like. a bit easier to read/use things
This commit is contained in:
22
hexworld/Util/GLObject.cs
Normal file
22
hexworld/Util/GLObject.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
|
||||
namespace hexworld.Util
|
||||
{
|
||||
public abstract class GLObject
|
||||
{
|
||||
public uint Id { get; protected set; }
|
||||
|
||||
protected GLObject(uint id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public static explicit operator uint(GLObject o) => o.Id;
|
||||
public static explicit operator int(GLObject o) => (int) o.Id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user