More OO-like. a bit easier to read/use things

This commit is contained in:
2017-02-24 21:22:13 -05:00
parent 338efc337e
commit 2710007ec2
12 changed files with 348 additions and 75 deletions

22
hexworld/Util/GLObject.cs Normal file
View 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;
}
}