Added Mesh class, removed attrib pointer management from Program, shifted to mesh. MUST use Program.UseDefault instead of GL.Use(0) to prevent crash, but meshes can't render with it anyway.

This commit is contained in:
2017-02-27 02:22:54 -05:00
parent 84608d5981
commit 73e70c3a60
9 changed files with 252 additions and 113 deletions

View File

@@ -4,11 +4,11 @@ using OpenTK;
namespace hexworld
{
[VertexData]
[VertexData(Divisor = 1)]
public struct Tile
{
[JsonProperty("pos")]
[VertexPointer("glbpos", 3, Divisor = 1)]
[VertexPointer("glbpos", 3)]
public Vector3 Position;
public Tile(Vector3 position)